summaryrefslogtreecommitdiff
path: root/bgpd
AgeCommit message (Collapse)Author
2009-06-24[bgpd] Add 'show ip bgp view WORD neighbors IP (advertised|received)-routes'Tomasz Pala
* bgp_route.c: Was missing these commands.
2009-06-23[bgpd] review 32-bit AS-path hotfix for 0.99.12Denis Ovsienko
The patch by Chris Caputo, which was used to prepare 0.99.12 release, consists of three parts: 1. memory allocation fix itself 2. fix for warnings about constant variables 3. fix for printf format specs (%d was used instead of %u) It was confirmed later, that: a. a much simpler bugfix was available for memory allocation b. committed version of the bugfix wasn't optimal CPU-wise At this point I consider reasonable to revert the allocation portion of that patch and to replace it with the shorter version, which is: -#define ASN_STR_LEN (5 + 1) +#define ASN_STR_LEN (10 + 1) Other two parts of Mr. Caputo's patch remain intact.
2009-06-23Fix "show ip bgp dampened-paths" garbage output.Chris Caputo
* bgpd/bgp_damp.c: Make bgp_damp_reuse_time_vty() accept a buffer and length, rather than returning a local var buffer whose contents can get trounced. Remove duplicate BGP_UPTIME_LEN define. * bgpd/bgp_damp.h: bgp_damp_reuse_time_vty() prototype change. * bgpd/bgp_route.c: Provide bgp_damp_reuse_time_vty() with a buffer and length. Remove duplicate BGP_UPTIME_LEN define. This problem was noticed in 2005... http://hibernia.jakma.org/~paul/patches/quagga-test.diff ...but the fix didn't make it into the code. Signed-off-by: Chris Caputo <ccaputo@alt.net>
2009-06-23Fixes to RFC2385/MD5 BGPChris Caputo
* bgpd/bgp_network.c: Fix MD5 listen in IPv4 version of bgp_socket() by adding listen socket to listen_sockets list so that MD5 passwords can get set. * lib/sockopt.c: (sockopt_tcp_signature) Fix bogus "% Error while applying TCP-Sig to session(s)" / "can't set TCP_MD5SIG option" startup error messages by not returning error when there isn't one.
2009-06-22[bgpd] Fix 'update-source' command: It doesn't accept interface namesPaul Jakma
* bgp_vty.c: BGP_UPDATE_SOURCE_STR define should only specify IP addresses, the underlying mechanisms won't do anything useful with interface names. Fix bug #527.
2009-06-19[configure] add configure support for PCRE Posix libraryJeremy Jackson
Debian tried unsuccessfully to build with libpcreposix. This adds proper support to autoconf/configure.ac for it. Based on the patch by C.J. Adams-Collier in bug #483. bgpd/bgp_{regex,routemap}.h: Pull in PCRE POSIX header if available.
2009-06-18[BGP/cleanup] make message list in bgp_open constStephen Hemminger
2009-06-18[BGP/cleanup] make community hash table staticStephen Hemminger
2009-06-18[BGP/cleanup] make some damp function staticStephen Hemminger
2009-06-18[BGP/cleanup] make ecommunity variables/functions localStephen Hemminger
2009-06-18[BGP/cleanup] main program cleanupStephen Hemminger
Check result of daemon() call to fix warning Make local variables static
2009-06-18[bgpd/cleanup] make message lists read onlyStephen Hemminger
2009-06-18[bgpd] add comment that bgp_capability_receive is exported for unit-testsPaul Jakma
2009-06-18[cleanup] Fix compile warningsStephen Hemminger
Fix printf format warning and make capability table 'const static'
2009-06-18[bgpd/cleanup] BGP make attribute variables localStephen Hemminger
Message lists can be read-only, and hash tables are local to this code.
2009-06-18[bgpd/cleanup] Make BGP FSM table read-only staticStephen Hemminger
The finite state machine table is immutable.
2009-06-18[bgpd] reference count the BGP instanceStephen Hemminger
When a BGP instance is deleted with lots of routes and neighbors it is possible for the peer rsclient queue to run after bgp_delete has been called. This would lead to bgpd crashing, see https://bugzilla.vyatta.com/show_bug.cgi?id=3436 The fix is to add reference counting to the BGP instance and defer actual freeing until all references are gone. This patch also fixes a memory leak where the self-reference peer instance was being created but never freed. The check in bgp_clear_route is no longer valid because it is possible for it to be called when peer is in Deleted state during cleanup.
2009-06-18[bgpd] Make declarations matchStephen Hemminger
These variables are const.
2009-06-12[cleanup] Make command nodes staticStephen Hemminger
The cmd_nodes used to configure vty, can mostly be static so (basic data hiding 101).
2009-06-12[cleanup] functions taking no args should be declared with void argsStephen Hemminger
Use Ansi-C prototypes rather than old K&R method of declaring function without arguments
2009-06-12[cleanup] Convert XMALLOC/memset to XCALLOCStephen Hemminger
Simple conversion of XMALLOC/memset to XCALLOC
2009-06-09[bgpd] Fixed as-path prepend/exclude ASN handlingDenis Ovsienko
- aspath_gettoken(): use as_t to fix 4-byte ASN scanning (bug #484) - set_aspath_prepend_cmd(): use CMD_AS_RANGE in message to match actual range - no_set_aspath_prepend_val_cmd(): idem - set_aspath_exclude_cmd(): idem - no_set_aspath_exclude_val_cmd(): idem
2009-06-02Merge remote branch 'origin/master'Paul Jakma
2009-06-02[snmp] Compiler warning fixes for when "--enable-snmp" is configured.Chris Caputo
Compiled on 32-bit and 64-bit linux gcc 4.1.2 platforms. No run-time testing on 32-bit and limited run-time testing on 64-bit.
2009-06-02[bgp] Fix crash on SIGHUP, deref of freed workqueuesSteve Hill
* lib/workqueue.c: free-ing workqueues had never been tested obviously, queue's thread was not being stopped * bgpd/bgpd.c: null out freed workqueues, to prevent acting on freed workqueues
2009-06-01[trivia] Fixed typos in communities text (#334)Denis Ovsienko
2009-05-29[bgpd] 64-bit bugfix in community_del_val by Jeremy Jackson <jerj@coplanar.net>Andrew J. Schorr
* bgpd/bgp_community.c: (community_del_val) Fix bug in memcpy that was using the wrong size on architectures where a pointer is not 32 bits.
2009-05-08Fix bgp ipv4/ipv6 accept handlingStephen Hemminger
When bgp calls getaddrinfo, it gets both ipv6 and ipv4 addresses. Unless IPV6_ONLY is set on Linux, only the ipv6 bind will succeed, and the IPV4 connections will come in as mapped connections on the IPV6 socket.
2009-04-30[bgpd] AS4 bugfix by Chris Caputo <ccaputo@alt.net>Denis Ovsienko
* bgpd/bgp_aspath.c: (aspath_make_str_count) "assert (len < str_size)" was getting hit under certain 4-byte ASN conditions. New realloc strategy. * bgpd/bgp_aspath.c: (aspath_key_make) const warning fix. "%d" -> "%u" 4-byte ASN corrections. Prevent negative number when ASN is above 2^31.
2008-11-16[bgpd] Add 'show bgp views' commandMichael Lambert
* bgp_vty.c: (show_bgp_views_cmd) new command to list all defined views. (with small edits by Paul Jakma) Signed-off-by: Paul Jakma <paul@quagga.net>
2008-10-02Merge branch 'bgpd/fsm'Paul Jakma
2008-09-24[bgpd] Fix definition of an rsclient commandMichael Lambert
* bgp_route.c: (show_ip_bgp_view_rsclient_route_cmd) Add the missing "ip" to the command string. Signed-off-by: Paul Jakma <paul@quagga.net>
2008-09-09[bgpd] Allow accepted peers to progress even if realpeer is in ConnectPaul Jakma
* bgpd/bgp_packet.c: (bgp_open_receive) Try fix the little race in the FSM, where a accept-peer that progress faster than realpeer gets closed down if realpeer is still just in Connect, by allowing the realpeer to be bgp_stop'ed and doing the regular swapping-of-FSM state.
2008-09-06[bgpd] Document the FSM dummy-peer race that sometimes afflicts session setupPaul Jakma
* bgp_packet.c: (bgp_open_receive) the accept-peer hack can sometimes cause a race between two peers that try to establish sessions to each other, causing session setup to fail when it should have succeeded. In the worst case, the race can 'loop', causing prolonged failure to establish sessions.
2008-09-04Merge branch 'restricted-mode'Paul Jakma
2008-09-01Merge commit 'remotes/jocke/ospf_neighbour'; commit ↵Paul Jakma
'remotes/jocke/snmp_crosscompile'
2008-08-26Revert "[bgpd] Add 'bgp open-accept' option, to send OPEN immediately on ↵Paul Jakma
accepted conns" Revert commit d664ae1182c29b74b409bc8594b7bd0575e91ce9. An experimental patch which violates RFC4271 quite badly, but managed to accidently sneak its way in.
2008-08-25Make --enable-snmp cross compile and make libcrypto optional with ↵Joakim Tjernlund
--without-crypto Autoconfig work by me, the rest was done by "Kirill K. Smirnov" <lich@math.spbu.ru>
2008-08-23[vty] Add support for a 'restricted mode' with anonymous vty connectionsPaul Jakma
* lib/command.h: Add a RESTRICTED_NODE, intended for use with anonymous, 'no login' vtys, to provide a subset of 'view' mode commands. * lib/command.c: Add RESTRICTED_NODE bits, nothing special, just following VIEW_NODE. * lib/vty.c: (vty_auth) enable authentication should fall back to restricted/view node as appropriate. (vty_create) init vty's to restricted/view node as appropriate, for the 'no login' case. (vty_{no_,}restricted_mode_cmd) config commands to enable 'anonymous restricted' in vty configuration. (vty_config_write) 'anonymous restricted' config. (vty_init) Install some commands to restricted mode, and the 'anonymous restricted' config commands into VTY_NODE. * bgpd/*.c: Install some of the safe(r) BGP commands into 'restricted mode', i.e. lookup commands of non-sensitive data. Useful with looking-glass route-servers.
2008-08-22[administrivia] Update gitignore filesPaul Jakma
- Add more stuff, archive libraries, etc..
2008-08-22[administrivia] Git should ignore backup files and .loT filesPaul Jakma
2008-08-22[trivia] Remove ChangeLog files, as this data is now maintained in SCMPaul Jakma
2008-08-22[bgpd] remove useless check and return in bgp_config_write_dampStephen Hemminger
2008-08-17 Stephen Hemminger <stephen.hemminger@vyatta.com> * bgp_damp.?: (bgp_config_write_damp) remove useless check of statically allocated config storage, and useless return value Signed-off-by: Paul Jakma <paul@quagga.net>
2008-08-22[warnings] Fix various SOS warningsPaul Jakma
2008-08-15 Paul Jakma <paul.jakma@sun.com> * */*: Fix various problems flagged by Sun Studio compiler. - '<qualifier> <storage>' obsolescent in declarations - empty statements (';' after ALIAS definitions) - implicit declarations (e.g printstack in lib/log.c) - "\%" in printf string instead of "%%" - loops that return on the first iteration (legitimately, but compiler can't really know), e.g. bgp_routemap.c - internal declarations which mask prototypes.
2008-08-22[lib] mes_lookup string lookup table argument should be marked constStephen Hemminger
2008-08-14 Stephen Hemminger <stephen.hemminger@vyatta.com> * lib/log.{c,h}: struct message argument should point to const * */*.c: adjust to suit, Signed-off-by: Paul Jakma <paul@quagga.net>
2008-08-22[lib] hash compare function arguments ought to be const qualifiedStephen Hemminger
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>
2008-08-22[build] Test for GNU-style PIE support in toolchain and enablePaul P Komkoff Jr
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-08-22[bgpd] Add 'bgp open-accept' option, to send OPEN immediately on accepted connsPaul Jakma
2007-08-31 Paul Jakma <paul.jakma@sun.com> * (general) Add 'bgp open-accept' option, to allow bgpd to send OPEN on accepted connections, i.e. to not wait till after collision-detect to send OPEN, which appears to be allowed in RFC4271. This may help speed up establishing sessions, or help avoid FSM problems with sessions to certain peers. Not enabled by default though.
2008-08-22[administrivia] Add .gitignore files, based on .cvsignores.Paul Jakma
2008-07-22[bgpd] Fix triggerable crash when compiled with --disable-bgp-announcePaul Jakma
2008-07-22 Paul Jakma <paul.jakma@sun.com> * HACKING: Document preference for compiler conditional code, over cpp conditional. * configure.ac: DISABLE_BGP_ANNOUNCE always should be defined. * bgp_{packet,route,advertise}.c: change to compiler testing of DISABLE_BGP_ANNOUNCE, rather than cpp. 2008-07-22 MIYAJIMA Mitsuharu <miyajima.mitsuharu@anchor.jp> * bgp_packet.c: (bgp_update_packet_eor) Fix crash triggerable if a bgpd was compiled with --disable-bgp-announce and if GR is advertised by peer.