aboutgitcodebugslistschat
path: root/dhcpv6.c
Commit message (Collapse)AuthorAgeFilesLines
* dhcpv6: Don't pass DNS option, it already comes from SLAACStefano Brivio2021-04-221-5/+0
| | | | | | | | | | | | It looks like some versions of ISC's IPv6 dhclient not only discard the DNS Recursive Name Server option if other options (Domain Search List? FQDN?) are absent, but they also drop existing entries configured via SLAAC from /etc/resolv.conf. Don't pass option 23 until I figure this out, it's anyway redundant as we pass DNS information via SLAAC (RFC 8106). Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
* 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>