summaryrefslogtreecommitdiff
path: root/proto/ospf/hello.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-04-17 13:06:40 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2013-04-17 13:06:40 +0200
commit8df02847e8af29863c325b7297e3a2b2ed5f961c (patch)
tree58b34a7cf7693fd08c9689e5b1726ef78034f6dc /proto/ospf/hello.c
parentcd3b02d198093abbbe671f647e4deb2470eb9cf1 (diff)
Fixes a compatibility issue in OSPFv2 PtP links.
BIRD used zero netmask in hello packets on all PtP links, not just on unnumbered ones. This patch fixes it and adds option 'ptp netmask' for overriding the default behavior. Thanks to Alexander V. Chernikov for the original patch.
Diffstat (limited to 'proto/ospf/hello.c')
-rw-r--r--proto/ospf/hello.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/proto/ospf/hello.c b/proto/ospf/hello.c
index 6ec5c511..d5aa1b95 100644
--- a/proto/ospf/hello.c
+++ b/proto/ospf/hello.c
@@ -253,7 +253,8 @@ ospf_hello_send(struct ospf_iface *ifa, int kind, struct ospf_neighbor *dirn)
#ifdef OSPFv2
pkt->netmask = ipa_mkmask(ifa->addr->pxlen);
ipa_hton(pkt->netmask);
- if ((ifa->type == OSPF_IT_VLINK) || (ifa->type == OSPF_IT_PTP))
+ if ((ifa->type == OSPF_IT_VLINK) ||
+ ((ifa->type == OSPF_IT_PTP) && !ifa->ptp_netmask))
pkt->netmask = IPA_NONE;
#endif