Merge pull request #5583 from donaldsharp/multicast_nh

bgpd: Allow ipv4 multicast to use v4 nexthops
This commit is contained in:
Jafar Al-Gharaibeh 2019-12-22 12:37:37 -06:00 committed by GitHub
commit 959abfc76e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2905,7 +2905,9 @@ size_t bgp_packet_mpattr_start(struct stream *s, struct peer *peer, afi_t afi,
/* Nexthop AFI */
if (afi == AFI_IP
&& (safi == SAFI_UNICAST || safi == SAFI_LABELED_UNICAST))
&& (safi == SAFI_UNICAST ||
safi == SAFI_LABELED_UNICAST ||
safi == SAFI_MULTICAST))
nh_afi = peer_cap_enhe(peer, afi, safi) ? AFI_IP6 : AFI_IP;
else
nh_afi = BGP_NEXTHOP_AFI_FROM_NHLEN(attr->mp_nexthop_len);