aboutgitcodebugslistschat
path: root/dhcpv6.c
Commit message (Collapse)AuthorAgeFilesLines
* dhcpv6: Subtract option length before returning one optionStefano Brivio2021-04-221-1/+2
| | | | | | | | dhcpv6_opt() needs to subtract option length _before_ returning, so that callers can conveniently pass the remaining length on subsequent calls. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* dhcpv6: Fix REPLY messages with NotOnLink status codeStefano Brivio2021-04-211-9/+19
| | | | | | | | | | | | The NotOnLink status code needs to be appended to the existing IA content, because if we omit the requested addresses in the reply, ISC's dhclient handles it as a NoAddrsAvail response. Also fix length accounting (we would send a bunch of zeroes after the IA otherwise), and print an informational message with the requested address, if it's not appropriate for the link. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* passt: Introduce a DHCPv6 serverStefano Brivio2021-04-131-0/+502
This implementation, similarly to the IPv4 DHCP one, hands out a single address, which is the same as the upstream address for the host. This avoids the need for address translation as long as the client runs a DHCPv6 client. The NDP "Managed" flag is now set in Router Advertisements. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>