mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Fix PXE based on mac
We normally use UUID, on a broken platform with bad UUID, user may need to use hwaddr. This was supposed to work, but didn't. Fix it to work correctly.
This commit is contained in:
parent
ca78b664c9
commit
2cb641e734
@ -252,8 +252,9 @@ def proxydhcp():
|
||||
optidx = rq.index(b'\x63\x82\x53\x63') + 4
|
||||
except ValueError:
|
||||
continue
|
||||
hwlen = rq[2]
|
||||
opts, disco = opts_to_dict(rq, optidx, 3)
|
||||
disco['uuid']
|
||||
disco['hwaddr'] = ':'.join(['{0:02x}'.format(x) for x in rq[28:28+hwlen]])
|
||||
node = None
|
||||
if disco.get('hwaddr', None) in macmap:
|
||||
node = macmap[disco['hwaddr']]
|
||||
@ -261,7 +262,7 @@ def proxydhcp():
|
||||
node = uuidmap[disco['uuid']]
|
||||
if not node:
|
||||
continue
|
||||
hwlen = rq[2]
|
||||
|
||||
myipn = myipbypeer.get(rqv[28:28+hwlen].tobytes(), None)
|
||||
if not myipn:
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user