mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 05:18:47 +00:00
bgpd: peer->bgp must be non NULL
We lock and set peer->bgp at peer creation and only remove it at deletion. Therefore these tests are not needed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
c8f573499a
commit
5410015a79
@ -101,7 +101,7 @@ static void bgp_bfd_peer_sendmsg(struct peer *peer, int command)
|
||||
|
||||
bfd_info = (struct bfd_info *)peer->bfd_info;
|
||||
|
||||
if (peer->bgp && (peer->bgp->inst_type == BGP_INSTANCE_TYPE_VRF))
|
||||
if (peer->bgp->inst_type == BGP_INSTANCE_TYPE_VRF)
|
||||
vrf_id = peer->bgp->vrf_id;
|
||||
|
||||
if (command == ZEBRA_BFD_DEST_DEREGISTER) {
|
||||
|
@ -1377,7 +1377,7 @@ int bgp_start(struct peer *peer)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (peer->bgp && peer->bgp->vrf_id == VRF_UNKNOWN) {
|
||||
if (peer->bgp->vrf_id == VRF_UNKNOWN) {
|
||||
if (bgp_debug_neighbor_events(peer))
|
||||
zlog_err(
|
||||
"%s [FSM] In a VRF that is not initialised yet",
|
||||
|
@ -389,7 +389,7 @@ int bgp_generate_updgrp_packets(struct thread *thread)
|
||||
if (peer->status != Established)
|
||||
return 0;
|
||||
|
||||
if (peer->bgp && peer->bgp->main_peers_update_hold)
|
||||
if (peer->bgp->main_peers_update_hold)
|
||||
return 0;
|
||||
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user