diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-04-17 13:06:40 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-04-17 13:06:40 +0200 |
commit | 8df02847e8af29863c325b7297e3a2b2ed5f961c (patch) | |
tree | 58b34a7cf7693fd08c9689e5b1726ef78034f6dc /proto/ospf/iface.c | |
parent | cd3b02d198093abbbe671f647e4deb2470eb9cf1 (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/iface.c')
-rw-r--r-- | proto/ospf/iface.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c index 39084cef..9050f7b1 100644 --- a/proto/ospf/iface.c +++ b/proto/ospf/iface.c @@ -537,6 +537,9 @@ ospf_iface_new(struct ospf_area *oa, struct ifa *addr, struct ospf_iface_patt *i #ifdef OSPFv2 ifa->autype = ip->autype; ifa->passwords = ip->passwords; + ifa->ptp_netmask = !(addr->flags & IA_PEER); + if (ip->ptp_netmask < 2) + ifa->ptp_netmask = ip->ptp_netmask; #endif #ifdef OSPFv3 |