]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospf: Fix type-4 network mask to 0 per RFC
authorLeonard Tracy <letracy@amazon.com>
Tue, 4 Dec 2012 19:02:35 +0000 (11:02 -0800)
committerScott Feldman <sfeldma@cumulusnetworks.com>
Mon, 7 Jan 2013 17:59:45 +0000 (09:59 -0800)
The OSPF RFC (2328) states that the network mask field of a type 4
LSA "is not meaningful and must be zero".  OSPFD has been setting
the mask as /32.  This patch changes OSPFD to set the mask to 0 per
the RFC

Signed-off-by: Scott Feldman <sfeldma@cumulusnetworks.com>
ospfd/ospf_lsa.c

index 66c7e1c0cce5cdef5fba2d024533cfee22550afb..fb55f7ff123f986eb2d328ceedc11791be701e0d 100644 (file)
@@ -1340,12 +1340,8 @@ static void
 ospf_summary_asbr_lsa_body_set (struct stream *s, struct prefix *p,
                                u_int32_t metric)
 {
-  struct in_addr mask;
-
-  masklen2ip (p->prefixlen, &mask);
-
   /* Put Network Mask. */
-  stream_put_ipv4 (s, mask.s_addr);
+  stream_put_ipv4 (s, (u_int32_t) 0);
 
   /* Set # TOS. */
   stream_putc (s, (u_char) 0);