]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: fix fast external fallover behavior
authorPradosh Mohapatra <pmohapat@cumulusnetworks.com>
Wed, 11 Sep 2013 03:33:55 +0000 (03:33 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Mon, 19 May 2014 21:25:39 +0000 (23:25 +0200)
commit8da8689d91a6436c17aca5000b1426aaea47e23c
treef4929119d4f41c668708d19374719765d7cb7f25
parent3374bef0412ac11815779f54321cbc4bf96da909
bgpd: fix fast external fallover behavior

ISSUES

1. When an interface goes down, the zclient callbacks are invoked
   in the following order: (a) address_delete() that removes the
   connected address list: ifp->connected, (b) interface_down()
   that performs "fast external fallover" operation. The operation
   relies on ifp->connected to look for peers that should be brought
   down. That's a cyclic dependency.

2. 'ttl-security' configuration handler sets peer->ttl to
   MAXTTL (so that BGP packets are sent with TTL=255, as per the
   requirement of ttl-security). This, however, is incompatible
   with 'fast external fallover' as the fallover operation checks
   for (ttl == 1) to determine directly connected peers.

3. The current fallover operation does not work for IPv6 address family.

PATCH

1. The patch removes the dependency on 'ifp->connected' list for fast
   fallover. The peer already contains a nexthop structure that reflects
   the peering address. The nexthop structure has a pointer to the
   interface (ifp) that peering address resolves to. Everytime the TCP
   connection succeeds, the ifp is updated. The patch uses this ifp in
   the interface_down() callback for a match for the peers that should be
   brought down.

2. The evaluation for directly connected peering is enhanced as
   'peer->ttl == 1' OR 'peer->gtsm_hops == 1'. Thus a ttl-security
   configuration on the peer with one hop is directly connected and
   should be brought down under 'fast external fallover'.

3. Because of fix (1), IPv6 address family works automatically.

Signed-off-by: Pradosh Mohapatra <pmohapat@cumulusnetworks.com>
Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_zebra.c