diff options
Diffstat (limited to 'bgpd/bgp_open.c')
-rw-r--r-- | bgpd/bgp_open.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c index 9e878784..7bcddca0 100644 --- a/bgpd/bgp_open.c +++ b/bgpd/bgp_open.c @@ -58,8 +58,11 @@ bgp_capability_vty_out (struct vty *vty, struct peer *peer) struct capability_mp_data mpc; struct capability_header *hdr; - pnt = (char*)peer->notify->data; - end = pnt + peer->notify->length; + if (peer == NULL || peer->session == NULL || peer->session->notification == NULL) + return; + + pnt = (char*)peer->session->notification->data; + end = pnt + peer->session->notification->length; while (pnt < end) { |