]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: encap: fix extension sizing
authorDavid Lamparter <equinox@opensourcerouting.org>
Fri, 25 Aug 2017 23:27:22 +0000 (01:27 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Fri, 25 Aug 2017 23:46:40 +0000 (01:46 +0200)
Variably-sized struct tails are done as [0], not [1].  The latter
triggers compiler warnings and mis-sizes "sizeof(struct) + n"
expressions.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_attr.h

index 324813c085dcea24220b38d0224957772ec0f6f1..4dd38459f81742dc3f32b69f3886d937abd7ab09 100644 (file)
@@ -72,7 +72,7 @@ struct bgp_attr_encap_subtlv {
        unsigned long refcnt;
        uint16_t type;
        uint16_t length;
-       uint8_t value[1]; /* will be extended */
+       uint8_t value[0]; /* will be extended */
 };
 
 #if ENABLE_BGP_VNC