summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_packet.c
diff options
context:
space:
mode:
authorpaulo <paul@bayleaf.org.uk>2010-02-01 15:38:06 +0000
committerpaulo <paul@bayleaf.org.uk>2010-02-01 15:38:06 +0000
commit6e75be0d8cb3810692b78292f827b58f69a4c67c (patch)
tree5b853a822d332a36840f355d7851c06cf7985493 /bgpd/bgp_packet.c
parentd5f02454cbd702fe23c8977d49e1c5420b02e362 (diff)
downloadquagga-6e75be0d8cb3810692b78292f827b58f69a4c67c.tar.bz2
quagga-6e75be0d8cb3810692b78292f827b58f69a4c67c.tar.xz
In bgp_route.c bgp_maximum_prefix_overfow arrange for peer to be
disabled then enabled by timer. Replaced calls to bgp_peer_reenable with bgp_send_notify which updates peer->last_reset as well as reenabling peer.
Diffstat (limited to 'bgpd/bgp_packet.c')
-rw-r--r--bgpd/bgp_packet.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c
index cb696b9c..cd36723d 100644
--- a/bgpd/bgp_packet.c
+++ b/bgpd/bgp_packet.c
@@ -819,9 +819,9 @@ bgp_open_send (struct peer *peer)
}
#endif
-/* Send BGP notify packet with data potion. */
-void
-bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code,
+/* Generate notification object */
+static bgp_notify
+bgp_notification (struct peer *peer, u_char code, u_char sub_code,
u_char *data, size_t datalen)
{
bgp_notify notification;
@@ -846,7 +846,23 @@ bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code,
peer->last_reset = PEER_DOWN_NOTIFY_SEND;
}
- bgp_peer_reenable(peer, notification);
+ return notification;
+}
+
+/* Send BGP notify packet with data portion. Reenable peer*/
+void
+bgp_notify_send_with_data (struct peer *peer, u_char code, u_char sub_code,
+ u_char *data, size_t datalen)
+{
+ bgp_peer_reenable(peer, bgp_notification(peer, code, sub_code, data, datalen));
+}
+
+/* Send BGP notify packet with data portion. Disable peer*/
+void
+bgp_notify_send_with_data_disable (struct peer *peer, u_char code, u_char sub_code,
+ u_char *data, size_t datalen)
+{
+ bgp_peer_disable(peer, bgp_notification(peer, code, sub_code, data, datalen));
}
/* Send BGP notify packet. */