mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 11:44:16 +00:00
Merge pull request #17600 from donaldsharp/bfd_shared_network
Bfd shared network
This commit is contained in:
commit
38ca408c54
@ -744,6 +744,7 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
|
||||
int ret = 0;
|
||||
struct interface *ifp = NULL;
|
||||
bool v6_ll_avail = true;
|
||||
bool shared_network_original = peer->shared_network;
|
||||
|
||||
memset(nexthop, 0, sizeof(struct bgp_nexthop));
|
||||
|
||||
@ -838,9 +839,9 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
|
||||
if (!v6_ll_avail && !peer->conf_if)
|
||||
v6_ll_avail = true;
|
||||
if (if_lookup_by_ipv4(&remote->sin.sin_addr, peer->bgp->vrf_id))
|
||||
peer->shared_network = 1;
|
||||
peer->shared_network = true;
|
||||
else
|
||||
peer->shared_network = 0;
|
||||
peer->shared_network = false;
|
||||
}
|
||||
|
||||
/* IPv6 connection, fetch and store IPv4 local address if any. */
|
||||
@ -903,11 +904,14 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
|
||||
|| if_lookup_by_ipv6(&remote->sin6.sin6_addr,
|
||||
remote->sin6.sin6_scope_id,
|
||||
peer->bgp->vrf_id))
|
||||
peer->shared_network = 1;
|
||||
peer->shared_network = true;
|
||||
else
|
||||
peer->shared_network = 0;
|
||||
peer->shared_network = false;
|
||||
}
|
||||
|
||||
if (shared_network_original != peer->shared_network)
|
||||
bgp_peer_bfd_update_source(peer);
|
||||
|
||||
/* KAME stack specific treatment. */
|
||||
#ifdef KAME
|
||||
if (IN6_IS_ADDR_LINKLOCAL(&nexthop->v6_global)
|
||||
|
@ -1330,7 +1330,7 @@ struct peer {
|
||||
|
||||
union sockunion *su_local; /* Sockunion of local address. */
|
||||
union sockunion *su_remote; /* Sockunion of remote address. */
|
||||
int shared_network; /* Is this peer shared same network. */
|
||||
bool shared_network; /* Is this peer shared same network. */
|
||||
struct bgp_nexthop nexthop; /* Nexthop */
|
||||
|
||||
/* Roles in bgp session */
|
||||
|
@ -5,9 +5,11 @@ router bgp 100
|
||||
no bgp ebgp-requires-policy
|
||||
neighbor 172.16.1.1 remote-as 100
|
||||
neighbor 172.16.1.1 timers 3 10
|
||||
neighbor 172.16.1.1 timers connect 1
|
||||
neighbor 172.16.1.1 bfd profile fasttx
|
||||
neighbor 2001:db8:2::2 remote-as 200
|
||||
neighbor 2001:db8:2::2 timers 3 10
|
||||
neighbor 2001:db8:2::2 timers connect 1
|
||||
neighbor 2001:db8:2::2 ebgp-multihop 2
|
||||
neighbor 2001:db8:2::2 bfd profile slowtx
|
||||
address-family ipv4 unicast
|
||||
|
@ -2,6 +2,7 @@ router bgp 100
|
||||
bgp router-id 10.254.254.3
|
||||
neighbor 172.16.1.2 remote-as 100
|
||||
neighbor 172.16.1.2 timers 3 10
|
||||
neighbor 172.16.1.2 timers connect 1
|
||||
neighbor 172.16.1.2 bfd profile DOES_NOT_EXIST
|
||||
address-family ipv4 unicast
|
||||
redistribute connected
|
||||
|
@ -5,6 +5,7 @@ router bgp 200
|
||||
no bgp ebgp-requires-policy
|
||||
neighbor 2001:db8:1::2 remote-as 100
|
||||
neighbor 2001:db8:1::2 timers 3 10
|
||||
neighbor 2001:db8:1::2 timers connect 1
|
||||
neighbor 2001:db8:1::2 ebgp-multihop 2
|
||||
neighbor 2001:db8:1::2 bfd profile DOES_NOT_EXIST
|
||||
address-family ipv4 unicast
|
||||
|
Loading…
Reference in New Issue
Block a user