summaryrefslogtreecommitdiffstats
path: root/zebra/redistribute.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2007-04-10 21:24:45 +0200
committerPaul Jakma <paul.jakma@sun.com>2007-04-10 21:24:45 +0200
commit6dc686a29ecdfa8f8011eee17e4e6276ab175a0d (patch)
treebd4a1f7b1c32318584bec6b4f420089aadc81b07 /zebra/redistribute.c
parent[bgpd] bug #352: IPv6/Multicast address-family config not written out (diff)
downloadfrr-6dc686a29ecdfa8f8011eee17e4e6276ab175a0d.tar.xz
frr-6dc686a29ecdfa8f8011eee17e4e6276ab175a0d.zip
[zebra] Bug #351: Don't redistribute routes to ipv4 link-local prefixes
2007-04-07 Paul Jakma <paul.jakma@sun.com> * lib/prefix.h: Add define to match IPv4 Link-Local addresses * zebra/redistribute.c: (zebra_check_addr) Don't redistribute routes to IPv4 link-local prefixes, fixes bug #351. * zebra/redistribute.h: Export zebra_check_addr. * zebra/router-id.c: (router_id_bad_address) re-use zebra_check_addr rather than implementing similar logic.
Diffstat (limited to 'zebra/redistribute.c')
-rw-r--r--zebra/redistribute.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 677e6f908..b7bd5674a 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -40,7 +40,7 @@
/* master zebra server structure */
extern struct zebra_t zebrad;
-static int
+int
zebra_check_addr (struct prefix *p)
{
if (p->family == AF_INET)
@@ -50,7 +50,9 @@ zebra_check_addr (struct prefix *p)
addr = p->u.prefix4.s_addr;
addr = ntohl (addr);
- if (IPV4_NET127 (addr) || IN_CLASSD (addr))
+ if (IPV4_NET127 (addr)
+ || IN_CLASSD (addr)
+ || IPV4_LINKLOCAL(addr))
return 0;
}
#ifdef HAVE_IPV6