diff options
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_main.c | 3 | ||||
-rw-r--r-- | bgpd/bgp_open.c | 7 | ||||
-rw-r--r-- | bgpd/bgp_peer.c | 4 | ||||
-rw-r--r-- | bgpd/bgp_peer.h | 3 | ||||
-rw-r--r-- | bgpd/bgp_route.c | 1 | ||||
-rw-r--r-- | bgpd/bgp_vty.c | 5 |
6 files changed, 11 insertions, 12 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 7aed87cc..05868896 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -203,6 +203,7 @@ sighup (void) zlog_info ("bgpd restarting!"); /* Reload config file. */ + vty_reset(); vty_read_config (config_file, config_default); /* Create VTY's socket */ @@ -652,7 +653,7 @@ sighup_action(mqueue_block mqb, mqb_flag_t flag) { if (flag == mqb_action) { - bgp_terminate (0, 0); /* send notfies */ + bgp_terminate (0, 0); /* send notifies */ bgp_reset (); } 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) { diff --git a/bgpd/bgp_peer.c b/bgpd/bgp_peer.c index 54e84e49..bc112c24 100644 --- a/bgpd/bgp_peer.c +++ b/bgpd/bgp_peer.c @@ -200,7 +200,7 @@ bgp_session_has_established(bgp_peer peer) SET_FLAG (peer->sflags, PEER_STATUS_CAPABILITY_OPEN); /* Clear last notification data. */ - bgp_notify_unset(&(peer->notify)); + bgp_notify_unset(&(peer->session->notification)); /* Clear start timer value to default. */ peer->v_start = BGP_INIT_START_TIMER; @@ -954,8 +954,6 @@ peer_free (struct peer *peer) if (peer->session) bgp_session_free(peer->session); - bgp_notify_unset(&peer->notify) ; - bgp_sync_delete (peer); memset (peer, 0, sizeof (struct peer)); diff --git a/bgpd/bgp_peer.h b/bgpd/bgp_peer.h index de0be84f..b05d7e06 100644 --- a/bgpd/bgp_peer.h +++ b/bgpd/bgp_peer.h @@ -316,9 +316,6 @@ struct peer /* Announcement attribute hash. */ struct hash *hash[AFI_MAX][SAFI_MAX]; - /* Notify data. */ - bgp_notify notify; - /* Filter structure. */ struct bgp_filter filter[AFI_MAX][SAFI_MAX]; diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 37a39ffc..1beae6b2 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -3007,7 +3007,6 @@ bgp_cleanup_routes (void) void bgp_reset (void) { - vty_reset (); bgp_zclient_reset (); access_list_reset (); prefix_list_reset (); diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index f0462236..5452640b 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -7622,8 +7622,9 @@ bgp_show_peer (struct vty *vty, struct peer *p) VTY_NEWLINE); #endif - if (p->notify != NULL && p->notify->code == BGP_NOTIFY_OPEN_ERR - && p->notify->subcode == BGP_NOTIFY_OPEN_UNSUP_CAPBL) + if (p->session != NULL && p->session->notification != NULL + && p->session->notification->code == BGP_NOTIFY_OPEN_ERR + && p->session->notification->subcode == BGP_NOTIFY_OPEN_UNSUP_CAPBL) bgp_capability_vty_out (vty, p); vty_out (vty, "%s", VTY_NEWLINE); |