]> git.puffer.fish Git - matthieu/frr.git/commitdiff
When peering is done on link-local address, always store the local address
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 12 Jun 2015 14:59:08 +0000 (07:59 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 12 Jun 2015 14:59:08 +0000 (07:59 -0700)
in the peer structure so that it can be used in setting the link-local nexthop
in updates. This would ensure that in the absence of a global IPv6 address on
the peering interface, a route-map can be used to specify a potentially
arbitrary global v6 nexthop and that would be sent in conjunction with the
correct link-local nexthop.

bgpd/bgp_zebra.c

index 37c65eefceb8d843e4cb11cd6928b9792efb00fb..054b0916ab9bf94348e62fc81415d16fc2b1e197 100644 (file)
@@ -882,12 +882,16 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote,
 
          /* If there is no global address.  Set link-local address as
              global.  I know this break RFC specification... */
+          /* In this scenario, the expectation for interop is that the
+           * network admin would use a route-map to specify the global
+           * IPv6 nexthop.
+           */
          if (!ret)
            memcpy (&nexthop->v6_global, &local->sin6.sin6_addr, 
                    IPV6_MAX_BYTELEN);
-         else
-           memcpy (&nexthop->v6_local, &local->sin6.sin6_addr, 
-                   IPV6_MAX_BYTELEN);
+          /* Always set the link-local address */
+          memcpy (&nexthop->v6_local, &local->sin6.sin6_addr,
+                  IPV6_MAX_BYTELEN);
        }
     }