diff options
Diffstat (limited to 'bgpd/bgp_bfd.c')
| -rw-r--r-- | bgpd/bgp_bfd.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index 1fad9f1c0f..50b00d21b1 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -151,8 +151,8 @@ void bgp_peer_config_apply(struct peer *p, struct peer_group *pg)  void bgp_peer_bfd_update_source(struct peer *p)  { -	struct bfd_session_params *session = p->bfd_config->session; -	const union sockunion *source; +	struct bfd_session_params *session; +	const union sockunion *source = NULL;  	bool changed = false;  	int family;  	union { @@ -162,6 +162,10 @@ void bgp_peer_bfd_update_source(struct peer *p)  	struct interface *ifp;  	union sockunion addr; +	if (!p->bfd_config) +		return; + +	session = p->bfd_config->session;  	/* Nothing to do for groups. */  	if (CHECK_FLAG(p->sflags, PEER_STATUS_GROUP))  		return;  | 
