summaryrefslogtreecommitdiffstats
path: root/proto/ospf/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/ospf/packet.c')
-rw-r--r--proto/ospf/packet.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c
index fc60a42..88234da 100644
--- a/proto/ospf/packet.c
+++ b/proto/ospf/packet.c
@@ -192,3 +192,15 @@ sk_send_to_agt(sock *sk, u16 len, struct ospf_iface *ifa, u8 state)
if(n->state>=state)
sk_send_to(sk, len, n->ip, OSPF_PROTO);
}
+
+void
+sk_send_to_bdr(sock *sk, u16 len, struct ospf_iface *ifa)
+{
+ struct ospf_neighbor *n;
+
+ if(ipa_compare(ifa->drip,ipa_from_u32(0))!=0)
+ sk_send_to(sk, len, ifa->drip, OSPF_PROTO);
+ if(ipa_compare(ifa->bdrip,ipa_from_u32(0))!=0)
+ sk_send_to(sk, len, ifa->bdrip, OSPF_PROTO);
+}
+