Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
bgpd: Allow peer-groups to have ttl-security hops configured
The command `neighbor PGROUP ttl-security hops X` was being
accepted but ignored.  Allow it to be stored.  I am still
not sure that this is applied correctly, but that is another
problem.

Fixes: FRRouting#7848
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
  • Loading branch information
donaldsharp committed Jan 15, 2021
1 parent f7f52f0 commit 8a66632
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bgpd/bgpd.c
Expand Up @@ -7150,6 +7150,7 @@ int is_ebgp_multihop_configured(struct peer *peer)
int peer_ttl_security_hops_set(struct peer *peer, int gtsm_hops)
{
struct peer_group *group;
struct peer *gpeer;
struct listnode *node, *nnode;
int ret;

Expand Down Expand Up @@ -7186,9 +7187,10 @@ int peer_ttl_security_hops_set(struct peer *peer, int gtsm_hops)
return ret;
} else {
group = peer->group;
group->conf->gtsm_hops = gtsm_hops;
for (ALL_LIST_ELEMENTS(group->peer, node, nnode,
peer)) {
peer->gtsm_hops = group->conf->gtsm_hops;
gpeer)) {
gpeer->gtsm_hops = group->conf->gtsm_hops;

/* Calling ebgp multihop also resets the
* session.
Expand All @@ -7198,7 +7200,7 @@ int peer_ttl_security_hops_set(struct peer *peer, int gtsm_hops)
* value is
* irrelevant.
*/
peer_ebgp_multihop_set(peer, MAXTTL);
peer_ebgp_multihop_set(gpeer, MAXTTL);
}
}
} else {
Expand Down

0 comments on commit 8a66632

Please sign in to comment.