summaryrefslogtreecommitdiff
path: root/zebra/rtadv.c
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2012-01-08 17:46:34 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2012-01-26 11:42:51 +0400
commit6bb1273e83c29b3aeff9584bc8f6272e773294ad (patch)
treea40cc3cb8853c2a3188ef8aabe47a3486dac30cb /zebra/rtadv.c
parentd660f698427277ce695a5b756f3143c8304274ea (diff)
zebra: clear host bits of ND RA prefix option
RFC4861 4.6.2. Prefix Information Prefix An IP address or a prefix of an IP address. The Prefix Length field contains the number of valid leading bits in the prefix. The bits in the prefix after the prefix length are reserved and MUST be initialized to zero by the sender and ignored by the receiver. * rtadv.c * ipv6_nd_prefix(): add missing call to apply_mask_ipv6() * no_ipv6_nd_prefix(): idem
Diffstat (limited to 'zebra/rtadv.c')
-rw-r--r--zebra/rtadv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 01f88336..c6771bbc 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -1202,6 +1202,7 @@ DEFUN (ipv6_nd_prefix,
vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE);
return CMD_WARNING;
}
+ apply_mask_ipv6 (&rp.prefix); /* RFC4861 4.6.2 */
rp.AdvOnLinkFlag = 1;
rp.AdvAutonomousFlag = 1;
rp.AdvRouterAddressFlag = 0;
@@ -1429,6 +1430,7 @@ DEFUN (no_ipv6_nd_prefix,
vty_out (vty, "Malformed IPv6 prefix%s", VTY_NEWLINE);
return CMD_WARNING;
}
+ apply_mask_ipv6 (&rp.prefix); /* RFC4861 4.6.2 */
ret = rtadv_prefix_reset (zebra_if, &rp);
if (!ret)