diff options
author | Chris Hall <GMCH@hestia.halldom.com> | 2010-01-27 11:11:54 +0000 |
---|---|---|
committer | Chris Hall <GMCH@hestia.halldom.com> | 2010-01-27 11:11:54 +0000 |
commit | ffb52b1a705814c52d2d1b41c7058897f11b5aa3 (patch) | |
tree | c3887b034c37b95577390c5d33d6d26c347975b2 /bgpd/bgp_connection.c | |
parent | 8bfae24fc3a8baaca3e419f261f132e454163f57 (diff) | |
download | quagga-ffb52b1a705814c52d2d1b41c7058897f11b5aa3.tar.bz2 quagga-ffb52b1a705814c52d2d1b41c7058897f11b5aa3.tar.xz |
Wiring up ROUTE-REFRESH and ORF handling. Work-in-progress.
modified: bgpd/bgp.h
modified: bgpd/bgp_common.c
modified: bgpd/bgp_common.h
modified: bgpd/bgp_connection.c
modified: bgpd/bgp_connection.h
modified: bgpd/bgp_fsm.c
modified: bgpd/bgp_fsm.h
modified: bgpd/bgp_msg_read.c
modified: bgpd/bgp_msg_read.h
modified: bgpd/bgp_msg_write.c
modified: bgpd/bgp_notification.c
modified: bgpd/bgp_notification.h
modified: bgpd/bgp_open_state.c
modified: bgpd/bgp_open_state.h
modified: bgpd/bgp_route_refresh.c
modified: bgpd/bgp_route_refresh.h
modified: lib/qafi_safi.h
Diffstat (limited to 'bgpd/bgp_connection.c')
-rw-r--r-- | bgpd/bgp_connection.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/bgpd/bgp_connection.c b/bgpd/bgp_connection.c index 5915b57f..c7935cf3 100644 --- a/bgpd/bgp_connection.c +++ b/bgpd/bgp_connection.c @@ -248,8 +248,8 @@ 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_pre ; - session->orf_prefix_pre = connection->orf_prefix_pre ; + session->route_refresh_pre = connection->route_refresh ; + session->orf_prefix_pre = connection->orf_prefix ; sockunion_set_mov(&session->su_local, &connection->su_local) ; sockunion_set_mov(&session->su_remote, &connection->su_remote) ; @@ -902,7 +902,7 @@ bgp_connection_read_action(qps_file qf, void* file_info) * * Exits loop iff completes a BGP message. */ - while (want > 0) + while (1) { ret = stream_read_nonblock(connection->ibuf, qps_file_fd(&connection->qf), want) ; @@ -922,6 +922,8 @@ bgp_connection_read_action(qps_file qf, void* file_info) want = bgp_msg_check_header(connection) ; /* returns balance of message */ + if (want == 0) + break ; } else { @@ -930,11 +932,11 @@ bgp_connection_read_action(qps_file qf, void* file_info) } ; } ; - if (want < 0) - return ; /* failed in header check */ - - /* Deal with the BGP message. MUST remove from ibuf before returns ! */ - bgp_msg_dispatch(connection) ; + /* Deal with the BGP message. MUST remove from ibuf before returns ! + * + * NB: size passed is the size of the *body* of the message. + */ + connection->msg_func(connection, connection->msg_body_size) ; /* Ready to read another message */ connection->read_pending = 0 ; |