From 6b72ea4c14f87b2b738341e73c09e79eb138c477 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Thu, 11 Jul 2019 15:31:15 +0200 Subject: OSPF: N-bit should not be set for DBDES packets --- proto/ospf/dbdes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'proto/ospf/dbdes.c') diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c index d6904343..d7d2a057 100644 --- a/proto/ospf/dbdes.c +++ b/proto/ospf/dbdes.c @@ -121,7 +121,7 @@ ospf_prepare_dbdes(struct ospf_proto *p, struct ospf_neighbor *n) { struct ospf_dbdes2_packet *ps = (void *) pkt; ps->iface_mtu = htons(iface_mtu); - ps->options = ifa->oa->options; + ps->options = ifa->oa->options & ~OPT_N; ps->imms = 0; /* Will be set later */ ps->ddseq = htonl(n->dds); length = sizeof(struct ospf_dbdes2_packet); @@ -129,7 +129,7 @@ ospf_prepare_dbdes(struct ospf_proto *p, struct ospf_neighbor *n) else /* OSPFv3 */ { struct ospf_dbdes3_packet *ps = (void *) pkt; - ps->options = htonl(ifa->oa->options); + ps->options = htonl(ifa->oa->options & ~OPT_N); ps->iface_mtu = htons(iface_mtu); ps->padding = 0; ps->imms = 0; /* Will be set later */ -- cgit v1.2.3