From b2f4a39527d4d1ed6d1ad5d0954bd232dae834f8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 May 2015 18:03:50 -0700 Subject: [PATCH] Make OSPF compliant to the last sentence of this section in RFC 2328 9.5 Sending Hello packets Hello packets are sent out each functioning router interface. They are used to discover and maintain neighbor relationships.[6] On broadcast and NBMA networks, Hello Packets are also used to elect the Designated Router and Backup Designated Router. The format of an Hello packet is detailed in Section A.3.2. The Hello Packet contains the router's Router Priority (used in choosing the Designated Router), and the interval between Hello Packets sent out the interface (HelloInterval). The Hello Packet also indicates how often a neighbor must be heard from to remain active (RouterDeadInterval). Both HelloInterval and RouterDeadInterval must be the same for all routers attached to a common network. The Hello packet also contains the IP address mask of the attached network (Network Mask). On unnumbered point-to-point networks and on virtual links this field should be set to 0.0.0.0. Signed-off-by: Vipin Kumar Reviewed-by: Vivek Venkatraman Reviewed-by: Dinesh G Dutt --- ospfd/ospf_packet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index 7a4d027843..8f0d8537fa 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -3103,7 +3103,8 @@ ospf_make_hello (struct ospf_interface *oi, struct stream *s) int flag = 0; /* Set netmask of interface. */ - if (oi->type != OSPF_IFTYPE_POINTOPOINT && + if (!(CHECK_FLAG(oi->connected->flags, ZEBRA_IFA_UNNUMBERED) && + oi->type == OSPF_IFTYPE_POINTOPOINT) && oi->type != OSPF_IFTYPE_VIRTUALLINK) masklen2ip (oi->address->prefixlen, &mask); else