]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Workaround for invalid MBGP next hop
authorMichael Lambert <lambert@psc.edu>
Tue, 28 Jul 2009 15:26:14 +0000 (11:26 -0400)
committerPaul Jakma <paul@quagga.net>
Thu, 30 Jul 2009 14:55:14 +0000 (15:55 +0100)
* bgp_attr.c: (bgp_mp_reach_parse) There are some interoperability issues
  for MBGP (particularly IPv4 multicast NLRI) between different
  implementations.  In order to get some next hops to install correctly in
  the BGP tables, it appears to be necessary to copy the multiprotocol next
  hop into the base next hop field.  This is related to differences in RFC
  2283 and RFC 2858.

bgpd/bgp_attr.c

index a664858c5d700ac3a5010bea4d29ba2f023217f1..5e7536aed4dd18226e3dbc9e335d3526d9a9d337 100644 (file)
@@ -1333,6 +1333,9 @@ bgp_mp_reach_parse (struct peer *peer, bgp_size_t length, struct attr *attr,
     {
     case 4:
       stream_get (&attre->mp_nexthop_global_in, s, 4);
+      /* Probably needed for RFC 2283 */
+      if (attr->nexthop.s_addr == 0)
+        memcpy(&attr->nexthop.s_addr, &attre->mp_nexthop_global_in, 4);
       break;
     case 12:
       {