Skip to content

Commit

Permalink
bgpd
Browse files Browse the repository at this point in the history
  • Loading branch information
tufeigunchu committed Oct 8, 2024
1 parent c10e4d3 commit 3838bcd
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions bgpd/bgp_network.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ static int bgp_get_instance_for_inc_conn(int sock, struct bgp **bgp_inst)
}

if (!strlen(name)) {
*bgp_inst = bgp_get_default();
return 0; /* default instance. */
*bgp_inst = bgp_get_default(); /* default instance. */
return !*bgp_inst;
}

/* First try match to instance; if that fails, check for interfaces. */
Expand Down Expand Up @@ -520,10 +520,15 @@ static void bgp_accept(struct event *thread)

if (!peer1) {
if (bgp_debug_neighbor_events(NULL)) {
zlog_debug(
"[Event] %s connection rejected(%s:%u:%s) - not configured and not valid for dynamic",
inet_sutop(&su, buf), bgp->name_pretty, bgp->as,
VRF_LOGNAME(vrf_lookup_by_id(bgp->vrf_id)));
if(bgp) {
zlog_debug(
"[Event] %s connection rejected(%s:%u:%s) - not configured and not valid for dynamic",
inet_sutop(&su, buf), bgp->name_pretty, bgp->as,
VRF_LOGNAME(vrf_lookup_by_id(bgp->vrf_id)));
} else {
zlog_debug("[Event] %s connection rejected - not configured and not valid for dynamic",
inet_sutop(&su, buf));
}
}
close(bgp_sock);
return;
Expand Down

0 comments on commit 3838bcd

Please sign in to comment.