summaryrefslogtreecommitdiff
path: root/bgpd
AgeCommit message (Collapse)Author
2005-10-012005-10-01 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* zebra.h: Declare new functions zebra_route_string() and zebra_route_char(). * log.c: (zroute_lookup,zebra_route_string,zebra_route_char) New functions to map zebra route numbers to strings. * zebra_vty.c: (route_type_str) Remove obsolete function: use new library function zebra_route_string() instead. Note that there are a few differences: for IPv6 routes, we now get "ripng" and "ospf6" instead of the old behavior ("rip" and "ospf"). (route_type_char) Remove obsolete function: ues new library function zebra_route_char() instead. Note that there is one difference: the old function returned 'S' for a ZEBRA_ROUTE_SYSTEM route, whereas the new one returns 'X'. (vty_show_ip_route_detail,vty_show_ipv6_route_detail) Replace route_type_str() with zebra_route_string(). (vty_show_ip_route,vty_show_ipv6_route) Replace route_type_char() with zebra_route_char(). * bgp_vty.c: (bgp_config_write_redistribute) Use new library function zebra_route_string instead of a local hard-coded table. * ospf6_asbr.c: Remove local hard-coded tables zroute_name and zroute_abname. Change the ZROUTE_NAME macro to use new library function zebra_route_string(). Remove the ZROUTE_ABNAME macro. (ospf6_asbr_external_route_show): Replace ZROUTE_ABNAME() with a call to zebra_route_char(), and be sure to fix the format string, since we now have a char instead of a char *. * ospf6_zebra.c: Remove local hard-coded tables zebra_route_name and zebra_route_abname. Note that the zebra_route_name[] table contained mixed-case strings, whereas the zebra_route_string() function returns lower-case strings. (ospf6_zebra_read_ipv6): Change debug message to use new library function zebra_route_string() instead of zebra_route_name[]. (show_zebra): Use new library function zebra_route_string() instead of zebra_route_name[]. * ospf_dump.c: Remove local hard-coded table ospf_redistributed_proto. (ospf_redist_string) New function implemented using new library function zebra_route_string(). Note that there are a few differences in the output that will result: the new function returns strings that are lower-case, whereas the old table was mixed case. Also, the old table mapped ZEBRA_ROUTE_OSPF6 to "OSPFv3", whereas the new function returns "ospf6". * ospfd.h: Remove extern struct message ospf_redistributed_proto[], and add extern const char *ospf_redist_string(u_int route_type) instead. * ospf_asbr.c: (ospf_external_info_add) In two messages, use ospf_redist_string instead of LOOKUP(ospf_redistributed_proto). * ospf_vty.c: Remove local hard-coded table distribute_str. (config_write_ospf_redistribute,config_write_ospf_distribute): Use new library function zebra_route_string() instead of distribute_str[]. * ospf_zebra.c: (ospf_redistribute_set,ospf_redistribute_unset, ospf_redistribute_default_set,ospf_redistribute_check) In debug messages, use ospf_redist_string() instead of LOOKUP(ospf_redistributed_proto). * rip_zebra.c: (config_write_rip_redistribute): Remove local hard-coded table str[]. Replace str[] with calls to new library function zebra_route_string(). * ripd.c: Remove local hard-coded table route_info[]. (show_ip_rip) Replace uses of str[] with calls to new library functions zebra_route_char and zebra_route_string. * ripng_zebra.c: (ripng_redistribute_write) Remove local hard-coded table str[]. Replace str[i] with new library function zebra_route_string(i). * ripngd.c: Remove local hard-coded table route_info[]. (show_ipv6_ripng) Use new library function zebra_route_char() instead of table route_info[].
2005-10-012005-09-30 Vincent Jardin <vincent.jardin@6wind.com>jardin
* bgp_packet.c: fix compilation when DEBUG is used.
2005-09-292005-09-29 Paul Jakma <paul.jakma@sun.com>paul
* configure.ac: Add the test for Solaris least-privileges. Set defines for whether capabilities are supported and whether of the linux or solaris variety. Add missing-prototypes, missing-declarations, char-subscripts and cast-qual warnings to default cflags, cause Hasso enjoys warnings, and we really should clean the remaining ones up. (ie isisd..). * (*/*main.c) Update the zebra_capabilities_t arrays in the various daemons to match the changes made in lib/privs.h. * zebra.h: Solaris capabilities requires priv.h to be included. * privs.{c,h}: Add support for Solaris Least-Privileges. privs.h: Reduce some of the abstract capabilities, which do not have rough equivalents on both systems. Rename the net related caps to _NET, as they should have been in first place. (zprivs_terminate) should take the zebra_privs_t as argument so that it can update change pointer. Add an additional privilege state, ZPRIVS_UNKNOWN. * privs.c: (various capability functions) Add Solaris privileges variants. (zprivs_state) Use privs.c specific generic types to represent various capability/privilege related types, so that each can be typedef'd as appropriate on each platform. (zprivs_null_state) static added, to hold the state the null method should report (should be raised by default, and LOWERED if zprivs_terminate has been called) (zprivs_state_null) Report back the zprivs_null_state. (cap_map) Make it able to map abstract capability to multiple system capabilities. (zcaps2sys) Map to abstract capabilities to multiple system privileges/capabilities. (zprivs_init) move capability related init to seperate function, zprivs_caps_init. (zprivs_terminate) ditto, moved to zprivs_caps_terminate. Set the change_state callback to the NULL state, so the user can continue to run and use the callbacks.
2005-09-102005-09-10 Paul Jakma <paul.jakma@sun.com>paul
* Makefile.am: bgpd shouldn't list libgp's sources as its own. Use LDADD. * bgp_aspath.h: (struct assegment) New struct, abstract representation of a list of AS_PATH segments and the contained ASNs. (struct aspath) Remove the raw-data related fields, reference the abstract struct assegment instead. Remove several other computed fields, it's just a headache to maintain them and they're cheap to compute from struct assegment. (aspath_parse) parse a stream, not a pointer to raw data. (aspath_count_{hops,confeds,size}) helpers to access information formerly directly contained in struct aspath. (aspath_snmp_pathseg) Helper for SNMP, BGP MIB wants to be able to output hex representation of raw data. * bgp_aspath.c: (general) partial-rewrite. Store aspath data as an abstract singly-linked list of abstract segments, rather than storing the raw data, and parsing it each and every time. Remove several count/size fields which are cheap to compute from the abstract segment structure. (global) Include stream.h, needed for aspath_parse, and others. Couple of helper macros added. (struct assegment_header) Just the header, and only the header. (assegment_data_{new,free}) convenience functions for AS_SEG_DATA allocation, the dynamic, per-segment array of ASNs. (assegment_{new,free,free_all,dup,dup_all}) convenience functions for creating struct assegments. The _all forms will follow the entire chain of segments from the given segment. (assegment_prepend_asns) new function, prepend an ASN N times to segment. (assegment_append_asns) Append a list (array) of ASNs to segment. (int_cmp) convenience function for the aspath hash. (assegment_normalise) new function. Normalise the given segment chain to meet expectations of Quagga, and to eliminate differing raw representations of the same paths. Merge 'runs' of SEQUENCEs into one segment as our internal segment is not limited by the protocol AS_PATH segment length. Sort ASNs in SETs. (aspath_new) Take void argument to quell warnings. Use the assegment convenience functions. (assegment_count_{asns,confeds,hops}) new functions to compute at runtime values previously held in struct aspath. (aspath_size) ditto. (aspath_make_str_count) rewritten to stringify new representation, and to be slightly easier to understand hopefully. (aspath_str_update) convenience function, update the aspath str. Should investigate removing maintained string from struct aspath, just run-time compute it, as per other fields. It's just a maintenance headache, would save noticeable amount of RAM with possibly not much extra run-time cost. (aspath_dup) use the assegment dup functions. (aspath_hash_alloc) Take void * argument to satisfy gcc. Use the proper helper functions to dup data. (assegments_parse) new function. parse raw AS_PATH data into struct assegments. Normalise and return the head of the list. (aspath_parse) Parse a stream, not pointer to raw data and use assegments_parse to do it. (assegment_data_put) Write out a single segment data in protocol form to stream. (assegment_header_put) ditto but for segment header. (aspath_put) new function. As per previous but for an entire struct aspath. (aspath_snmp_pathseg) wrapper around aspath_put for bgp_snmp.c. Uses a static buffer sadly. (aspath_aggregate_as_set_add) rewritten to use assegments. (aspath_aggregate) ditto (aspath_{firstas,loop,private_as}_check) ditto (aspath_{merge,prepend,add_one_as}) ditto (aspath_cmp_left{_confed}) ditto (aspath_delete_confed_seq) ditto, plus fixed to properly delete all leading confed segments. (aspath_as_add) Just use assegment_append_asns. (aspath_segment_add) updated to use assegments. (enum as_token) Add values for confeds (aspath_gettoken) Add support for confeds (aspath_str2aspath) ditto (aspath_key_make) updated to use as_segments. Also, add segment type into the hash value as appropriate. (aspath_cmp) updated to use as_segments. (aspath_print) don't segfault on NULL argument. * bgp_attr.c: (bgp_attr_aspath) aspath_parse wants the stream now. No need for manual forwarding of stream. (bgp_packet_attribute) empty aspath is now denoted by NULL segment field, length is gone. Use aspath_size() to determine size. (bgp_attr_init) Fix declaration, explicitely specify void arg. (bgp_dump_routes_attr) Use aspath_size() to determine size. * bgp_route.c: (bgp_info_cmp) use the aspath_count_* functions. (bgp_rib_withdraw) remove unused variable. Use aspath_count_hops. * bgp_snmp.c: (bgp4PathAttrTable) raw data is gone, use aspath_snmp_pathseg to get the representation.
2005-09-092005-09-10 Paul Jakma <paul.jakma@sun.com>paul
* bgp_vty.c: (bgp_vty_init) gcc 4 compile fix. static function declarations shouldn't be inside functions. * bgp_dump.c: (bgp_dump_interval_add) ditto.
2005-08-26 * bgp_route.c: Third (?) attempt to fix best selection breakagehasso
introduced long time ago with route server patch. Hopefully it's last case to fix - route-server client not in peer group. [backport candidate]
2005-08-222005-08-22 Hugo Santos <hsantos@av.it.pt>paul
* bgp_vty.c: (general) Add support for BGP IPv6 Multicast SAFI commands and BGP_IPV6M_NODE.
2005-08-222005-08-22 Paul Jakma <paul.jakma@sun.com>paul
* bgp_route.h: (struct bgp_info) add a new flag, BGP_INFO_REMOVED. BGP_INFO_VALID is already overloaded, don't care to do same thing to STALE or HISTORY. * bgpd.h: (BGP_INFO_HOLDDOWN) Add INFO_REMOVED to the macro, as a route which should generally be ignored. * bgp_route.c: (bgp_info_delete) Just set the REMOVE flag, rather than doing actual work, so that bgp_process (called directly, or indirectly via the scanner) can catch withdrawn routes. (bgp_info_reap) Actually remove the route, what bgp_info_delete used to do, only for use by bgp_process. (bgp_best_selection) reap any REMOVED routes, other than the old selected route. (bgp_process_rsclient) reap the old-selected route, if appropriate (bgp_process_main) ditto (bgp_rib_withdraw, bgp_rib_remove) make them more consistent with each other. Don't play games with the VALID flag, bgp_process is async now, so it didn't make a difference anyway. Remove the 'force' argument from bgp_rib_withdraw, withdraw+force is equivalent to bgp_rib_remove. Update all its callers. (bgp_update_rsclient) bgp_rib_withdraw and force set is same as bgp_rib_remove. (route_vty_short_status_out) new helper to print the leading route-status string used in many command outputs. Consolidate. (route_vty_out, route_vty_out_tag, damp_route_vty_out, flap_route_vty_out) use route_vty_short_status_out rather than duplicate. (route_vty_out_detail) print state of REMOVED flag. (BGP_SHOW_SCODE_HEADER) update for Removed flag.
2005-08-03 * bgp_routemap.c: Revert part of leaking communities fix commited inhasso
2005-05-27. While ecommunity fix seems to be correct, community case isn't. Fixes bugzilla #209. [backport candidate]
2005-06-282005-06-28 Paul Jakma <paul.jakma@sun.com>paul
* (global) The great bgpd extern and static'ification. * bgp_routemap.c: remove unused ROUTE_MATCH_ASPATH_OLD code (route_set_metric_compile) fix u_int32_t to ULONG_MAX comparison warnings. * bgp_route.h: (bgp_process, bgp_withdraw, bgp_update) export these used by various files which had their own private declarations, in the case of mplsvpn - incorrect.
2005-06-152005-06-15 Paul Jakma <paul.jakma@sun.com>paul
* bgpd.c: (bgp_terminate) workqueue's are lazy allocated and its possible to terminate bgpd before workqueues were setup, causing an abort/crash. Reported by Ashish Mehta of Sun.
2005-06-012005-06-01 Paul Jakma <paul.jakma@sun.com>paul
* bgpd/(general) refcount struct peer and bgp_info, hence allowing us add work_queues for bgp_process. * bgpd/bgp_route.h: (struct bgp_info) Add 'lock' field for refcount. Add bgp_info_{lock,unlock} helper functions. Add bgp_info_{add,delete} helpers, to remove need for users managing locking/freeing of bgp_info and bgp_node's. * bgpd/bgp_table.h: (struct bgp_node) Add a flags field, and BGP_NODE_PROCESS_SCHEDULED to merge redundant processing of nodes. * bgpd/bgp_fsm.h: Make the ON/OFF/ADD/REMOVE macros lock and unlock peer reference as appropriate. * bgpd/bgp_damp.c: Remove its internal prototypes for bgp_info_delete/free. Just use bgp_info_delete. * bgpd/bgpd.h: (struct bgp_master) Add work_queue pointers. (struct peer) Add reference count 'lock' (peer_lock,peer_unlock) New helpers to take/release reference on struct peer. * bgpd/bgp_advertise.c: (general) Add peer and bgp_info refcounting and balance how references are taken and released. (bgp_advertise_free) release bgp_info reference, if appropriate (bgp_adj_out_free) unlock peer (bgp_advertise_clean) leave the adv references alone, or else call bgp_advertise_free cant unlock them. (bgp_adj_out_set) lock the peer on new adj's, leave the reference alone otherwise. lock the new bgp_info reference. (bgp_adj_in_set) lock the peer reference (bgp_adj_in_remove) and unlock it here (bgp_sync_delete) make hash_free on peer conditional, just in case. * bgpd/bgp_fsm.c: (general) document that the timers depend on bgp_event to release a peer reference. (bgp_fsm_change_status) moved up the file, unchanged. (bgp_stop) Decrement peer lock as many times as cancel_event canceled - shouldnt be needed but just in case. stream_fifo_clean of obuf made conditional, just in case. (bgp_event) always unlock the peer, regardless of return value of bgp_fsm_change_status. * bgpd/bgp_packet.c: (general) change several bgp_stop's to BGP_EVENT's. (bgp_read) Add a mysterious extra peer_unlock for ACCEPT_PEERs along with a comment on it. * bgpd/bgp_route.c: (general) Add refcounting of bgp_info, cleanup some of the resource management around bgp_info. Refcount peer. Add workqueues for bgp_process and clear_table. (bgp_info_new) make static (bgp_info_free) Ditto, and unlock the peer reference. (bgp_info_lock,bgp_info_unlock) new exported functions (bgp_info_add) Add a bgp_info to a bgp_node in correct fashion, taking care of reference counts. (bgp_info_delete) do the opposite of bgp_info_add. (bgp_process_rsclient) Converted into a work_queue work function. (bgp_process_main) ditto. (bgp_processq_del) process work queue item deconstructor (bgp_process_queue_init) process work queue init (bgp_process) call init function if required, set up queue item and add to queue, rather than calling process functions directly. (bgp_rib_remove) let bgp_info_delete manage bgp_info refcounts (bgp_rib_withdraw) ditto (bgp_update_rsclient) let bgp_info_add manage refcounts (bgp_update_main) ditto (bgp_clear_route_node) clear_node_queue work function, does per-node aspects of what bgp_clear_route_table did previously (bgp_clear_node_queue_del) clear_node_queue item delete function (bgp_clear_node_complete) clear_node_queue completion function, it unplugs the process queues, which have to be blocked while clear_node_queue is being processed to prevent a race. (bgp_clear_node_queue_init) init function for clear_node_queue work queues (bgp_clear_route_table) Sets up items onto a workqueue now, rather than clearing each node directly. Plugs both process queues to avoid potential race. (bgp_static_withdraw_rsclient) let bgp_info_{add,delete} manage bgp_info refcounts. (bgp_static_update_rsclient) ditto (bgp_static_update_main) ditto (bgp_static_update_vpnv4) ditto, remove unneeded cast. (bgp_static_withdraw) see bgp_static_withdraw_rsclient (bgp_static_withdraw_vpnv4) ditto (bgp_aggregate_{route,add,delete}) ditto (bgp_redistribute_{add,delete,withdraw}) ditto * bgpd/bgp_vty.c: (peer_rsclient_set_vty) lock rsclient list peer reference (peer_rsclient_unset_vty) ditto, but unlock same reference * bgpd/bgpd.c: (peer_free) handle frees of info to be kept for lifetime of struct peer. (peer_lock,peer_unlock) peer refcount helpers (peer_new) add initial refcounts (peer_create,peer_create_accept) lock peer as appropriate (peer_delete) unlock as appropriate, move out some free's to peer_free. (peer_group_bind,peer_group_unbind) peer refcounting as appropriate. (bgp_create) check CALLOC return value. (bgp_terminate) free workqueues too. * lib/memtypes.c: Add MTYPE_BGP_PROCESS_QUEUE and MTYPE_BGP_CLEAR_NODE_QUEUE
2005-05-28Sync bgpd and ripd set_metric_addsub_cmd commands. Fixes bugzilla #192.hasso
[backport candidate]
2005-05-27 * bgp_routemap.c: Stop leaking communities.hasso
Fixes bugzilla #89. [backport candidate]
2005-05-26 * bgpd.c: Deleting bgp->rsclient list needs fix similar to pree-groupshasso
deleting fix. Avoid leaking bgp->group, bgp->peer and bgp->rsclient lists. [backport candidate]
2005-05-26 * bgpd.c: Don't crash while deleting list of peer-groups.hasso
[backport candidate]
2005-05-25 * bgpd.c: Fix obvious (routeserver patch) merge error. This makes "nohasso
neighbor x.x.x.x routemap [export|import] commands work again. Fixes bugzilla #184. [backport candidate]
2005-05-232005-05-23 Paul Jakma <paul@dishone.st>paul
* bgp_fsm.h: Add extern qualifier to exported functions * bgp_nexthop.c: add static to nexthop specific globals * *.h: Add guard defines
2005-05-232005-05-23 Paul Jakma <paul@dishone.st>paul
* bgp_routemap.c: add semi-colons to VTY_GET_* to match vty.h change
2005-05-192005-05-19 Paul Jakma <paul@dishone.st>paul
* bgp_network.c: (bgp_accept) use XSTRDUP * bgpd.c: (peer_delete) XFREE the correct memtype, not free. (peer_create) use XSTRDUP * bgp_packet.c: (bgp_stream_dup) deleted, stream_dup should be used (various) update -> s/bgp_stream_dup/stream_dup
2005-05-192005-05-19 Paul Jakma <paul@dishone.st>paul
* bgp_fsm.c: (bgp_stop) use sockunion_free, not XFREE.. * bgp_network.c: (bgp_getsockname) ditto * bgp_routemap.c: (route_match_peer) ditto, als use a ret value and remove one sockunion_free. * bgpd.c: (peer_delete) ditto
2005-04-112005-04-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
Implement non-blocking zclient I/O with buffering. * zclient.h (struct zclient): Add two fields to support non-blocking I/O: struct buffer *wb, and struct thread *t_write. (zclient_free): Remove function. (zebra_redistribute_send): Change 2nd arg from socket fd to struct zclient * (needed to support non-blocking I/O and buffering). (zclient_send_message): New function to send an arbitrary message with non-blocking I/O. * zclient.c (zclient_new): Create write buffer. (zclient_free): Remove unused function. (zclient_stop): Must cancel new t_write thread. Also, reset all buffers: ibuf, obuf, and wb. (zclient_failed): New helper function for typical error handling. (zclient_flush_data): New thread to flush queued data. (zclient_send_message): New function to send the message in zclient->obuf to zebra using non-blocking I/O and buffering. (zebra_message_send, zapi_ipv4_route, zapi_ipv6_route): Use new zclient_send_message function instead of calling writen. (zclient_start): Set socket non-blocking. Also, change 2nd arg to zebra_redistribute_send from zclient->sock to zclient. (zebra_redistribute_send): Change 2nd arg to struct zclient *. Can now use zclient->obuf to assemble the message instead of allocating a temporary stream. And call zclient_send_message to send the message instead of writen. (zclient_read): Convert to support non-blocking I/O by using stream_read_try instead of deprecated stream_read. (zclient_redistribute): Change 2nd arg to zebra_redistribute_send from zclient->sock to zclient. * ospf6_zebra.c (ospf6_zebra_redistribute, ospf6_zebra_no_redistribute): Change 2nd arg to zebra_redistribute_send from zclient->sock to zclient. * ospf_zebra.c (ospf_zebra_add): Call zclient_send_message instead of writen. * rip_zebra.c (rip_redistribute_set, rip_redistribute_unset, rip_redistribute_clean): Change 2nd arg to zebra_redistribute_send from zclient->sock to zclient. * ripng_zebra.c (ripng_redistribute_unset, ripng_redistribute_clean): Change 2nd arg to zebra_redistribute_send from zclient->sock to zclient. * bgp_zebra.c (bgp_redistribute_set, bgp_redistribute_unset): The 2nd arg to zebra_redistribute_send is now zclient instead of zclient->sock. * isis_zebra.h (isis_zebra_finish): Remove declaration of unused function. * isis_zebra.c (isis_zebra_route_add_ipv4): Call zclient_send_message to send the message to zebra instead of calling writen directly, since zclient_send_message understands non-blocking I/O and will manage the buffer queue appropriately. (isis_zebra_finish): Remove unused function, particularly since the zclient_free function has been removed.
2005-04-09 * bgp_vty.c: Make "exit-address-family" work in IPv4 unicast addresshasso
family node. [backport candidate]
2005-04-08 * bgpd.texi: Document new "bgp bestpath as-path confed" command.hasso
* bgp_aspath.[ch], bgp_route.c, bgp_vty.c, bgpd.[ch]: Allow to enable the length of confederation path segments to be included during the as-path length check in the best path decision.
2005-04-072005-04-07 Paul Jakma <paul.jakma@sun.com>paul
* (global): Fix up list loops to match changes in lib/linklist, and some basic auditing of usage. * configure.ac: define QUAGGA_NO_DEPRECATED_INTERFACES * HACKING: Add notes about deprecating interfaces and commands. * lib/linklist.h: Add usage comments. Rename getdata macro to listgetdata. Rename nextnode to listnextnode and fix its odd behaviour to be less dangerous. Make listgetdata macro assert node is not null, NULL list entries should be bug condition. ALL_LIST_ELEMENTS, new macro, forward-referencing macro for use with for loop, Suggested by Jim Carlson of Sun. Add ALL_LIST_ELEMENTS_RO for cases which obviously do not need the "safety" of previous macro. LISTNODE_ADD and DELETE macros renamed to ATTACH, DETACH, to distinguish from the similarly named functions, and reflect their effect better. Add a QUAGGA_NO_DEPRECATED_INTERFACES define guarded section with the old defines which were modified above, for backwards compatibility - guarded to prevent Quagga using it.. * lib/linklist.c: fix up for linklist.h changes. * ospf6d/ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single scan of the area list, rather than scanning all areas first for INTER_ROUTER and then again for INTER_NETWORK. According to 16.2, the scan should be area specific anyway, and further ospf6d does not seem to implement 16.3 anyway.
2005-04-022005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
Fix problems when netlink interfaces are renamed (same ifindex used for a new interface). Start cleaning up some problems with the way interface names are handled. * interface.c: (if_new_intern_ifindex) Remove obsolete function. (if_delete_update) After distributing the interface deletion message, set ifp->ifindex to IFINDEX_INTERNAL. (if_dump_vty) Detect pseudo interface by checking if ifp->ifindex is IFINDEX_INTERNAL. (zebra_interface) Check return code from interface_cmd.func. Do not set internal ifindex values to if_new_intern_ifindex(), since we now use IFINDEX_INTERNAL for all pseudo interfaces. * kernel_socket.c: (ifm_read) Fix code and comments to reflect that all internal interfaces now have ifp->ifindex set to IFINDEX_INTERNAL. * rt_netlink.c: (set_ifindex) New function used to update ifp->ifindex. Detects interface rename events by checking if that ifindex is already being used. If it is, delete the old interface before assigning the ifindex to the new interface. (netlink_interface, netlink_link_change) Call set_ifindex to update the ifindex. * if.h: Remove define for IFINDEX_INTERNBASE and add define IFINDEX_INTERNAL 0, since all internal (i.e. non-kernel) pseudo- interfaces should have ifindex set to 0. (if_new) Remove function. (if_delete_retain) New function to delete an interface without removing from iflist and freeing the structure. (ifname2ifindex) New function. * if.c: (if_new) Remove function (absorb into if_create). (if_create) Replace function if_new with call to calloc. Set ifp->ifindex to IFINDEX_INTERNAL. Fix off-by-one error in assert to check length of interface name. Add error message if interface with this name already exists. (if_delete_retain) New function to delete an interface without removing from iflist and freeing the structure. (if_delete) Implement with help of if_delete_retain. (ifindex2ifname) Reimplement using if_lookup_by_index. (ifname2ifindex) New function to complement ifindex2ifname. (interface) The interface command should check the name length and fail with a warning message if it is too long. (no_interface) Fix spelling in warning message. (if_nametoindex) Reimplement using if_lookup_by_name. (if_indextoname, ifaddr_ipv4_lookup) Reimplement using if_lookup_by_index. * bgp_zebra.c: (bgp_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL. * isis_zebra.c: (isis_zebra_if_del) Call if_delete_retain instead of if_delete, since it is generally not safe to remove interface structures. After deleting, set ifp->ifindex to IFINDEX_INTERNAL. (zebra_interface_if_lookup) Tighten up code. * ospf6_zebra.c: (ospf6_zebra_if_del) Previously, this whole function was commented out. But this is not safe: we should at least update the ifindex when the interface is deleted. So the new version updates the interface status and sets ifp->ifindex to IFINDEX_INTERNAL. (ospf6_zebra_route_update) Use if_indextoname properly. * ospf_vty.c: (show_ip_ospf_interface_sub) Show ifindex and interface flags to help with debugging. * ospf_zebra.c: (ospf_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL. (zebra_interface_if_lookup) Make function static. Tighten up code. * rip_interface.c: (rip_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL. * ripng_interface.c: (ripng_interface_delete) After deleting, set ifp->ifindex to IFINDEX_INTERNAL.
2005-03-28 * configure.ac, */Makefile.am: Fix previous commit. SNMP includeshasso
must be after lib/ includes in some systems. Introduce SNMP_INCLUDES for that.
2005-03-21 * bgp_route.c: Don't crash while clearing route tables if there ishasso
no particular afi/safi configured. [backport candidate]
2005-02-23 * bgp_route.c: Make reannouncing prefixes with changed attributeshasso
work again.
2005-02-15Adjust size complexity estimates. Still not quite right, but closer.gdt
2005-02-10notes on what files contain what, and an initial stab at understandinggdt
how much storage is required.
2005-02-092005-02-09 Paul Jakma <paul.jakma@sun.com>paul
* (global) Update code to match stream.h changes. stream_get_putp effectively replaced with stream_get_endp. stream_forward renamed to stream_forward_getp. stream_forward_endp introduced to replace some previous setting/manual twiddling of putp by daemons. * lib/stream.h: Remove putp. Update reference to putp with endp. Add stream_forward_endp, which daemons were doing manually. Rename stream_forward to stream_forward_getp. lib/stream.c: Remove/update references to putp. introduce stream_forward_endp.
2005-02-02 * bgp_vty.c: Deprecate "neighbor transparent-as" and "neighborhasso
transparent-nexthop" commands. [merge from GNU Zebra]
2005-02-02 * bgp_routemap.c: New route-map command - "match ip route-source".hasso
[merge from GNU Zebra]
2005-02-02 * bgp_clist.[ch], bgp_route.c, bgp_routemap.c, bgp_vty.c:hasso
community-list cleanup. [merge from GNU Zebra]
2005-02-02 * bgp_route.c, bgp_vty.c, bgp_zebra.c, bgpd.[ch]: "enforce-multihop"hasso
-> "disable-connected-check". [merge from GNU Zebra]
2005-02-02 * bgp_fsm.c, bgp_open.c, bgp_packet.c, bgp_route.[ch], bgp_vty.c,hasso
bgpd.[ch]: Add BGP_INFO_STALE flag and end-of-rib support. "bgp graceful-restart" commands added. Show numbers of individual messages in "show ip bgp neighbor" command. Final pieces of graceful restart. [merge from GNU Zebra]
2005-02-01 * bgp_open.c, bgp_packet.c, bgp_vty.c, bgpd.[ch]: Remove "no neighborhasso
capability route-refresh" commands. Route refresh capability is sent anyway now. Preserve dummy deprecated commands. [merge from GNU Zebra]
2005-02-01 * bgp_attr.c, bgp_snmp.c, bgp_vty.c, bgpd.[ch]: Remove support for oldhasso
draft - ie. "neighbor version 4-" commands. Preserve dummy "neighbor version" command as deprecated. [merge from GNU Zebra]
2005-02-01 * bgpd.[ch], bgp_vty.c, bgp_route.c: "Restart session afterhasso
maximum-prefix limit" feature support. [merge from GNU Zebra]
2005-02-01 * bgp_nexthop.c: Improve debug.hasso
* bgpd.[ch], bgp_nexthop.c, bgp_snmp.c: Remove useless bgp_get_master() function. * bgp_packet.c: MP AFI_IP update and withdraw parsing. * bgp_fsm.c: Reset peer synctime in bgp_stop(). bgp_fsm_change_status() is better place to log about peer status change than bgp_event(). Log in bgp_connect_success(). * bgp_vty.c: Fix typo in comment. * bgp_attr.c: Better log about unknown attribute. [merge from GNU Zebra]
2005-01-292005-01-29 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* buffer.h: Fix comment on buffer_getstr to reflect that it now uses XMALLOC. * buffer.c: (buffer_getstr) Use XMALLOC(MTYPE_TMP) instead of malloc. * filter.c: (access_list_remark,ipv6_access_list_remark) Use argv_concat instead of buffer_getstr. * if.c: (interface_desc) Use argv_concat instead of buffer_getstr. * plist.c: (ip_prefix_list_description,ipv6_prefix_list_description) Use argv_concat instead of buffer_getstr. * bgp_filter.c: (ip_as_path,no_ip_as_path) Use argv_concat instead of buffer_getstr. * bgp_route.c: (bgp_show_regexp) Fix memory leak: need to free string returned by buffer_getstr. (bgp_show_community) Must use XFREE instead of free on string returned by buffer_getstr. * bgp_routemap.c: (set_community) Must use XFREE instead of free on string returned by buffer_getstr. * bgp_vty.c: (neighbor_description) Use argv_concat instead of buffer_getstr.
2005-01-24 * bgp_route.c: Fix showstopper bug. New route must be selected alsohasso
if old one is flaged as BGP_INFO_ATTR_CHANGED.
2005-01-17 * bgp_route.c: Clear peer's routing table regardless whether it'shasso
configured or not. Being not configured is even better reason to do it.
2005-01-052005-01-05 Paul Jakma <paul@dishone.st>paul
* bgp_packet.c: (bgp_write) set socket to nonblock while writing this should be generalised. See bugzilla #102. Fix supplied by wawa@yandex-team.ru (Vladimir Ivanov).
2004-12-09Add comments with warnings obtained on NetBSD/i386. Both are due togdt
size_t being used for streams. Perhaps cast to unsigned long before printf? Surely that's big enough even if size_t could be larger in theory. (no changelog, since only comment changes)
2004-12-082004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* *.c: Change level of debug messages to LOG_DEBUG.
2004-12-082004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* *.c: Change level of debug messages to LOG_DEBUG.
2004-12-082004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* *.c: Change level of debug messages to LOG_DEBUG.
2004-12-082004-12-08 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs
* *.c: Change level of debug messages to LOG_DEBUG.