internal/radvd: add support for DNSSL (#47)

Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
Matt Layher 2020-05-23 13:52:52 -04:00 committed by GitHub
parent 53c495091e
commit fe68c2dd52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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,