mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Correct proxyDHCP buffer use
It was possible for proxyDHCP to look past the network designated end of packet. Fix this by consistently using the memoryview that was trimmed to size.
This commit is contained in:
parent
162e4d1d1e
commit
762a8ee73f
@ -315,9 +315,9 @@ def proxydhcp(handler, nodeguess):
|
||||
optidx = rqv.tobytes().index(b'\x63\x82\x53\x63') + 4
|
||||
except ValueError:
|
||||
continue
|
||||
hwlen = rq[2]
|
||||
opts, disco = opts_to_dict(rq, optidx, 3)
|
||||
disco['hwaddr'] = ':'.join(['{0:02x}'.format(x) for x in rq[28:28+hwlen]])
|
||||
hwlen = rqv[2]
|
||||
opts, disco = opts_to_dict(rqv, optidx, 3)
|
||||
disco['hwaddr'] = ':'.join(['{0:02x}'.format(x) for x in rqv[28:28+hwlen]])
|
||||
node = None
|
||||
if disco.get('hwaddr', None) in macmap:
|
||||
node = macmap[disco['hwaddr']]
|
||||
|
Loading…
Reference in New Issue
Block a user