summaryrefslogtreecommitdiff
path: root/proto/ospf/packet.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2012-05-15 23:40:37 +0200
committerOndrej Filip <feela@network.cz>2012-05-15 23:40:37 +0200
commit3fe1d9e4a40663b93b59f5b6f9d61af9dc6a8ae6 (patch)
treeb30ffa4a722d776714cfe979090ee15e5cd74376 /proto/ospf/packet.c
parent72b2db8db7534c52e928618410ec1f18787752c8 (diff)
parent95127cbbb76e8870e029454a5313bc4b6ce69a4a (diff)
Merge branch 'master' of ssh://git.nic.cz/bird
Diffstat (limited to 'proto/ospf/packet.c')
-rw-r--r--proto/ospf/packet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c
index 7a26967f..241a58f7 100644
--- a/proto/ospf/packet.c
+++ b/proto/ospf/packet.c
@@ -273,7 +273,7 @@ ospf_rx_hook(sock *sk, int size)
int src_local, dst_local UNUSED, dst_mcast;
src_local = ipa_in_net(sk->faddr, ifa->addr->prefix, ifa->addr->pxlen);
dst_local = ipa_equal(sk->laddr, ifa->addr->ip);
- dst_mcast = ipa_equal(sk->laddr, AllSPFRouters) || ipa_equal(sk->laddr, AllDRouters);
+ dst_mcast = ipa_equal(sk->laddr, ifa->all_routers) || ipa_equal(sk->laddr, AllDRouters);
#ifdef OSPFv2
/* First, we eliminate packets with strange address combinations.
@@ -287,6 +287,9 @@ ospf_rx_hook(sock *sk, int size)
if (!dst_mcast && !dst_local)
return 1;
+ /* Ignore my own broadcast packets */
+ if (ifa->cf->real_bcast && ipa_equal(sk->faddr, ifa->addr->ip))
+ return 1;
#else /* OSPFv3 */
/* In OSPFv3, src_local and dst_local mean link-local.