From 244dc8dd4b741ee0873d83427ca6c378de8c2354 Mon Sep 17 00:00:00 2001 From: Hagen Paul Pfeifer Date: Sat, 18 Jul 2009 18:45:02 +0000 Subject: IPv6 Router Advertisement Option for RDNSS IPv6 Router Advertisement Option for DNS Configuration (RFC 5006)[1] introduced a mechanism to hand out recursive DNS server addresses via router advertisement (RA) messages. This simple combines the IPv6 stateless address auto-configuration process with the ability to get DNS server information - in one message. This options frees many environments from operating an additional DHCPv6 server that provides such information. This patch extends quagga by the ability to generate and transport RDNS addresses. RDNSS options are currently supported at radvd(1) and the Linux Kernel by handover this information to the user-space (via netlink socket). A simple RA configuration with two RDNS entries can be enabled via no ipv6 nd suppress-ra ipv6 nd prefix 2001:db8::/64 ipv6 nd rdnss 2001:db8::1 ipv6 nd rdnss 2001:db8::2 It is additionally possible to specify the lifetime of an RDNSS option as stated in [1] section 4.1. The default is infinity lifetime (0xfffffff) as it serves the most common application areas. ip nd rdnss 2001:db8::1 300000 [1] http://tools.ietf.org/html/rfc5006 Signed-off-by: Hagen Paul Pfeifer --- zebra/interface.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'zebra/interface.c') diff --git a/zebra/interface.c b/zebra/interface.c index ba4cf25f..a4f32e78 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -83,6 +83,10 @@ if_zebra_new_hook (struct interface *ifp) rtadv->DefaultPreference = RTADV_PREF_MEDIUM; rtadv->AdvPrefixList = list_new (); + + rtadv->AdvRDNSSFlag = 0; + rtadv->AdvRDNSSLifetime = RTADV_RDNSS_DEFAULT_LIFETIME; + rtadv->AdvRDNSSList = list_new (); } #endif /* RTADV */ @@ -641,6 +645,9 @@ nd_dump_vty (struct vty *vty, struct interface *ifp) vty_out (vty, " ND router advertisements with " "Home Agent flag bit set.%s", VTY_NEWLINE); + if (rtadv->AdvRDNSSFlag) + vty_out (vty, " ND router advertisements with " + "RDNSS information.%s", VTY_NEWLINE); if (rtadv->AdvIntervalOption) vty_out (vty, " ND router advertisements with Adv. Interval option.%s", VTY_NEWLINE); -- cgit v1.2.3