summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_advertise.h
Commit message (Collapse)AuthorAgeFilesLines
* lib, bgpd: Remove 'struct fifo' from lib/zebra.hDonald Sharp2016-02-261-0/+2
| | | | | | | The 'struct fifo' and it's accompanying #defines do not belong in lib/zebra.h. Move them into their own header. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* bgpd: speed up "no-hit" withdraws for routeserversDavid Lamparter2015-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | This accelerates handling of incoming Withdraw messages for routes that don't exist in the table to begin with. Cisco IOS 12.4(24)T4 has a bug in this regard - it sends withdraws instead of doing nothing for prefixes that are filtered. Pulling up the adj_in removal in Quagga should have no ill effect, but we can avoid the costly iteration over all rsclients if there was no adj_in entry. Performance impact of this change on routeserver with 3 buggy peers, startup/sync time: before patch: 143.12 seconds (user cpu) after patch: 7.01 seconds (user cpu) Many thanks to Nick Hilliard & INEX for providing real-world test data! Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Paul Jakma <paul@jakma.org>
* Fix most compiler warnings in default GCC build.Paul Jakma2014-09-231-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix lots of warnings. Some const and type-pun breaks strict-aliasing warnings left but much reduced. * bgp_advertise.h: (struct bgp_advertise_fifo) is functionally identical to (struct fifo), so just use that. Makes it clearer the beginning of (struct bgp_advertise) is compatible with with (struct fifo), which seems to be enough for gcc. Add a BGP_ADV_FIFO_HEAD macro to contain the right cast to try shut up type-punning breaks strict aliasing warnings. * bgp_packet.c: Use BGP_ADV_FIFO_HEAD. (bgp_route_refresh_receive) fix an interesting logic error in (!ok || (ret != BLAH)) where ret is only well-defined if ok. * bgp_vty.c: Peer commands should use bgp_vty_return to set their return. * jhash.{c,h}: Can take const on * args without adding issues & fix warnings. * libospf.h: LSA sequence numbers use the unsigned range of values, and constants need to be set to unsigned, or it causes warnings in ospf6d. * md5.h: signedness of caddr_t is implementation specific, change to an explicit (uint_8 *), fix sign/unsigned comparison warnings. * vty.c: (vty_log_fixed) const on level is well-intentioned, but not going to fly given iov_base. * workqueue.c: ALL_LIST_ELEMENTS_RO tests for null pointer, which is always true for address of static variable. Correct but pointless warning in this case, but use a 2nd pointer to shut it up. * ospf6_route.h: Add a comment about the use of (struct prefix) to stuff 2 different 32 bit IDs into in (struct ospf6_route), and the resulting type-pun strict-alias breakage warnings this causes. Need to use 2 different fields to fix that warning? general: * remove unused variables, other than a few cases where they serve a sufficiently useful documentary purpose (e.g. for code that needs fixing), or they're required dummies. In those cases, try mark them as unused. * Remove dead code that can't be reached. * Quite a few 'no ...' forms of vty commands take arguments, but do not check the argument matches the command being negated. E.g., should 'distance X <prefix>' succeed if previously 'distance Y <prefix>' was set? Or should it be required that the distance match the previously configured distance for the prefix? Ultimately, probably better to be strict about this. However, changing from slack to strict might expose problems in command aliases and tools. * Fix uninitialised use of variables. * Fix sign/unsigned comparison warnings by making signedness of types consistent. * Mark functions as static where their use is restricted to the same compilation unit. * Add required headers * Move constants defined in headers into code. * remove dead, unused functions that have no debug purpose.
* 2005-06-28 Paul Jakma <paul.jakma@sun.com>paul2005-06-281-10/+10
| | | | | | | | | | * (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-05-23 Paul Jakma <paul@dishone.st>paul2005-05-231-33/+5
| | | | | | * bgp_fsm.h: Add extern qualifier to exported functions * bgp_nexthop.c: add static to nexthop specific globals * *.h: Add guard defines
* Initial revisionpaul2002-12-131-0/+178