From d660f698427277ce695a5b756f3143c8304274ea Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Fri, 30 Dec 2011 21:55:49 +0400 Subject: zebra: justify some IPv6 ND RA timers wrt RFC There was a regression introduced with the previous commit: "ipv6 nd home-agent-lifetime 1800000" appeared by default in every interface section of running-config, although this command is invalid in this context. Troubleshooting and bugfixing of the issue tracked out several bugs in router advertisement procedures, some of which are fixed in this commit. * zebra/interface.c * if_zebra_new_hook(): update to treat -1 as "uninitialized" * nd_dump_vty(): idem * zebra/rtadv.c * rtadv_send_packet(): update processing of "router lifetime" field, "home agent" option and "home agent lifetime" field to conform to RFC6275 better * ipv6_nd_ra_interval_msec(): update MaxRtrAdvInterval range check, make sure it never exceeds (initialized) AdvDefaultLifetime * ipv6_nd_ra_interval(): idem * ipv6_nd_ra_lifetime(): update AdvDefaultLifetime range check, make sure it never falls below MaxRtrAdvInterval * ipv6_nd_homeagent_lifetime(): update HomeAgentLifetime range check * no_ipv6_nd_ra_lifetime(): update to treat -1 as "uninitialized" * no_ipv6_nd_homeagent_lifetime(): idem * rtadv_config_write(): idem --- zebra/interface.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'zebra/interface.h') diff --git a/zebra/interface.h b/zebra/interface.h index 0cf66403..ea3fec57 100644 --- a/zebra/interface.h +++ b/zebra/interface.h @@ -69,7 +69,7 @@ struct rtadvconf MUST be no greater than .75 * MaxRtrAdvInterval. Default: 0.33 * MaxRtrAdvInterval */ - int MinRtrAdvInterval; + int MinRtrAdvInterval; /* This field is currently unused. */ #define RTADV_MIN_RTR_ADV_INTERVAL (0.33 * RTADV_MAX_RTR_ADV_INTERVAL) /* Unsolicited Router Advertisements' interval timer. */ @@ -131,8 +131,7 @@ struct rtadvconf Default: 3 * MaxRtrAdvInterval */ int AdvDefaultLifetime; -#define RTADV_ADV_DEFAULT_LIFETIME (3 * RTADV_MAX_RTR_ADV_INTERVAL) - +#define RTADV_MAX_RTRLIFETIME 9000 /* 2.5 hours */ /* A list of prefixes to be placed in Prefix Information options in Router Advertisement messages sent from the interface. -- cgit v1.2.1 From 6eb0c5ab1d43bcf9edd4fefd19031f2b96ded728 Mon Sep 17 00:00:00 2001 From: Denis Ovsienko Date: Tue, 24 Jan 2012 11:02:03 +0400 Subject: zebra: freshen RFC references in rtadv RFC2461 was replaced by RFC4861 RFC3775 was replaced by RFC6275 draft-ietf-mip6-mipext-advapi-03 was replaced by RFC4584 --- zebra/interface.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'zebra/interface.h') diff --git a/zebra/interface.h b/zebra/interface.h index ea3fec57..0777a2fa 100644 --- a/zebra/interface.h +++ b/zebra/interface.h @@ -46,7 +46,7 @@ #endif #ifdef RTADV -/* Router advertisement parameter. From RFC2461, RFC3775 and RFC4191. */ +/* Router advertisement parameter. From RFC4861, RFC6275 and RFC4191. */ struct rtadvconf { /* A flag indicating whether or not the router sends periodic Router @@ -56,8 +56,8 @@ struct rtadvconf /* The maximum time allowed between sending unsolicited multicast Router Advertisements from the interface, in milliseconds. - MUST be no less than 70 ms (RFC3775, section 7.4) and no greater - than 1800000 ms (See RFC2461). + MUST be no less than 70 ms [RFC6275 7.5] and no greater + than 1800000 ms [RFC4861 6.2.1]. Default: 600000 milliseconds */ int MaxRtrAdvInterval; @@ -65,7 +65,7 @@ struct rtadvconf /* The minimum time allowed between sending unsolicited multicast Router Advertisements from the interface, in milliseconds. - MUST be no less than 30 ms (See RFC3775, section 7.4). + MUST be no less than 30 ms [RFC6275 7.5]. MUST be no greater than .75 * MaxRtrAdvInterval. Default: 0.33 * MaxRtrAdvInterval */ @@ -143,7 +143,7 @@ struct rtadvconf struct list *AdvPrefixList; /* The TRUE/FALSE value to be placed in the "Home agent" - flag field in the Router Advertisement. See [RFC3775 7.1]. + flag field in the Router Advertisement. See [RFC6275 7.1]. Default: FALSE */ int AdvHomeAgentFlag; @@ -166,7 +166,7 @@ struct rtadvconf #define RTADV_MAX_HALIFETIME 65520 /* 18.2 hours */ /* The TRUE/FALSE value to insert or not an Advertisement Interval - option. See [RFC 3775 7.3] + option. See [RFC 6275 7.3] Default: FALSE */ int AdvIntervalOption; -- cgit v1.2.1