]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Hello packets on PTP networks should have zero netmask.
authorOndrej Zajicek <santiago@crfreenet.org>
Sun, 24 May 2009 15:55:33 +0000 (17:55 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Sun, 24 May 2009 15:55:33 +0000 (17:55 +0200)
This also ensures that misconfigured routers (one side
ptp and one side broadcast) do not make adjacency.

proto/ospf/hello.c

index 4a35acde4868068e79c3a8791ce5050fc339b55d..45b6b613f99dfe0e0b0a8584d37e86d45e7cbd6c 100644 (file)
@@ -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;