diff options
author | Matthieu Boutier <boutier@pps.jussieu.fr> | 2012-01-20 17:53:57 +0100 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2012-03-25 18:06:53 +0200 |
commit | 6dfeb3f6cfaf89ce0e11421b48feb2965a43ffd6 (patch) | |
tree | 73b35ad02beef3db3e1b69a15c1c82e72c1bd287 /babeld/babeld.c | |
parent | babeld: add command (config) to set debug flags. (diff) | |
download | frr-6dfeb3f6cfaf89ce0e11421b48feb2965a43ffd6.tar.xz frr-6dfeb3f6cfaf89ce0e11421b48feb2965a43ffd6.zip |
babeld: fix bug due to v4mapped addresses.
Diffstat (limited to 'babeld/babeld.c')
-rw-r--r-- | babeld/babeld.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/babeld/babeld.c b/babeld/babeld.c index 6487bbe15..0cf8c8a1f 100644 --- a/babeld/babeld.c +++ b/babeld/babeld.c @@ -708,7 +708,7 @@ input_filter(const unsigned char *id, struct interface *ifp = NULL; struct prefix p; p.family = v4mapped(prefix) ? AF_INET : AF_INET6; - p.prefixlen = plen; + p.prefixlen = v4mapped(prefix) ? plen - 96 : plen; if (p.family == AF_INET) { uchar_to_inaddr(&p.u.prefix4, prefix); } else { @@ -730,7 +730,7 @@ output_filter(const unsigned char *id, const unsigned char *prefix, struct interface *ifp = NULL; struct prefix p; p.family = v4mapped(prefix) ? AF_INET : AF_INET6; - p.prefixlen = plen; + p.prefixlen = v4mapped(prefix) ? plen - 96 : plen; if (p.family == AF_INET) { uchar_to_inaddr(&p.u.prefix4, prefix); } else { @@ -752,7 +752,7 @@ redistribute_filter(const unsigned char *prefix, unsigned short plen, struct interface *ifp = NULL; struct prefix p; p.family = v4mapped(prefix) ? AF_INET : AF_INET6; - p.prefixlen = plen; + p.prefixlen = v4mapped(prefix) ? plen - 96 : plen; if (p.family == AF_INET) { uchar_to_inaddr(&p.u.prefix4, prefix); } else { |