commit | 9a59fc5c2e6036d6497ea8eaf634693baf56f1ee | [log] [tgz] |
---|---|---|
author | David Crawshaw <crawshaw@google.com> | Fri Mar 10 10:01:14 2017 -0500 |
committer | David Crawshaw <crawshaw@google.com> | Fri Mar 10 12:37:04 2017 -0500 |
tree | 87f9d6676ff2fbf59e4532dd4b9f87495b4e3ef8 | |
parent | 5262ffb7587817a6428bb6419823d4a259ec0cc2 [diff] |
dhcp: send 'server identifier' on request The 'server identifier' option on a DHCPREQUEST must be the value of the option sent by the server on the DHCPOFFER. Before this CL, we were mistakenly using the siaddr field of the packet as the identifier. To cover this case in our unit tests, we fix our server to always provide an siaddr of 0, and then require the client to send the correct 'server identifier' option. (Just the server changes from this CL cause the tests to fail.) Also allow the DNS option to be any multiple of four, as DHCP servers can send more than DNS server. Change-Id: I40ff359f739c1129558e316edcee50de13e56446
Netstack is a network stack written in Go.
Try it out on Linux by installing the tun_tcp_echo demo:
go install github.com/google/netstack/tcpip/sample/tun_tcp_echo
Create a TUN device with:
[sudo] ip tuntap add user <username> mode tun <device-name> [sudo] ip link set <device-name> up [sudo] ip addr add <ipv4-address>/<mask-length> dev <device-name>
Then run with:
tun_tcp_echo <device-name> <ipv4-address> <port>
We would love to accept contributions, but we have not yet worked out how to handle them. Please contact us before sending any pull requests.
Whatever we do decide on will require signing the Google Contributor License. Please see CONTRIBUTING.md for more details.
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.