summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Hall <GMCH@hestia.halldom.com>2010-09-13 17:04:29 +0100
committerChris Hall <GMCH@hestia.halldom.com>2010-09-13 17:04:29 +0100
commit7dce56f42593e60beb0c0403167e6ab1507f12a1 (patch)
treeabf33cfc05bed40b88d44e93c0acc30836031f18
parent0cadbd1f2cb40f8fb46c0fcc1e1732dc4c519850 (diff)
downloadquagga-7dce56f42593e60beb0c0403167e6ab1507f12a1.tar.bz2
quagga-7dce56f42593e60beb0c0403167e6ab1507f12a1.tar.xz
Fix to accept Route Refresh messages (message type 5).
Simple bug fix.
-rw-r--r--bgpd/bgp_connection.c6
-rw-r--r--bgpd/bgp_connection.h4
-rw-r--r--bgpd/bgp_msg_read.c2
3 files changed, 7 insertions, 5 deletions
diff --git a/bgpd/bgp_connection.c b/bgpd/bgp_connection.c
index e0bc88b6..0bdd4f3d 100644
--- a/bgpd/bgp_connection.c
+++ b/bgpd/bgp_connection.c
@@ -293,8 +293,10 @@ bgp_connection_make_primary(bgp_connection connection)
session->keepalive_timer_interval = connection->keepalive_timer_interval ;
session->as4 = connection->as4 ;
- session->route_refresh_pre = connection->route_refresh ;
- session->orf_prefix_pre = connection->orf_prefix ;
+ session->route_refresh_pre = connection->route_refresh
+ == bgp_form_pre ;
+ session->orf_prefix_pre = connection->orf_prefix
+ == bgp_form_pre ;
sockunion_set_dup(&session->su_local, connection->su_local) ;
sockunion_set_dup(&session->su_remote, connection->su_remote) ;
diff --git a/bgpd/bgp_connection.h b/bgpd/bgp_connection.h
index 304724cd..79270bd8 100644
--- a/bgpd/bgp_connection.h
+++ b/bgpd/bgp_connection.h
@@ -182,8 +182,8 @@ struct bgp_connection
unsigned keepalive_timer_interval ; /* subject to negotiation */
bool as4 ; /* subject to negotiation */
- bool route_refresh ; /* subject to negotiation */
- bool orf_prefix ; /* subject to negotiation */
+ bgp_form_t route_refresh ; /* subject to negotiation */
+ bgp_form_t orf_prefix ; /* subject to negotiation */
qtimer hold_timer ;
qtimer keepalive_timer ;
diff --git a/bgpd/bgp_msg_read.c b/bgpd/bgp_msg_read.c
index 3c78bcec..ee86df25 100644
--- a/bgpd/bgp_msg_read.c
+++ b/bgpd/bgp_msg_read.c
@@ -132,7 +132,7 @@ static bgp_msg_handler* const bgp_type_handler[] =
[qBGP_MT_UPDATE] = bgp_msg_update_receive,
[qBGP_MT_NOTIFICATION] = bgp_msg_notify_receive,
[qBGP_MT_KEEPALIVE] = bgp_msg_keepalive_receive,
- [qBGP_MT_ROUTE_REFRESH] = bgp_msg_keepalive_receive,
+ [qBGP_MT_ROUTE_REFRESH] = bgp_msg_route_refresh_receive,
[qBGP_MT_CAPABILITY] = bgp_msg_capability_receive,
[qBGP_MT_ROUTE_REFRESH_pre] = bgp_msg_route_refresh_receive
} ;