1
1
mirror of https://github.com/eblot/pybootd.git synced 2024-09-11 22:17:44 +03:00

Adds custom gateway support

This commit is contained in:
Alessandro Pilotti 2015-02-18 01:26:33 +02:00
parent 5b7e756764
commit cf9ccd23f4

View File

@ -546,7 +546,8 @@ class BootpServer:
pkt += struct.pack('!BB4s', DHCP_IP_MASK, 4, mask)
if to_bool(self.config.get(self.bootp_section, 'set_gateway', True)):
pkt += struct.pack('!BB4s', DHCP_IP_GATEWAY, 4, server)
gateway = self.config.get(self.bootp_section, 'gateway', server)
pkt += struct.pack('!BB4s', DHCP_IP_GATEWAY, 4, gateway)
dns = self.config.get(self.bootp_section,
'dns', None)