From fe68c2dd524851208aa4ff23b0ba31700fac3cb6 Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Sat, 23 May 2020 13:52:52 -0400 Subject: [PATCH] internal/radvd: add support for DNSSL (#47) Signed-off-by: Matt Layher --- integration/radvd/radvd_test.go | 2 ++ internal/radvd/radvd.go | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/integration/radvd/radvd_test.go b/integration/radvd/radvd_test.go index 82c2e46..5cb0ef1 100644 --- a/integration/radvd/radvd_test.go +++ b/integration/radvd/radvd_test.go @@ -114,6 +114,8 @@ Retransmit time : unspecified (0x00000000) Autonomous address conf.: Yes Valid time : 7200 (0x00001c20) seconds Pref. time : 1800 (0x00000708) seconds + DNS search list : lan + DNS search list lifetime: 1200 (0x000004b0) seconds MTU : 1500 bytes (valid) Source link-layer address: 02:73:53:00:CA:FE from fe80::73:53ff:fe00:cafe diff --git a/internal/radvd/radvd.go b/internal/radvd/radvd.go index 742c06d..45818e3 100644 --- a/internal/radvd/radvd.go +++ b/internal/radvd/radvd.go @@ -181,6 +181,12 @@ func (s *Server) sendAdvertisement(addr net.Addr) error { } options = append(options, + &ndp.DNSSearchList{ + // TODO: audit all lifetimes and express them in relation to each other + Lifetime: 20 * time.Minute, + // TODO: single source of truth for search domain name + DomainNames: []string{"lan"}, + }, ndp.NewMTU(uint32(s.iface.MTU)), &ndp.LinkLayerAddress{ Direction: ndp.Source,