summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_community.c
Commit message (Collapse)AuthorAgeFilesLines
* bgp: change () to (void)Stephen Hemminger2009-02-091-1/+1
| | | | | Use Ansi-C prototypes rather than old K&R method of declaring function without arguments
* [lib] hash compare function arguments ought to be const qualifiedStephen Hemminger2008-08-221-1/+2
| | | | | | | | | | | | 2008-08-14 Stephen Hemminger <stephen.hemminger@vyatta.com> * lib/hash.h: (struct hash) Hash comparator callback really ought to treat storage behind arguments as constant - a compare function with side-effects would be evil. * */*.c: Adjust comparator functions similarly, thus fixing at least a few compiler warnings about const qualifier being dropped. Signed-off-by: Paul Jakma <paul@quagga.net>
* [bgpd] fix a couple of trivial compiler warningsPaul Jakma2008-07-221-2/+2
| | | | | | | | | | 2008-07-22 Paul Jakma <paul.jakma@sun.com> * bgp_community.c: (community_str2com) assigns defaults to local vars * bgp_attr.c: (bgp_attr_parse) match format specifier to arg * bgp_table.{c,h}: (bgp_table_top) can take a * to a const, quelling warning in bgp_route.c
* [bgpd] low-impact DoS: crash on malformed community with debug setPaul Jakma2007-09-071-0/+6
| | | | | | | | | | | | | | 2007-09-07 Paul Jakma <paul.jakma@sun.com> * (general) bgpd can be made crash by remote peers if debug bgp updates is set, due to NULL pointer dereference. Reported by "Mu Security Research Team", <security@musecurity.com>. * bgp_attr.c: (bgp_attr_community) If community length is 0, don't set the community-present attribute bit, just return early. * bgp_debug.c: (community_str,community_com2str) Check com pointer before dereferencing.
* [bgpd] CID#62 fix double-free, use-after-free in community_str2comPaul Jakma2006-05-081-1/+1
| | | | | | | 2006-05-08 Paul Jakma <paul.jakma@sun.com> * bgp_community.c: (community_str2com) Coverity CID#62, fix double-free, use-after-free.
* [bgpd] Fix infinite loop in community_str2comPaul Jakma2006-03-301-6/+8
| | | | | | | | | | | | | | 2006-03-30 Paul Jakma <paul.jakma@sun.com> * bgp_community.c: (community_gettoken) Unknown token should return NULL, to give a strong indication to callers that the token no longer can be parsed, otherwise callers looping on this function may have a hard time ending their loop. (community_str2com) While loop around community_gettoken appears to have been coded thinking that break statement would break from the while{}, hence it could never exit for unknown token case. Fix it to do..while, so it can use the NULL result from community_gettoken easily.
* [compiler] miscellaneous trivial compiler warning fixespaul2006-01-191-1/+0
| | | | | | | | | | | | | 2006-01-19 Paul Jakma <paul.jakma@sun.com> * (general) various miscellaneous compiler warning fixes. Remove redundant break statements from switch clauses which return. return from main, not exit, cause it annoys SOS. Remove stray semi-colons which cause empty-statement warnings. * zebra/main.c: (sighup) remove private declaration of external function.
* 2005-06-28 Paul Jakma <paul.jakma@sun.com>paul2005-06-281-8/+8
| | | | | | | | | | * (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.
* 2004-10-13 Paul Jakma <paul@dishone.st>paul2004-10-131-6/+7
| | | | | | | | | | | * (global) more const'ification and fixups of types to clean up code. * bgp_mplsvpn.{c,h}: (str2tag) fix abuse. Still not perfect, should use something like the VTY_GET_INTEGER macro, but without the vty_out bits.. * bgp_routemap.c: (set_aggregator_as) use VTY_GET_INTEGER_RANGE (no_set_aggregator_as) ditto. * bgpd.c: (peer_uptime) fix unlikely bug, where no buffer is returned, add comments about troublesome return value.
* 2004-06-04 Paul Jakma <paul@dishone.st>paul2004-06-041-2/+2
| | | | * type mismatch fixes
* Initial revisionpaul2002-12-131-0/+629