summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_packet.c
diff options
context:
space:
mode:
authorAmol Lad <amol.lad@4rf.com>2021-01-07 09:04:00 +0100
committerReuben Dowle <reuben.dowle@4rf.com>2021-04-05 23:23:42 +0200
commit0c5506a856263828e8b0ed8e003203bd48ab569d (patch)
treec769ac6696493fd7ff72ccae78dc7c20322092b4 /ospfd/ospf_packet.c
parentnhrpd: Cleanup multicast nflog handler function (diff)
downloadfrr-0c5506a856263828e8b0ed8e003203bd48ab569d.tar.xz
frr-0c5506a856263828e8b0ed8e003203bd48ab569d.zip
ospfd: changes for PMP network /32 prefix length
Operation with PMP network on /32 prefix is needed for DMVPN Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
Diffstat (limited to 'ospfd/ospf_packet.c')
-rw-r--r--ospfd/ospf_packet.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index 0fd4803c7..3f01bf34d 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -907,8 +907,11 @@ static void ospf_hello(struct ip *iph, struct ospf_header *ospfh,
/* Compare network mask. */
/* Checking is ignored for Point-to-Point and Virtual link. */
+ /* Checking is also ignored for Point-to-Multipoint with /32 prefix */
if (oi->type != OSPF_IFTYPE_POINTOPOINT
- && oi->type != OSPF_IFTYPE_VIRTUALLINK)
+ && oi->type != OSPF_IFTYPE_VIRTUALLINK
+ && !(oi->type == OSPF_IFTYPE_POINTOMULTIPOINT
+ && oi->address->prefixlen == IPV4_MAX_BITLEN))
if (oi->address->prefixlen != p.prefixlen) {
flog_warn(
EC_OSPF_PACKET,
@@ -2427,6 +2430,11 @@ static int ospf_check_network_mask(struct ospf_interface *oi,
|| oi->type == OSPF_IFTYPE_VIRTUALLINK)
return 1;
+ /* Ignore mask check for max prefix length (32) */
+ if (oi->type == OSPF_IFTYPE_POINTOMULTIPOINT
+ && oi->address->prefixlen == IPV4_MAX_BITLEN)
+ return 1;
+
masklen2ip(oi->address->prefixlen, &mask);
me.s_addr = oi->address->u.prefix4.s_addr & mask.s_addr;