summaryrefslogtreecommitdiffstats
path: root/proto
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-05-24 17:55:33 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-05-24 17:55:33 +0200
commitf571473ef3f78f6e38558d306d4d16ce7797e26c (patch)
treedbee9e6d24bf48a56607253199518000181a69cf /proto
parent8cc598a5205dbe46f5f249fa4f2de0586438965d (diff)
downloadbird-f571473ef3f78f6e38558d306d4d16ce7797e26c.tar
bird-f571473ef3f78f6e38558d306d4d16ce7797e26c.zip
Hello packets on PTP networks should have zero netmask.
This also ensures that misconfigured routers (one side ptp and one side broadcast) do not make adjacency.
Diffstat (limited to 'proto')
-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 4a35acd..45b6b61 100644
--- a/proto/ospf/hello.c
+++ b/proto/ospf/hello.c
@@ -225,7 +225,8 @@ ospf_hello_send(timer * timer, int poll, struct ospf_neighbor *dirn)
pkt->netmask = ipa_mkmask(ifa->iface->addr->pxlen);
ipa_hton(pkt->netmask);
- if (ifa->type == OSPF_IT_VLINK) pkt->netmask = IPA_NONE;
+ if ((ifa->type == OSPF_IT_VLINK) || (ifa->type == OSPF_IT_PTP))
+ pkt->netmask = IPA_NONE;
pkt->helloint = ntohs(ifa->helloint);
pkt->options = ifa->oa->opt.byte;
pkt->priority = ifa->priority;