Fix BOOTP fields for server-generated DHCP packets
Set siaddr to the server address instead of zero in DHCPOFFER Set siaddr to zero instead of the server address in DHCPNAK Set giaddr to the relay address instead of the server address in DHCPNAK Set giaddr to the relay address instead of zero on DHCPACK and DHCPOFFER Set server identifier option in DHCPNAK Current code is not compliant with RFC2131 and does not match dnsmasq behavior. It was not an issue until now since the packets were only used by the DHCP client, which does not send DHCPOFFER or DHCPNAK. Bug: b/109584964 Test: following DhcpServerTest.py regression tests pass: test_discover_bootpfields test_request_selecting_inuse test_request_rebinding_relayed test_discover_relayed_broadcastbit test_request_rebinding_wrongaddr_relayed Also: atest FrameworksNetTests Change-Id: Ie0bf780498e38945444bff66ca499cff5983a97f
Loading
Please register or sign in to comment