Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd: Set correct TTL for the dynamic neighbor peers (backport #15121) #15148

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions bgpd/bgp_network.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,31 @@ static void bgp_accept(struct event *thread)
/* Dynamic neighbor has been created, let it proceed */
peer1->fd = bgp_sock;

if (bgp_set_socket_ttl(connection1) < 0) {
peer1->last_reset = PEER_DOWN_SOCKET_ERROR;
zlog_err("%s: Unable to set min/max TTL on peer %s (dynamic), error received: %s(%d)",
__func__, peer1->host,
safe_strerror(errno), errno);
return;
}

/* Set the user configured MSS to TCP socket */
if (CHECK_FLAG(peer1->flags, PEER_FLAG_TCP_MSS))
sockopt_tcp_mss_set(bgp_sock, peer1->tcp_mss);

<<<<<<< HEAD
bgp_fsm_change_status(peer1, Active);
EVENT_OFF(
peer1->t_start); /* created in peer_create() */
=======
frr_with_privs (&bgpd_privs) {
vrf_bind(peer1->bgp->vrf_id, bgp_sock,
bgp_get_bound_name(connection1));
}
bgp_peer_reg_with_nht(peer1);
bgp_fsm_change_status(connection1, Active);
EVENT_OFF(connection1->t_start);
>>>>>>> 68573c34d (bgpd: Set correct TTL for the dynamic neighbor peers)

if (peer_active(peer1)) {
if (CHECK_FLAG(peer1->flags,
Expand Down
Loading