From: Lou Berger Date: Sat, 28 Oct 2017 19:04:20 +0000 (-0400) Subject: bgpd: set v4 next hop for VPN SAFI for consistency in processing X-Git-Tag: frr-4.0-dev~161^2~10 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b6453163d552508c6ba61e5706f70a5011bf2e85;p=mirror%2Ffrr.git bgpd: set v4 next hop for VPN SAFI for consistency in processing Signed-off-by: Lou Berger --- diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 2d3158d847..e5f85f7395 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -1635,6 +1635,10 @@ int bgp_mp_reach_parse(struct bgp_attr_parser_args *args, /* Nexthop length check. */ switch (attr->mp_nexthop_len) { + case BGP_ATTR_NHLEN_VPNV4: + stream_getl(s); /* RD high */ + stream_getl(s); /* RD low */ + /* NOTE: intentional fall through - for consistency in rx processing */ case BGP_ATTR_NHLEN_IPV4: stream_get(&attr->mp_nexthop_global_in, s, IPV4_MAX_BYTELEN); /* Probably needed for RFC 2283 */ @@ -1642,11 +1646,6 @@ int bgp_mp_reach_parse(struct bgp_attr_parser_args *args, memcpy(&attr->nexthop.s_addr, &attr->mp_nexthop_global_in, IPV4_MAX_BYTELEN); break; - case BGP_ATTR_NHLEN_VPNV4: - stream_getl(s); /* RD high */ - stream_getl(s); /* RD low */ - stream_get(&attr->mp_nexthop_global_in, s, IPV4_MAX_BYTELEN); - break; case BGP_ATTR_NHLEN_IPV6_GLOBAL: case BGP_ATTR_NHLEN_VPNV6_GLOBAL: if (attr->mp_nexthop_len == BGP_ATTR_NHLEN_VPNV6_GLOBAL) {