mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-23 01:53:28 +00:00
Fix PXE with static gateway
It was not working when gateway was set.
This commit is contained in:
parent
eb2301b22e
commit
c21ae64f06
@ -452,6 +452,8 @@ def check_reply(node, info, packet, sock, cfg, reqview):
|
||||
clipn = socket.inet_aton(niccfg['ipv4_address'])
|
||||
repview[16:20] = clipn
|
||||
gateway = niccfg['ipv4_gateway']
|
||||
if gateway:
|
||||
gateway = socket.inet_aton(gateway)
|
||||
netmask = niccfg['prefix']
|
||||
netmask = (2**32 - 1) ^ (2**(32 - netmask) - 1)
|
||||
netmask = struct.pack('!I', netmask)
|
||||
|
Loading…
Reference in New Issue
Block a user