| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This ensures that the two branches are consistent after the merging
of the old-Quagga 0.99.18 changes.
Release: 0.99.18ex16p.
Eliminated some whitespace differences !
Collected RESTRICTED_NODE show_bgp_ipv6_safi_route_cmd and
show_bgp_ipv6_safi_prefix_cmd, and one HAVE_IPV6 skip. Also releasing
filename in closezlog().
Removed strlen() from lib/qfstring.c for async-signal-safe purposes.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Release: 0.99.18ex14
Also fixes issue with unknown attributes -- does not release them prematurely.
Contains the "bgpd: New show commands for improved view and address family support", which is post 0.99.18. (But not RFC 5082 GTSM.)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
modified: bgpd/bgp_connection.c
modified: bgpd/bgp_debug.c
modified: bgpd/bgp_engine.h
modified: bgpd/bgp_main.c
modified: bgpd/bgp_packet.c
modified: bgpd/bgp_peer.c
modified: bgpd/bgp_route.c
modified: bgpd/bgp_routemap.c
modified: bgpd/bgp_session.c
modified: bgpd/bgp_vty.c
modified: bgpd/bgpd.c
modified: bgpd/bgpd.h
modified: configure.ac
modified: isisd/dict.h
modified: isisd/isis_misc.c
modified: isisd/isis_routemap.c
modified: isisd/isis_spf.c
modified: lib/Makefile.am
modified: lib/command.c
modified: lib/command.h
modified: lib/command_execute.h
modified: lib/command_parse.c
modified: lib/command_parse.h
modified: lib/command_queue.c
modified: lib/command_queue.h
modified: lib/elstring.h
modified: lib/heap.c
modified: lib/if.c
modified: lib/if.h
modified: lib/keychain.c
modified: lib/keystroke.c
modified: lib/keystroke.h
modified: lib/list_util.c
modified: lib/list_util.h
modified: lib/log.c
modified: lib/log.h
modified: lib/memory.c
modified: lib/memory.h
modified: lib/memtypes.c
modified: lib/misc.h
modified: lib/mqueue.c
modified: lib/mqueue.h
deleted: lib/node_type.h
modified: lib/pthread_safe.c
modified: lib/qfstring.c
modified: lib/qiovec.c
modified: lib/qiovec.h
modified: lib/qpath.c
modified: lib/qpnexus.c
modified: lib/qpnexus.h
modified: lib/qpselect.c
modified: lib/qpthreads.h
modified: lib/qstring.c
modified: lib/qstring.h
modified: lib/qtime.c
modified: lib/qtime.h
modified: lib/qtimers.c
modified: lib/qtimers.h
modified: lib/routemap.c
modified: lib/symtab.h
modified: lib/thread.h
deleted: lib/uty.h
modified: lib/vector.c
modified: lib/vector.h
modified: lib/version.h.in
modified: lib/vio_fifo.c
modified: lib/vio_fifo.h
modified: lib/vio_lines.c
modified: lib/vio_lines.h
modified: lib/vty.c
modified: lib/vty.h
modified: lib/vty_cli.c
modified: lib/vty_cli.h
modified: lib/vty_io.c
modified: lib/vty_io.h
modified: lib/vty_io_basic.c
modified: lib/vty_io_basic.h
modified: lib/vty_io_file.c
modified: lib/vty_io_file.h
modified: lib/vty_io_shell.c
modified: lib/vty_io_term.c
modified: lib/vty_io_term.h
modified: lib/vty_local.h
modified: lib/vty_pipe.c
modified: lib/workqueue.h
modified: lib/zebra.h
modified: ospf6d/ospf6_lsa.c
modified: ripngd/ripngd.c
modified: tests/test-list_util.c
modified: tests/test-vector.c
modified: vtysh/vtysh.c
modified: vtysh/vtysh_config.c
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bgpd/bgp_aspath.c
* assegments_parse(): add handling of AS4_PATH input, update bounds
checks, add check for AS segment type
* aspath_parse(): add handling of AS4_PATH input, expect
assegments_parse() to do length checking
* aspath_empty(): update for the new function prototype
* bgpd/bgp_aspath.h: ditto
* tests/aspath_test.c: ditto
* bgpd/bgp_attr.c
* bgp_attr_aspath(): add handling of AS4_PATH input, update flags
checks, change returned type
* bgp_attr_as4_path(): discard, superseded by bgp_attr_aspath()
* bgp_attr_parse(): update respectively
Bump version to "ex06" (configure.c).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a reported assert() in 'no neighbor xxx'.
It also fixes other issues found when reviewing and testing that.
Also fixed is a reported segfault caused by prefix lists without explicit
sequence numbers.
Peer State
==========
Tightened up the peer state handling, including:
* shades of pIdle -- depending on some peer flags and the session, if any
* state transitions -- particularly pEstablished -> pIdle or pClearing
* handling if deleting peer and associated session
* handling of PEER_DOWN_XXX -- why peer was last downed
* handling of last NOTIFICATION sent/received
RS Client RIBs
==============
Cleared up places where RS Client RIBs were not disposed of properly when a
peer's afi/safi state changed, in particular:
-- when deactivating an afi/safi
-- when unsetting the rs client state for an afi/safi
-- when binding a peer to a group for an afi/safi
In the past these issues were probably invisible, except for a slight leak of
memory. With the newer code these issues triggered some asserts when closing
down a peer or the entire program.
Program Termination
===================
Now terminates by deleting all peers -- essentially 'no neighbor' for all
peers. Each time a peer is set to be deleted bm->peer_linger_count is
incremented, when the peer finally is deleted, the count is decremented.
So while in program_terminating state, all nexuses continue to run until
the Routing Engine spots that there are no peers left to delete. Then all
nexuses are shut down and the program finally terminates. To do this, when
termination starts a new Routing Engine foreground task is added, which
calls program_terminate_if_all_peers_deleted().
Accept() Status for Session
===========================
The accept() code needs to find the session associated with the incoming IP
address. Then it needs to see if can accept the incoming connection.
It looks up the IP address in the Peer Index (under its Mutex).
Previously: the Peer Index entry contained a pointer to the accepting
connection (if any), and the session had a pointer to the Peer Index entry
so that it could set/clear the accept field in that entry.
Now: have removed the accept field in the Peer Index entry, and the pointer
from the session to that entry.
There is now an "accept" flag in the session structure -- so setting/clearing
accept does not have to fiddle with any state to do with the peer. Which
seems cleaner.
To find the session, the accept() code goes via the Peer Index and then via
the peer to find the session. This is done under the Peer Index Mutex. To
support that, the Routing Engine only changes the peer->session pointer under
the same Mutex.
General Changes
===============
1. name changes: peer_lock -> bgp_peer_lock etc.
2. bgp_notify_send -> bgp_peer_down_error
bgp_notify_send_with_data -> bgp_peer_down_error_with_data
3. name changes: bgp_peer_sIdle -> bgp_peer_pIdle etc.
4. changing int to bool
5. added "received" flag to bgp_notify structure
Files Affected
==============
configure.ac -- set version to 0.99.15ex02
bgpd/bgp.h -- format changes only
bgpd/bgp_advertise.c -- (1)
bgpd/bgp_attr.c -- (2)
bgpd/bgp_common.h -- (3)
bgpd/bgp_connection.c -- (4) for session->active
- adding session->accept flag
- removing peer index accept entry
- adding bgp_connection_query_accept()
bgpd/bgp_connection.h -- adding bgp_connection_query_accept()
bgpd/bgp_debug.c -- (3) (5)
- changed bgp_notify_print() to remove "sending"
parameter and use (5)
bgpd/bgp_debug.h -- changed bgp_notify_print()
bgpd/bgp_fsm.c -- added TODO for NSF and for
CollisionDetectEstablishedState
bgpd/bgp_main.c -- (4) for various flags
- added static bool program_terminating
- used "mqb_priority" name instead of "1"
- ignore SIGHUP and SIGTERM messages once is
"program_terminating"
- added program_terminate_if_all_peers_deleted()
- in SIGTERM: set program_terminating and add
the foreground hook.
bgpd/bgp_mplsvpn.c -- (3)
bgpd/bgp_msg_read.c -- (5) set the "received" flag on incoming
notifications
- update call of bgp_notify_print()
bgpd/bgp_msg_write.c -- update call of bgp_notify_print()
bgpd/bgp_network.c -- (4)
bgpd/bgp_nexthop.c -- (3)
bgpd/bgp_notification.c -- add "received" flag to notification structure,
which is false by default.
bgpd/bgp_notification.h -- add "received" flag to notification structure
- add bgp_notify_set_received()
- add bgp_notify_get_received()
bgpd/bgp_open.c -- (2)
bgpd/bgp_open_state.c -- in bgp_peer_open_state_receive():
- copy the session->hold_timer_interval
and session->keepalive_timer_interval
values (as negotiated by the BGP Engine)
into the peer
- set PEER_CAP_RESTART_RCV if have
- fix typo, use: open_recv->can_preserve
not: open_recv->can_g_restart
bgpd/bgp_packet.c -- delete bgp_notify_send() and
bgp_notify_send_with_data()
- (1) (2) (3)
- bgp_clear_route_normal() -> bgp_clear_routes()
and now returns "completed" state.
bgpd/bgp_packet.h -- delete: bgp_keepalive_send()
bgp_open_send()
bgp_notify_send()
bgp_notify_send_with_data()
bgpd/bgp_peer.c -- changed:
bgp_session_has_established()
bgp_session session()
bgp_session_has_disabled()
to void and to take session, not peer.
- removed lock of session structure in
bgp_session_do_event() -- was holding the lock
for far longer than necessary, particularly
when clearing routes !
- in bgp_session_has_established():
- lock session structure where and only where
required
- tidied up timer handling
- in bgp_session_has_stopped():
- extend IdleHoldTime
- examine notification etc to see why session
came down.
- invoke bgp_peer_down_notify(), which will
start the process of downing the peer.
- in bgp_session_has_disabled():
- removed defer_enable
- removed calls to bgp_peer_stop() etc. That
is done in bgp_peer_down() et all.
- now if session is marked delete_me, then do
that; otherwise, can enable again.
- removed program_terminate_if_all_disabled(),
replaced by new mechanism
- in bgp_peer_stop():
- changed to void function and added nsf
parameter.
- sets pClearing state.
- MUST now only be called when pEstablished.
- removed some code to bgp_peer_reset_idle().
So... bgp_peer_stop() brings pEstablished
peer to halt, while bgp_peer_reset_idle()
prepares it for new session.
- now passes nsf to bgp_clear_all_routes(),
which returns flag to say whether task is
complete or whether it continues in
background.
- clearing of NSF_MODE and flags moved to
bgp_peer_reset_idle().
- sets pIdle state if route clearing completed
- renamed peer_nsf_stop() -> bgp_peer_nsf_stop()
- if is pIdle or pClearing and have NSF
routes, then stops timers and clears out
all the NSF routes.
- added bgp_peer_clear_all_stale_routes()
- added bgp_peer_shutdown() -- used when peer
is downed for PEER_DOWN_USER_SHUTDOWN !
- added bgp_peer_reset_idle() -- used when peer
goes pIdle or is about to enable session.
- deleted bgp_peer_timers_stop() -- see
bgp_peer_change_status().
- replaced bgp_peer_clearing_completed()
- if pClearing, sets pIdle and enables if can
- if pDeleting, unlocks peer
- replaced bgp_timer_set() by
bgp_peer_timers_set() -- deals in new peer
states only.
- renamed peer_new() -> bgp_peer_new()
- renamed peer_create() -> bgp_peer_create()
- added setting of PEER_STATUS_REAL_PEER
- changed auto activation to reflect what
actually happens.
- changed bgp_session_init_new() call because
it now sets peer->session.
- sets timers suitable for pIdle. before any
auto enable.
- renamed peer_delete() -> bgp_peer_delete()
- removed call of peer_nsf_stop()
- added bgp_peer_down() with
PEER_DOWN_NEIGHBOR_DELETE -- which does all
the work of flattening an active peer, and
returns it pIdle or pClearing.
- if pClearing, lock the peer so that when
clearing completes, it can unlock it.
- sets pDeleting state, and increments
bm->peer_linger_count.
- tightened procedure for dealing with various
references to peer -- including use of the
PEER_STATUS_REAL_PEER flag.
- tidied up dealing with rsclient RIBs and
shared pointers to group versions of same.
- removed call of bgp_timer_set(), now done
in bgp_peer_change_status().
- now unregisters the peer immediately, so
can register a new one before this one
is completely deleted.
- deletes session if it can.
- moved peer_lock() & peer_unlock() from bgpd.c
and renamed bgp_peer_lock() & bgp_peer_unlock()
- renamed peer_free() bgp_peer_free() and made
static.
- peer must be pDeleting -- so have been
through bgp_peer_delete()
- peer->session must be NULL
- decrements bm->peer_linger_count
- deleted peer->clear_node_queue handling
- deleted bgp_session_free() -- that's done
in bgp_peer_delete() or elsewhere.
- unlocked bgp at end
- assert peer->session == NULL, to be sure
- set peer->lock == -54321
- in bgp_peer_enable():
- recast as switch() on peer state
- added bgp_peer_reset)idle() before enabling
the session.
- renamed bgp_peer_disable() -> bgp_peer_down()
- takes PEER_DOWN_XXX argument, which drives
what notification is sent, and sets the
peer->last_reset status. A small number of
PEER_DOWN_XXX are special.
- removed the IdleHoldTimer stuff.
- copies outbound notification to session.
- for PEER_DOWN_NSF_CLOSE_SESSION, keep non-
stale routes.
- for PEER_DOWN_USER_SHUTDOWN, do
bgp_peer_shutdown()
- after disabling any session and doing any
shutdown, proceed as per peer->status:
pIdle -- flush stale routes
bgp_peer_enable()
pEstablished -- bgp_peer_stop()
pClearing -- flush stale routes
- added bgp_peer_down_notify().
- added bgp_peer_down_error(), which replaces
bgp_notify_send().
- added bgp_peer_down_error_with_data(), which
replaces bgp_notify_send_with_data()
The "down_error" functions calculate the
appropriate PEER_DOWN_XXX value, and call
bgp_peer_down_notify().
- added bgp_peer_map_peer_down(), to map
PEER_DOWN_XXX to a notification message.
- added bgp_peer_map_notification, to map
notification message to a PEER_DOWN_XXX.
- renamed peer_change_status() ->
bgp_peer_change_status()
- do most things only if state changes.
- add call to bgp_peer_reset_idle() as enter
pIdle state.
- at all times do bgp_peer_timer_set()
- renamed peer_timers_set() ->
bgp_peer_timers_set()
- commoned up code for Graceful Restart and
Graceful Restart Stale timers and stale routes.
- changed Graceful Restart Stale time to cope if
it should expire before Graceful Restart !
bgpd/bgp_peer.h -- added PEER_DOWN_XXX values and tidied up
+ PEER_DOWN_NULL
+ PEER_DOWN_UNSPECIFIED
+ PEER_DOWN_CONFIG_CHANGE
+ PEER_DOWN_AF_DEACTIVATE
+ PEER_DOWN_PASSWORD_CHANGE
+ PEER_DOWN_ALLOWAS_IN_CHANGE
+ PEER_DOWN_INTERFACE_DOWN
+ PEER_DOWN_MAX_PREFIX
+ PEER_DOWN_HEADER_ERROR
+ PEER_DOWN_OPEN_ERROR
+ PEER_DOWN_UPDATE_ERROR
+ PEER_DOWN_HOLD_TIMER
+ PEER_DOWN_FSM_ERROR
+ PEER_DOWN_DYN_CAP_ERROR
- PEER_DOWN_NOTIFY_SEND (deleted)
- added typedef peer_down_t
- struct peer:
- deleted redundant clear_node_queue
- removed PEER_STATUS_ACCEPT_PEER flag
- added PEER_STATUS_REAL_PEER flag
- (3)
- deleted bgp_peer_reenable() -- redundant
- deleted bgp_peer_stop() -- now static
- replaced bgp_peer_disable() by bgp_peer_down()
- added bgp_peer_down_error()
- added bgp_peer_down_error_with_data()
- deleted peer_change_status() -- now static
- renamed peer_new() -> bgp_peer_new()
- renamed peer_create() -> bgp_peer_create()
- renamed peer_delete() -> bgp_peer_delete()
- added bgp_peer_lock()
- added bgp_peer_unlock()
- deleted peer_free()
- deleted peer_nsf_stop()
bgpd/bgp_peer_index.c -- removed accept entry from bgp_peer_index_entry
structure
- added explicit next_free entry to the structure
- sets next_free to point at self in entries
which are in use -- and checks this.
- change bgp_peer_index_seek_accept() to link to
session via the peer data structure, and to
call bgp_connection_query_accept() under the
Peer Index Mutex.
- (4) for bgp_peer_index_seek_accept()
bgpd/bgp_peer_index.h -- removed accept entry from bgp_peer_index_entry
structure
- added explicit next_free entry to the structure
- (4) for bgp_peer_index_seek_accept()
bgpd/bgp_route.c -- (1) (2) (3)
- in bgp_process_rsclient(), bgp_process_main(),
and bgp_processq_del():
- extra dasserts()
- clear rn->wq_next
- unlock table *after* unlock node (bug fix)
- in bgp_process(), lock bgp before table.
- in bgp_maximum_prefix_restart_timer(), replace
call of peer_clear() by unset of flag and
bgp_peer_enable() -- peer is already down.
- added bgp_maximum_prefix_cancel_timer()
- deleted bgp_clear_this_route() -- code now
inline in only caller.
- renamed bgp_clear_route_normal() ->
bgp_clear_routes()
- takes an "nsf" argument to invoke NSF
"clearing", iff nsf set for afi/safi. Sets
PEER_STATUS_NSF_WAIT if so.
- returns bool "completed" if clearing has
completed immediately -- ie no background
work left to be done.
- renamed bgp_clear_route_all() ->
bgp_clear_all_routes()
- takes "nsf" argument and returns "completed"
as for bgp_clear_routes().
- removed call: bgp_peer_clearing_completed()
- renamed bgp_clear_route_rsclient() ->
bgp_clear_rsclient_rib()
- deleted bgp_cleanup_routes() -- was used
during termination, no longer required because
termination deletes all peers.
bgpd/bgp_route.h -- deleted bgp_cleanup_routes() -- program
termination now deletes all peers, which
implicitly cleans up all routes.
- renamed: bgp_clear_route_normal() ->
bgp_clear_routes()
- renamed: bgp_clear_route_rsclient() ->
bgp_clear_rsclient_rib()
- renamed: bgp_clear_route_all() ->
bgp_clear_all_routes()
- added: bgp_maximum_prefix_cancel_timer()
bgpd/bgp_session.c -- (3)
- deleted bgp_session_defer_if_limping()
- in bgp_session_init_new()
- changed to void and removed session argument
-- always creates a new session
- peer MUST not have a session
- removed Peer Index pointer stuff as Peer
Index no longer has accept field
- sets session->peer and locks peer
- sets peer->session under Peer Index Mutex
- sets session->delete_me false
- sets session->accept flag false
- replaced bgp_session_free() by
bgp_session_delete()
- changed to void function
- if session is active, set the delete_me flag
so session will be deleted when goes
sDisabled.
- make sure that session Mutex has been
released by the BGP Engine before destroying
it... otherwise: tears.
- unhook session from peer under Peer Index
mutex -- for accept() stuff.
- unhook peer from session.
- unlock peer.
- in bgp_session_enable()
- assert that peer is pIdle.
- clear delete_me for completeness
- clear additional fields
- in bgp_session_disable()
- clear session->accept
- in bgp_session_is_active()
- no longer interested in Peer Index stuff
- deleted bgp_session_defer_if_limping()
bgpd/bgp_session.h -- in bgp_session structure:
- removed index_entry pointer to Peer Index
- added delete_me flag
- removed defer_enable flag
- added accept flag
- removed session parameter from
bgp_session_init_new()
- deleted bgp_session_free()
- added bgp_session_delete()
- bgp_session_is_active() now returns bool
bgpd/bgp_table.c -- bgp_node_free() sets lock count = -54321
- in bgp_table_free():
- assert that route node is empty
- set lock count = -54321
- bgp_node_delete() asserts that is not on_wq
- (1)
bgpd/bgp_vty.c -- (1) (3) (4)
- change peer_af_flag_modify_vty() to call
peer_af_flag_modify() not set or unset.
- change name: bgp_clear_route_rsclient() ->
bgp_clear_rsclient_rib()
- in peer_rsclient_set_vty():
- add peer to bgp->rsclient list after all
validation is complete
- in peer_rsclient_unset_vty():
- removed code for deleting the rsclient RIB
etc to peer_rsclient_unset().
- added peer_rsclient_unset()
bgpd/bgp_zebra.c -- bgp_peer_disable() -> bgp_peer_down() and now
takes PEER_DOWN_INTERFACE_DOWN argument.
bgpd/bgpd.c -- (1) (3)
- replaced setting peer->last_reset and call of
bgp_notify_send() by call of the new
bgp_peer_down().
- bgp_router_id_set()
... PEER_DOWN_RID_CHANGE
- bgp_cluster_id_set()
... PEER_DOWN_CLID_CHANGE
- bgp_cluster_id_unset()
... PEER_DOWN_CLID_CHANGE
- bgp_confederation_id_set()
... PEER_DOWN_CONFED_ID_CHANGE
... PEER_DOWN_CONFED_ID_CHANGE
- bgp_confederation_id_unset()
... PEER_DOWN_CONFED_ID_CHANGE
- bgp_confederation_peers_add()
... PEER_DOWN_CONFED_PEER_CHANGE
- bgp_confederation_peers_remove()
... PEER_DOWN_CONFED_PEER_CHANGE
- peer_as_change()
... PEER_DOWN_REMOTE_AS_CHANGE
- peer_activate()
... PEER_DOWN_AF_ACTIVATE
- peer_deactivate()
... PEER_DOWN_AF_DEACTIVATE
- peer_group_bind()
... PEER_DOWN_RMAP_BIND
- peer_group_unbind()
... PEER_DOWN_RMAP_UNBIND
- peer_change_action()
... why_changed
... why_changed
- peer_flag_modify_action()
... action->peer_down
- peer_update_source_if_set()
... PEER_DOWN_UPDATE_SOURCE_CHANGE
... PEER_DOWN_UPDATE_SOURCE_CHANGE
- peer_update_source_addr_set()
... PEER_DOWN_UPDATE_SOURCE_CHANGE
... PEER_DOWN_UPDATE_SOURCE_CHANGE
- peer_update_source_unset()
... PEER_DOWN_UPDATE_SOURCE_CHANGE
... PEER_DOWN_UPDATE_SOURCE_CHANGE
- peer_local_as_set()
... PEER_DOWN_LOCAL_AS_CHANGE
... PEER_DOWN_LOCAL_AS_CHANGE
- peer_local_as_unset()
... PEER_DOWN_LOCAL_AS_CHANGE
... PEER_DOWN_LOCAL_AS_CHANGE
- peer_password_set()
... PEER_DOWN_PASSWORD_CHANGE
... PEER_DOWN_PASSWORD_CHANGE
- peer_password_unset()
... PEER_DOWN_PASSWORD_CHANGE
... PEER_DOWN_PASSWORD_CHANGE
- peer_clear()
... PEER_DOWN_USER_RESET
- bgp_terminate()
... PEER_DOWN_USER_RESET
- deleted peer_lock() & peer_unlock(). See
bgp_peer_lock() & bgp_peer_unlock() in bgp_peer
- in peer_as_change(), move downing of peer to
after all config changes have been made.
- in peer_remote_as() implicitly activate iff
!BGP_FLAG_NO_DEFAULT and is IPv4/Unicast.
(but only ever called with IPv4/Unicast or
nothing at all.)
- in peer_deactivate()
- if cannot dynamically reconfigure, then will
down the peer PEER_DOWN_AF_DEACTIVATE.
- uses new peer_rsclient_unset() to tidy away
any rsclient RIB etc.
- in peer_change_action():
- added 'why_down' argument
- replace if's by switch()
- in struct peer_flag_action, updated entry types
- in peer_flag_action_list[], added the
appropriate PEER_DOWN_XXX values.
- in peer_af_flag_action_list[]
- added the appropriate PEER_DOWN_XXX values
- added multiple flag entries
- in peer_flag_action_set():
- changed to return const address of
peer_flag_action structure -- or NULL.
- table may now contain entries which the
given flag must be a subset of.
- in peer_flag_modify_action():
- now takes peer_flag_action* and whether flag
has been set or not.
- allow *only* peer_change_none or
peer_change_reset
- deal with clearing PEER_FLAG_SHUTDOWN,
otherwise bgp_peer_down().
- in peer_group_bind():
- uses new peer_rsclient_unset() to tidy away
any rsclient RIB etc.
- in peer_flag_modify():
- takes bool set flag
- changed to suit peer_flag_action_set() and
peer_flag_modify_action()
- in peer_flag_set() and peer_flag_unset()
changed to bool flag
- added peer_af_flag_modify_action(), common
code for use in peer_af_flag_modify().
- in peer_af_flag_modify():
- takes bool set flag
- changed to suit peer_flag_action_set() and
peer_flag_modify_action()
- use peer_af_flag_modify_action()
- in peer_af_flag_set() and peer_af_flag_unset()
changed to bool flag
- in peer_clear(): adjust for new bgp_peer_down()
mechanics.
- in bgp_master_init(): account for
peer_linger_count (starting at 0)
- in bgp_terminate():
- removed program_terminating -- see flag now
in bgp_main.c
- implement "retain_mode" by using
BGP_OPT_NO_FIB flag to turn off changing
the FIB as routes are deleted.
- either bgp_peer_delete() if terminating
or bgp_peer_down() all peers.
- flush process queues.
- deleted program_terminate_if_all_disabled()
- in peer_lookup(), removed handling of
PEER_STATUS_ACCEPT_PEER().
- deleted peer_lookup_with_open().
- in bgp_config_write_family(), removed handling
of PEER_STATUS_ACCEPT_PEER().
- in bgp_config_write(), removed handling
of PEER_STATUS_ACCEPT_PEER().
bgpd/bgpd.h -- add peer_linger_count entry to the
bgp_master structure.
- remove: peer_lock(), peer_unlock() and
peer_delete()
- (4) for peer_af_flag_modify()
- added peer_rsclient_unset()
lib/plist.c -- fixed handling of prefix lists with no
explicit sequence numbers.
lib/qpnexus.c -- (4) for main_thread & terminate flags
- change qpn_terminate() so does nothing if
terminate flag is already set.
lib/qpnexus.h -- (4) for main_thread & terminate flags
tests/bgp_capability_test.c -- (3)
|
|
|
|
|
|
|
|
| |
Removed nearly 100 compiler warnings in the various routing daemons
which now clean compile.
Removed one warning in vty.c, which was obscured by the other
warnings. SO... this commit corrects the previous one.
|
|
|
|
|
|
|
| |
Various bug fixes and improvements.
Running with a fair amount of debug/assert code, which must be
removed at some date.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bgpd/bgp_advertise.c
bgpd/bgp_advertise.h
The adj_in and adj_out objects are now put on a list based
on the peer to whom the route belongs.
The adj_in and adj_out objects also now point to the bgp_node
which they are routes for.
This substantially reduces the work needed to shut down a peer.
bgpd/bgp_damp.c
Changes to adj_in and adj_out forced small change to macros
used in bgp_damp.c to manage its lists.
bgpd/bgp_debug.c
Replaced direct access to vty->node by the required vty_get_node().
bgpd/bgp_dump.c
Changes to the names of fields in bgp_info structures.
bgpd/bgp_engine.h
Modified the debug and trace functions.
bgpd/bgp_fsm.c
Make use of sockunion2str() consistent with common usage.
Improved some documentation.
bgpd/bgp_main.c
Use the newly extended qpn_add_hook_function() facility.
bgpd/bgp_mplsvpn.c
Changes to the names of fields in bgp_info structures.
bgpd/bgp_msg_read.c
Bug fix: correct handling of capability code length.
Improvement: better casting in calculation of message length.
bgpd/bgp_msg_write.c
Bug fix: correct byte ordering of bgp_id in open message.
bgpd/bgp_network.c
Bug fix: correct handling of incoming connections.
Takes advantage of improvements in sockunion.c.
bgpd/bgp_nexthop.c
Changes to the names of fields in bgp_info structures.
bgpd/bgp_open_state.c
Remove mistaken #include of memtypes.h
bgpd/bgp_packet.c
Improvements to handling of withdrawing routes for peers.
bgpd/bgp_peer.c
Tidying up the state of peers as they are enabled and disabled.
Improvements to handling of withdrawing routes for peers.
bgpd/bgp_peer.h
Adding list bases for lists of routes originated by the peer.
bgpd/bgp_peer_index.c
Bug fix: correct freeing of peer indexes.
bgpd/bgp_route.c
Implement lists of bgp_info based in the owning peer. Adjust
for name changes to bgp_info fields.
Reimplemented all the clearing functions to use the lists of
items that belong to the peer -- rather than searching route
tables for stuff to withdraw.
Changed work queue handling for added/changed routes, so
that queues run through existing items, rather than having
queues of auxiliary items -- lower memory overhead.
bgpd/bgp_route.h
Added fields to bgp_info to allow all bgp_info originated by
each peer to live on lists based in the peer. And changed the
name of existing fields to avoid confusion.
bgpd/bgp_routemap.c
Removing redundant code and fixing a memory leak.
bgpd/bgp_table.h
Based work queue for added/changed routes directly in the
table, rather than having auxiliary structures.
bgpd/bgp_vty.c
Use vty_get_node() and vty_set_node() rather than direct
access to the vty field.
bgpd/bgpd.c
Implement changes to route clearing.
bgpd/bgpd.h
Changes to work queue handling.
lib/buffer.c
Changes to allow embedded buffer structures.
lib/buffer.h
Moved struct buffer here so that could have embedded buffer
structurs.
lib/command.c
Substantial tidy up and document exercise.
Restructured the top level command processing and finding
of descriptions and command completion.
Removal of unpleasant messing around with the insides of
vector structures.
Movement of some command actions to vty.c.
Uses uty.h to pick up the "private" functions from vty.c
et al.
lib/command.h
Moved the "node" values to node_type.h, so that can use an
enum node_type in places where cannot include command.h.
lib/command_queue.c
Updated to cope with the called command changing the node
value.
Improved handling of revoked commands, so the the command
line handler does not get stuck waiting for a command to
complete which has been revoked !
lib/command_queue.h
Improved message format.
lib/if.c
Use vty_set_node().
lib/keychain.c
Use vty_set_node().
new lib/keystroke.c
new lib/keystroke.h
New code to implement a keystroke FIFO.
This moves some complexity out of the command handler.
The handling of mixtures of escapes and Telnet IACs is
tightened up.
It would be possible to extend this to, say, UTF-8.
Regularises the "stealing" of keystrokes for the "--more--"
output handling... which was a bit hit and miss.
new lib/list_util.c
new lib/list_util.h
New code to implement various forms of linked list,
where the list pointers are embedded in structures.
lib/log.c
Changed the handling of log messages, so that all types
of log output (except syslog) use the same message buffer
scheme, and the message is constructed once and once
only.
Changes to the handling of VTY_LOCK() etc.
Uses uty.h to pick up the "private" functions from vty.c
et al.
lib/log.h
Changes to the buffering of log messages.
new lib/mem_tracker.c
New code to track memory allocation/deallocation, for
debug purposes.
lib/memory.c
lib/memory.h
Updated to allow the use of the mem_tracker.
lib/memtypes.awk
Made the memtypes into a named enum MTYPE.
lib/memtypes.c
Various new memory types.
lib/mqueue.c
lib/mqueue.h
Add mqueue_finish function for close-down.
lib/network.c
lib/network.h
Added non-blocking read_nb() and write_nb().
new lib/node_type.h
As above.
lib/plist.c
Remove vty_puts() which wasn't a good idea.
lib/qlib_init.c
Added qps_init() to first stage and mqueue_finish to
finish.
lib/qpnexus.c
lib/qpnexus.h
More flexible hooks for in_thread_init and in_thread_final.
lib/qpselect.c
lib/qpselect.h
Added qps_start_up() to build the required maps once and
for all.
Added qdebug to control the debug checks and validation.
Improved validation and test functions.
new lib/qstring.c
new lib/qstring.h
New code for limited flexible string handling.
lib/qtimers.c
Added qdebug to control the debug checks and validation.
lib/routemap.c
Use vty_set_node().
lib/sockunion.c
lib/sockunion.h
Tidied up and regularised the handling of sin_len and
sin6_len.
Created common function for setting port into socket.
Created common function for initialisation/allocation of
new sockunion.
Reduced various functions by using common sub-functions.
Rationalised some code.
Added sockunion_listen() and sockunion_new_sockaddr().
Renamed sockunion_new() to sockunion_new_prefix().
Improved some logging messages.
Added documentation.
new lib/uty.h
Functions etc. used only by vty/command/log/vty_io and
vty_cli.
lib/vector.c
lib/vector.h
Added vector_t type.
Removed VECTOR_INDEX, vector_only_wrapper_free() and
vector_only_index_free() -- following improvement of
code in command.c.
Added vector_set_min_length(), vector_set_new_min_length()
and vector_length() functions.
new lib/vio_fifo.c
new lib/vio_fifo.h
New code to manage simple FIFO of indefinite length.
lib/vty.c
lib/vty.h
Reworked. Broken into vty.c, vty_io.c and vty_cli.c.
new lib/vty_cli.c
new lib/vty_cli.h
CLI handling parts of the vty family.
new lib/vty_io.c
new lib/vty_io.h
I/O parts of the vty family.
lib/workqueue.h
Introduced tyedefs for the various call-back entries.
new tests/test-list_util.c
Tests for the list-util stuff.
vtysh/vtysh.c
Small change to interface for cmd_execute_command()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updated quagga thread handling to use qtimers when using the new
qpnexus -- so all timers are qtimers in the new scheme.
Updated work queue handling so that each work queue item is a single
malloced structure, not three. (Only bgpd and zebra use the work
queue system.)
When using qpnexus the background thread queue is no longer a timer
queue, but simply a list of pending background threads. When a
background thread is waiting on a timer, it is in the qtimer pile,
same like any other thread.
When using qpnexus, the only remaining quagga thread queues are the
event and ready queues.
Revised the qpnexus loop so that only when there is nothing else to
do will it consider the background threads.
Revised write I/O in the BGP Engine so that all writing is via the
connection's write buffer. Revised the write I/O in the Routeing
Engine, so that it passes groups of updates in a single mqueue
message. This all reduces the number of TCP packets sent (because
BGP messages are collected together in the connection's write buffer)
and reduces the number of mqueue messages involved.
(No need for TCP_CORK.)
Code and comments review for the new code.
modified: bgpd/bgp_advertise.c
modified: bgpd/bgp_common.h
modified: bgpd/bgp_connection.c
modified: bgpd/bgp_connection.h
modified: bgpd/bgp_engine.h
modified: bgpd/bgp_fsm.c
modified: bgpd/bgp_main.c
modified: bgpd/bgp_msg_read.c
modified: bgpd/bgp_msg_write.c
modified: bgpd/bgp_network.c
modified: bgpd/bgp_packet.c
modified: bgpd/bgp_packet.h
modified: bgpd/bgp_peer.c
modified: bgpd/bgp_peer_index.h
modified: bgpd/bgp_route.c
modified: bgpd/bgp_route_refresh.h
modified: bgpd/bgp_session.c
modified: bgpd/bgp_session.h
modified: bgpd/bgpd.c
new file: bgpd/bgpd.cx
modified: lib/mqueue.h
modified: lib/qpnexus.c
modified: lib/qpnexus.h
modified: lib/qpselect.c
modified: lib/qtimers.c
modified: lib/qtimers.h
modified: lib/sigevent.c
modified: lib/stream.c
modified: lib/stream.h
modified: lib/thread.c
modified: lib/thread.h
modified: lib/workqueue.c
modified: lib/workqueue.h
modified: tests/heavy-wq.c
modified: zebra/zebra_rib.c
|
|
|
|
|
|
|
| |
it runs in the routing_nexus. Makefile tidied. Fixed a few warnings.
Re-enabled zclient, horrors of horrors bpg_nexthop thought it OK to
poke arround with zclients threads directly. Now fixed, all private to
zclient.
|
|
|
|
|
| |
Changed names of peer states. Writed in peering engine side of sending
route_refresh.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Finish the wiring required to get bgp_msg_read to process OPEN
messages into the connection's open_state, and be able to check
for correct peer AS, etc.
Removed bugs preventing messages from being written.
Added BGP Id check to collision detection logic.
Removed as many warnings from comilation as possible. Replaced
horrible FIFO kludge in the process. (Introduced the even more
horrible miyagi kludge.)
modified: bgpd/bgp_advertise.c
modified: bgpd/bgp_advertise.h
modified: bgpd/bgp_connection.c
modified: bgpd/bgp_connection.h
modified: bgpd/bgp_debug.c
modified: bgpd/bgp_fsm.c
modified: bgpd/bgp_msg_read.c
modified: bgpd/bgp_msg_write.c
modified: bgpd/bgp_network.c
modified: bgpd/bgp_nexthop.c
modified: bgpd/bgp_notification.c
modified: bgpd/bgp_open.c
modified: bgpd/bgp_packet.c
modified: bgpd/bgp_session.c
modified: bgpd/bgp_session.h
modified: bgpd/bgpd.c
modified: lib/Makefile.am
modified: lib/distribute.c
modified: lib/if_rmap.c
new file: lib/miyagi.h
modified: lib/prefix.h
modified: lib/sockopt.c
modified: lib/stream.c
modified: lib/thread.c
modified: lib/vty.c
modified: lib/zebra.h
modified: tests/bgp_capability_test.c
modified: tests/bgp_mp_attr_test.c
modified: tests/ecommunity_test.c
modified: tests/heavy-thread.c
modified: tests/heavy-wq.c
modified: tests/heavy.c
modified: tests/main.c
modified: tests/test-checksum.c
modified: tests/test-sig.c
modified: watchquagga/watchquagga.c
modified: zebra/if_netlink.c
modified: zebra/ioctl.c
modified: zebra/rt_netlink.c
modified: zebra/rtread_netlink.c
|
|
|
|
|
|
|
|
|
|
|
| |
lib.c: use a mutex to protect all public methods. Replaced
code in command.c etc that modified zlog_default directly with
interlocked getters and setters. Requires that vty_log in vty.c
handles its own pthread safety TBA.
privs.c: use a mutex to protect all public methods. Counts RAISE
and LOWER so that privilege stays RAISED until all pthreads
have lowered. Improved messages in test-privs.c
|
|
|
|
|
| |
Enabled building of the test programs. Added tests for vectors and
sybtabs.
|
|
|
|
|
|
| |
* */*main.c: (main) Current versions of Gcc warn if the return value for
daemon() is not checked. So add a simple test and exit on failure.
|
|
|
|
|
|
| |
Add 2 impl. of the Internet Checksum. One new optimized nad
one form RFC 1071. Turns out that the current Quagga in_cksum()
is buggy. On Big Endian routers it miscalculates odd sized buffers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/checksum.c: (fletcher_checksum) Switch the second phase of the checksum
back to the old ospfd logic.
The isisd-derived version:
a) is very hard to follow
b) had some kind of subtle bug that caused it be wrong when c0=0 and c1=254
(potentially fixable by doing the mods before adjusting x and y)
Additionally:
- explicitely cast expressions using non-internal variables to int, to ensure
the result is signed.
- defensively change the length argument to 'size_t', to ensure the code
works with that argument being unsigned..
Thanks to Joakim Tjernlund for the investigative work into this bug.
* tests/test-checksum.c: new file to exercise the checksum code.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-13 Paul P Komkoff Jr <i@stingr.net>
* configure.ac: add a configure flag and autoconf macro, which will
determine if your toolchain supports PIE.
* */Makefile.am: add corresponding CFLAGS and LDFLAGS into
appropriate places.
Signed-off-by: Paul Jakma <paul@quagga.net>
|
| |
|
|
|
|
|
|
| |
2008-06-07 Paul Jakma <paul@jakma.org
* bgp_mp_attr_test.c: MP_(UN)REACH_NLRI unit tests
|
|
|
|
|
|
| |
2008-06-07 Paul Jakma <paul@jakma.org
* bgp_mp_attr_test.c: MP_(UN)REACH_NLRI unit tests
|
|
|
|
|
|
| |
2008-02-23 Paul Jakma <paul.jakma@sun.com>
* aspath_test.c: Test for 0-ASN sequences that still have data.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-12-22 Paul Jakma <paul.jakma@sun.com>
* Fix series of vulnerabilities reported by "Mu Security
Research Team", where bgpd can be made to crash by sending
malformed packets - requires that bgpd be configured with a
session to the peer.
* bgp_attr.c: (bgp_attr_as4_path) aspath_parse may fail, only
set the attribute flag indicating AS4_PATH if we actually managed
to parse one.
(bgp_attr_munge_as4_attrs) Assert was too general, it is possible
to receive AS4_AGGREGATOR before AGGREGATOR.
(bgp_attr_parse) Check that we have actually received the extra
byte of header for Extended-Length attributes.
* bgp_attr.h: Fix BGP_ATTR_MIN_LEN to account for the length byte.
* bgp_open.c: (cap_minsizes) Fix size of CAPABILITY_CODE_RESTART,
incorrect -2 left in place from a development version of as4-path
patch.
* bgp_packet.c: (bgp_route_refresh_receive) ORF length parameter
needs to be properly sanity checked.
* tests/bgp_capability_test.c: Test for empty capabilities.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-10-14 Paul Jakma <paul.jakma@sun.com>
* NEWS: Note that MRT dumps are now version 2
* (general) Merge in Juergen Kammer's AS4 patch.
2007-09-27 Paul Jakma <paul.jakma@sun.com>
* bgp_aspath.c: (assegment_normalise) remove duplicates from
from sets.
(aspath_reconcile_as4) disregard a broken part of the RFC around
error handling in path reconciliation.
* aspath_test.c: Test dupe-weeding from sets.
Test that reconciliation merges AS_PATH and AS4_PATH where
former is shorter than latter.
2007-09-26 Paul Jakma <paul.jakma@sun.com>
* aspath_test.c: Test AS4_PATH reconcilation where length
of AS_PATH and AS4_PATH is same.
2007-09-25 Paul Jakma <paul.jakma@sun.com>
* bgp_open.c: (peek_for_as4_capability) Fix to work.
* bgp_packet.c: (bgp_open_receive) Fix sanity check of as4.
* tests/bgp_capability_test.c: (general) Extend tests to validate
peek_for_as4_capability.
Add test of full OPEN Option block, with multiple capabilities,
both as a series of Option, and a single option.
Add some crap to beginning of stream, to prevent code depending
on getp == 0.
2007-09-18 Paul Jakma <paul.jakma@sun.com>
* bgp_open.c: (bgp_capability_as4) debug printf inline with others.
(peek_for_as4_capability) There's no need to signal failure, as
failure is better dealt with through full capability parser -
just return the AS4, simpler.
* bgp_packet.c: (bgp_open_receive) Update to match
peek_for_as4_capability change.
Allow use of BGP_AS_TRANS by 2b speakers.
Use NOTIFY_OPEN_ERR rather than CEASE for OPEN parsing errors.
(bgp_capability_msg_parse) missing argument to debug print
(bgp_capability_receive) missing return values.
* tests/bgp_capability_test.c: (parse_test) update for changes to
peek_for_as4_capability
2007-07-25 Paul Jakma <paul.jakma@sun.com>
* Remove 2-byte size macros, just make existing macros take
argument to indicate which size to use.
Adjust all users - typically they want '1'.
* bgp_aspath.c: (aspath_has_as4) New, return 1 if there are any
as4's in a path.
(aspath_put) Return the number of bytes actually written, to
fix the bug Juergen noted: Splitting of segments will change
the number of bytes written from that already written to the
AS_PATH header.
(aspath_snmp_pathseg) Pass 2-byte flag to aspath_put. SNMP
is still defined as 2b.
(aspath_aggregate) fix latent bug.
(aspath_reconcile_as4) AS_PATH+NEW_AS_PATH reconciliation
function.
(aspath_key_make) Hash the AS_PATH string, rather than
just taking the addition of assegment ASes as the hash value,
hopefully sligthly more collision resistant.
(bgp_attr_munge_as4_attrs) Collide the NEW_ attributes
together with the OLD 2-byte forms, code Juergen
had in bgp_attr_parse but re-organised a bit.
(bgp_attr_parse) Bunch of code from Juergen moves
to previous function.
(bgp_packet_attribute) Compact significantly by
just /always/ using extended-length attr header.
Fix bug Juergen noted, by using aspath_put's
(new) returned size value for the attr header rather
than the (guesstimate) of aspath_size() - the two could
differ when aspath_put had to split large segments, unlikely
this bug was ever hit in the 'wild'.
(bgp_dump_routes_attr) Always use extended-len and
use aspath_put return for header length. Output 4b ASN
for AS_PATH and AGGREGATOR.
* bgp_ecommunity.c: (ecommunity_{hash_make,cmp}) fix
hash callback declarations to match prototypes.
(ecommunity_gettoken) Updated for ECOMMUNITY_ENCODE_AS4,
complete rewrite of Juergen's changes (no asdot support)
* bgp_open.c: (bgp_capability_as4) New, does what it says
on the tin.
(peek_for_as4_capability) Rewritten to use streams and
bgp_capability_as4.
* bgp_packet.c: (bgp_open_send) minor edit
checked (in the abstract at least) with Juergen.
Changes are to be more accepting, e.g, allow AS_TRANS on
a 2-byte session.
* (general) Update all commands to use CMD_AS_RANGE.
* bgp_vty.c: (bgp_clear) Fix return vals to use CMD_..
Remove stuff replicated by VTY_GET_LONG
(bgp_clear_vty) Return bgp_clear directly to vty.
* tests/aspath_test.c: Exercise 32bit parsing. Test reconcile
function.
* tests/ecommunity_test.c: New, test AS4 ecommunity changes,
positive test only at this time, error cases not tested yet.
2007-07-25 Juergen Kammer <j.kammer@eurodata.de>
* (general) AS4 support.
* bgpd.h: as_t changes to 4-bytes.
* bgp_aspath.h: Add BGP_AS4_MAX and BGP_AS_TRANS defines.
* bgp_aspath.c: AS_VALUE_SIZE becomes 4-byte, AS16_VALUE_SIZE
added for 2-byte.
Add AS16 versions of length calc macros.
(aspath_count_numas) New, count number of ASes.
(aspath_has_as4) New, return 1 if there are any as4's in a
path.
(assegments_parse) Interpret assegment as 4 or 2 byte,
according to how the caller instructs us, with a new
argument.
(aspath_parse) Add use32bit argument to pass to
assegments_parse. Adjust all its callers to pass 1, unless
otherwise noted.
(assegment_data_put) Adjust to be able to write 2 or 4 byte
AS, according to new use32bit argument.
(aspath_put) Adjust to write 2 or 4.
(aspath_gettoken) Use a long for passed in asno.
* bgp_attr.c: (attr_str) Add BGP_ATTR_AS4_PATH and
BGP_ATTR_AS4_AGGREGATOR.
(bgp_attr_aspath) Call aspath_parse with right 2/4 arg, as
determined by received-capability flag.
(bgp_attr_aspath_check) New, code previously in attr_aspath
but moved to new func so it can be run after NEW_AS_PATH
reconciliation.
(bgp_attr_as4_path) New, handle NEW_AS_PATH.
(bgp_attr_aggregator) Adjust to cope with 2/4 byte ASes.
(bgp_attr_as4_aggregator) New, read NEW_AGGREGATOR.
(bgp_attr_parse) Add handoffs to previous parsers for the two
new AS4 NEW_ attributes.
Various checks added for NEW/OLD reconciliation.
(bgp_packet_attribute) Support 2/4 for AS_PATH and
AGGREGATOR, detect when NEW_ attrs need to be sent.
* bgp_debug.{c,h}: Add 'debug bgp as4'.
* bgp_dump.c: MRTv2 support, unconditionally enabled, which
supports AS4. Based on patches from Erik (RIPE?).
* bgp_ecommunity.c: (ecommunity_ecom2str) ECOMMUNITY_ENCODE_AS4
support.
* bgp_open.c: (peek_for_as4_capability) New, peek for AS4
capability prior to full capability parsing, so we know which
ASN to use for struct peer lookup.
(bgp_open_capability) Always send AS4 capability.
* bgp_packet.c: (bgp_open_send) AS4 handling for AS field
(bgp_open_receive) Peek for AS4 capability first, and figure
out which AS to believe.
* bgp_vty.c: (bgp_show_peer) Print AS4 cap
* tests/aspath_test.c: Support asn32 changes, call aspath_parse
with 16 bit.
* vtysh/extract.pl: AS4 compatibility for router bgp ASNUMBER
* vtysh/extract.pl.in: AS4 compatibility for router bgp ASNUMBER
* vtysh/vtysh.c: AS4 compatibility for router bgp ASNUMBER
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-09-17 Paul Jakma <paul.jakma@sun.com>
* bgp_open.c: (bgp_capability_mp) We were setting
afc_nego[safi][safi] rather than afc_nego[afi][safi], thus
failling to announce any non-IPv4 prefixes. Remove the extra,
typo-ed character.
* bgp_capability_test.c: Test that peer's adv_recv and adv_nego get
set correctly for MP capability and given AFI/SAFI.
Colour OK/failed result so it's easier to find them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not always present or correct).
* bgp_open.h: Add structures for the generic capability TLV header
and for the data formats of the various specific capabilities we
support. Hence remove the badly named, or else misdefined, struct
capability.
* bgp_open.c: (bgp_capability_vty_out) Use struct capability_mp_data.
Do the length checks *before* memcpy()'ing based on that length
(stored capability - should have been validated anyway on input,
but..).
(bgp_afi_safi_valid_indices) new function to validate (afi,safi)
which is about to be used as index into arrays, consolidates
several instances of same, at least one of which appeared to be
incomplete..
(bgp_capability_mp) Much condensed.
(bgp_capability_orf_entry) New, process one ORF entry
(bgp_capability_orf) Condensed. Fixed to process all ORF entries.
(bgp_capability_restart) Condensed, and fixed to use a
cap-specific type, rather than abusing capability_mp.
(struct message capcode_str) added to aid generic logging.
(size_t cap_minsizes[]) added to aid generic validation of
capability length field.
(bgp_capability_parse) Generic logging and validation of TLV
consolidated here. Code compacted as much as possible.
* bgp_packet.c: (bgp_open_receive) Capability parsers now use
streams, so no more need here to manually fudge the input stream
getp.
(bgp_capability_msg_parse) use struct capability_mp_data. Validate
lengths /before/ memcpy. Use bgp_afi_safi_valid_indices.
(bgp_capability_receive) Exported for use by test harness.
* bgp_vty.c: (bgp_show_summary) fix conversion warning
(bgp_show_peer) ditto
* bgp_debug.h: Fix storage 'extern' after type 'const'.
* lib/log.c: (mes_lookup) warning about code not being in
same-number array slot should be debug, not warning. E.g. BGP
has several discontigious number spaces, allocating from
different parts of a space is not uncommon (e.g. IANA
assigned versus vendor-assigned code points in some number
space).
|
|
|
|
|
|
|
| |
2006-08-26 Paul Jakma <paul.jakma@sun.com>
* heavy-wq.c: (slow_func_del,slow_func) update to match workqueue
changes
|
|
|
|
|
|
|
|
|
|
|
| |
2006-08-06 Paul Jakma <paul.jakma@sun.com>
* bgp_aspath.c: (aspath_loop_check) Fix the typo-bug which
essentially had disabled this check. Problem reported by
Bartek Kania <mrbk@gnarf.org> in [quagga-users 7388].
* aspath_test.c: (validate) Fix the sense of the aspath_loop_check,
which was the wrong way around and had actually been testing for
aspath_loop_check to be buggy.
|
| |
|
|
|
|
|
|
|
|
| |
2006-05-28 Paul Jakma <paul.jakma@sun.com>
* test-sig.c: (main) configure logging, there's no terminal
to write to for one thing, but we do want stdout, and we
don't want a test to spam syslog.
|
|
|
|
|
|
|
|
|
|
| |
2006-03-16 Paul Jakma <paul.jakma@sun.com>
* heavy-wq.c: (heavy_wq_init) delay is gone from workqueue
spec.
* aspath_test.c: (test_segments) Add an AS_SET with redundant
ASNs.
({empty_prepend,prepend,parse}_test) add static qualifiers
|
| |
|
|
|
|
|
| |
* aspath_test.c: (validate) free the temporary aspaths.
(empty_get_test) ditto.
|
|
|
|
|
|
|
|
| |
2006-01-10 Paul Jakma <paul.jakma@sun.com>
* test-stream.c: new file, small unit test for new
resize and {put,get}-quad stream functions.
* Makefile.am: build teststream unit test.
|
|
|
|
|
|
|
|
|
|
| |
2005-11-23 Paul Jakma <paul.jakma@sun.com>
* aspath_test.c: Add an empty aspath to test segments, and to
compare tests.
Add a segment identical to seq1, but with one extra asn.
Fix bogus free of stream in make_aspath for case where
no stream was allocated (empty path data).
|
|
|
|
|
|
| |
* test-privs.c: Privileges unit test.
* Makefile.am: build testprivs
* aspath_test.c: fix a few sign warnings
|
|
|
|
|
|
| |
* aspath_test.c: Test bgp_aspath functionality.
* Makefile.am: build aspathtest
* ChangeLog: Fix date of previous commit
|
|
|
|
|
| |
* test-buffer.c: include memory.h
(main) call memory_init().
|
|
|
|
|
| |
* heavy-wq.c: (slow_func_del,slow_func_err) make them take
void * argument to shut up silly gcc warning.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* main.c: new file, common 'main' portion which then calls
test_init.
* heavy.c: remove common portions now in 'main.
* heavy-wq.c: ditto
* heavy-thread.c: ditto
* heavy*.c: Set the slow_function iteration number lower, to 300, it
was several orders of magnitude too 'slow' to be useful. :)
* Makefile.am: main is a source of the tests. heavy should link
to the math library.
|
|
|
|
| |
* Makefile.am: Build heavythread
|
|
|
|
|
| |
* heavy-thread.c: Andrew Schorr's adaptation of heavy.c to use a
background thread to avoid responsivity problems.
|
| |
|
|
|
|
|
|
| |
* heavy.c: Add a timer thread to demonstrate thread interactivity,
Add a daemon_exit command to assist with debugging (eg for memory
tracers, etc..)
|
|
|
|
|
|
| |
* heavy.c: test programme to show how long-running functions
kill responsiveness. Demonstrating the most niggly problem
left in bgpd.
|