OpenSourceRouting
  1. OpenSourceRouting

quagga-snap

Public
AuthorCommitMessageCommit dateIssues
Everton MarquesDavid LamparterEverton Marques
a59b6152bbczebra: point rib_match_ipv4() to ._safi()Since rib_match_ipv4() is just rib_match_ipv4_safi() for SAFI_UNICAST, the former can be removed and pointed to the latter instead. Cc: Balaji G <balajig81@gmail.com> Cc: Everton Marques <everton.marques@gmail.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Everton MarquesDavid LamparterEverton Marques
346a8b50334zebra: add rib_match_ipv4_safi()This is the same as rib_lookup_ipv4(), without the SAFI hardcoded. Cc: Balaji G <balajig81@gmail.com> Cc: Everton Marques <everton.marques@gmail.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
f7b3d1e067azebra: identify MRIB on debug messagessince the same code handles both URIB and MRIB, the debug messages can get rather confusing if the RIB isn't identified. Mark the MRIB in debug messages so we can distinguish that. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
e0b0ac8c97dzebra: factor out rib debug logsIntroduces a logging function that takes a struct route_node * argument, and prefixes log output with that node's prefix. While this removes some duplication, it will also later be useful for srcdest route nodes. Behaviour before and after the patch should be exactly identical. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
1c6db0d2da3lib: don't create circular lists (fixes 6d83113)LISTNODE_DETACH doesn't clear out the node, and LISTNODE_ATTACH doesn't set ->next (since it assumes a fresh/zeroed listnode). As a result, the new listnode_move_to_tail() created a nice circular list, in turn crashing ospfd in ospf_write() later. Reported-by: Martin Winter <mwinter@netdef.org> Fixes: 6d83113 ("ospfd: Tweak previous iface RR write patch to avoid free/malloc & redundant log") ...
David LamparterDavid Lamparter
daefeb8755ebgpd: set BGP_ATTR_MP_[UN]REACH_NLRI (fixes 1a211cb)Unfortunately, the attribute present bits for MP_REACH and MP_UNREACH which 1a211cb ("bgpd: one more fix"...) tests for are never set in their corresponding attribute parsing functions. Reported-by: Martin Winter <mwinter@netdef.org> Fixes: 1a211cb "bgpd: one more fix for tightening of check for missing well-known attributes" Cc: Paul Jakma <paul@opensourcerouting.org> Signed-off-by: David Lam...
David LamparterDavid Lamparter
cffe7807c03bgpd: stop startup timer on stopping BGP (fixes dd49eb1)bgp_delete() really needs to kill t_startup, otherwise after creating and quickly destroying a BGP instance it may fire on a deallocated struct bgp, overwriting memory. Reported-by: Martin Winter <mwinter@netdef.org> Fixes: dd49eb1 ("Fix BGP's use of restart bit.") Cc: Vipin Kumar <vipin@cumulusnetworks.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Vincent JARDI...
Greg TroxelGreg Troxel
273b1bd341azebra/kernel_socket.c: Use platform alignmentUse the platform-provided RT_ROUNDUP macro to align sockaddrs on the routing socket, rather than using hard-coded assumptions about alignment. Emit a warning if the OS doesn't define alignment macros. Resolves failure of ripngd on NetBSD 6 i386, which changed alignment to uint64_t from long.
Paul JakmaPaul Jakma
5e4ba81dc21doc: Document 'set as-path prepend' and 'set as-path prepend last-as'
Timo TeräsPaul JakmaTimo Teräs
85c854aa720bgpd: implement route-map set as-path prepend last-asIt picks up the AS to add from the aspath, or uses the peers AS number. Useful mostly in iBGP setups. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Reviewed-by: Paul Jakma <paul@opensourcerouting.org>
Paul JakmaPaul Jakma
1a211cb369dbgpd: one more fix for tightening of check for missing well-known attributes* bgp_attr.c: (bgp_attr_check) The check for missing NEXT_HOP has the right spirit, but wrong where it counts, on the logic. It wouldn't catch a missing NEXT_HOP on a v4-only UPDATE. It would though have incorrectly flagged next-hop as missing on multi-protocol-only UPDATEs. Caught by Martin Winter with a test-suite.
Paul JakmaPaul Jakma
ec98d90767bbgpd: trivial, remove unneeded extra variable in bgp_capability_restart
Vipin KumarPaul JakmaVipin Kumar
dd49eb1f023Fix BGP's use of restart bit.bgpd-restart-bit-fix.patch ISSUE: Quagga BGP doesn't send or use the restart-bit via the Graceful-Restart(GR) capability. GR capability implementation isn't complete as per the RFC. PATCH: Patch uses BGP instance creation as the beginning of the startup period, and 'restart_time' is taken as the startup period. As a result, BGP will set the restart bit in the GR capability of the OPEN messa...
Paul JakmaPaul Jakma
443010383e2bgpd: remove unused variables
Vipin KumarPaul JakmaVipin Kumar
4bab6806914Fix to take care of ordering between interface and router ospf command.SYMPTOM: Interface mode OSPF area configuration is not retained after restarting quagga. Example - quagga(config)# interface swp49 quagga(config-if)# ip ospf area 0.0.0.0 quagga# sh run <snip> interface swp49 ip ospf area 0.0.0.0 ipv6 nd suppress-ra link-detect ! quagga# write memory * Restart quagga at this point* quagga# sh run <snip> interface swp49 ipv6 nd suppress-ra link-detec...
Dinesh G DuttPaul JakmaDinesh G Dutt
ad5233a1bcdAdd set ipv6 next-hop peer-address command.IPv4 has the ability to specify the peer address with the keyword peer-address. IPv6 mandates the use of a specific global or local address only in setting the next-hop in routemaps. This makes it cumbersome to configure some large networks with BGP and IPv6. This patch fixes that deficiency. Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Reviewed-by: Paul Jakma <paul@opensourcerouti...
Dinesh G DuttPaul JakmaDinesh G Dutt
8306be211f1OSPFd: Update timestamps when we MaxAge LSAs.When an LSA is flushed we need to update the timestamps for them. This allows for the node to give the neighbor sufficient time to send back an acknowledgement before retransmission kicks in. Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com> Reviewed-by: James Li <jli@cumulusnetworks.com> Reviewed-by: Paul Jakma <paul@opensourcero...
Paul JakmaPaul Jakma
6d831139569ospfd: Tweak previous iface RR write patch to avoid free/malloc & redundant log* linklist.{c,h}: (listnode_move_to_tail) new unction to move a listnode to tail of list. * ospf_packet.c: (ospf_write) remove debug that seemed to be mostly covered by existing debug. Use listnode_move_to_tail to just move the list node to the end of the tail, rather than freeing the one to hand and allocing a new one.
Dinesh G DuttPaul JakmaDinesh G Dutt
1c06334f51cAvoid timing out of adjacencies by serving all interfaces in round-robin.Ensure that all interfaces are served in a round robin fashion during write. This prevents adjacencies from timing out when you have a lot of LSAs to be sent out each adjacency. This is essentially a scalability improvement. Signed-off-by: Ayan Banerjee <ayan@cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com> Rev...
Dinesh G DuttPaul JakmaDinesh G Dutt
56a5f7752d9Added show command to display only the routes in the RIB that does not count ECMPsSigned-off-by: Ayan Banerjee <ayan@cumulusnetworks.com> Reviewed-by: JR Rivers <jrrivers@cumulusnetworks.com> Reviewed-by: Paul Jakma <paul@opensourcerouting.org>
Dinesh G DuttPaul JakmaDinesh G Dutt
d1b0991ad84Make static IPv6 routes respect non-default routing tables.Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com> Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com> Reviewed-by: Paul Jakma <paul@opensourcerouting.org>
Paul JakmaPaul Jakma
b6eef003e1aospfd: Some small tweaks to the SPF execution reason patch* ospf_spf.h: use an enum for the reason, and have it as a new argument to ospf_spf_calculate_schedule, no need for additional call, and let compiler do the checking. * ospf_spf.c: format changes - Quagga coding style places function names at the start of a new line, for easy grepping for definition. (ospf_spf_calculate_timer) Change the log format of SPF execution time to avoid ginor...
Dinesh G DuttPaul JakmaDinesh G Dutt
50f38b3500aCompute and display SPF execution statisticsDetailed SPF statistics, all around time spent executing various pieces of SPF such as the SPF algorithm itself, installing routes, pruning unreachable networks etc. Reason codes for firing up SPF are: R - Router LSA, N - Network LSA, S - Summary LSA, ABR - ABR status change, ASBR - ASBR Status Change, AS - ASBR Summary, M - MaxAge Signed-off-by: Dinesh G Dutt <ddutt@cumulusnetworks.com> Revi...
Stephen HemmingerVincent JARDINStephen Hemminger
88d37b902bcmake some structures constant.These pre-initialized arrays are not modified. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Feng Lu <lu.feng@6wind.com>
BalajiDavid LamparterBalaji
9511633e08fzebra: MBGP routes should not be installed in the kernelMBGP routes are used only for PIM RPF checks and hence should not be installed in the kernel's FIB. Ignore route node set to Multicast SAFI. Signed-off-by: Balaji.G <balajig81@gmail.com> Acked-by: Everton Marques <everton.marques@gmail.com> [pushed down rn->table->info assignment below assert] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
c68f6d9dbb9tests: fix tests for 055086f (well-known attr check)Fix tests/aspathtest.c by including an ORIGIN attribute in the testcases. After 055086f "bgpd: well-known attr check only run for v4/uni, which could cause a crash," we're now checking for it and tests are failing due to that. Note that test #11 ("4b AS4_PATH w/o AS_PATH") is no longer accepted as OK since the function now checks for the existence of an AS_PATH attr. Fixes: 055086f ("bgpd: w...
David LamparterDavid Lamparter
59135bde254build: fix 9562a77... (mrlg removal)mrlg.cgi was removed in 9562a77 "mrlg: Remove obsolete version." but the file was still listed in Makefile.am. Fixes: 9562a77 ("mrlg: Remove obsolete version.") Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David LamparterDavid Lamparter
93b344f3b14Revert "zebra: Set link-detect on by default"This reverts commit 773224404cb33b2dbd3d8d8d2572013603995ce4. This patch is nontrivial but wasn't passed along on the mailing list; this is a revert purely on procedural reasons. Signed-off-by: David Lamparter <equinox@diac24.net>
Dinesh G DuttPaul JakmaDinesh G Dutt
773224404cbzebra: Set link-detect on by defaultSigned-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Reviewed-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com>
Paul JakmaPaul Jakma
aed1b556cf2bgpd: Fixes for recent well-known-attr check patch.* bgp_attr.c: Recent patch to tighten well-known attr checks and apply that to all AFIs has some breakage with MP-extensions and GR, which needs to be fixed. (bgp_attr_check) Graceful Restart EoR can be an empty UPDATE for IPv4/uni. MP-Ext allow UPDATE with just MP_UNREACH_NLRI. Check for these and return proceed. NEXT_HOP becomes optional, if MP_REACH_NLRI is present and there's no...
Paul JakmaPaul Jakma
9562a7774b7mrlg: Remove obsolete version.* mrlg.cgi: The version we shipped was very much out of date, remove it. * mrlg.txt: Add file pointing to the official MRLG site.
Vincent JARDINVincent JARDIN
f80ba04074fHandy guidelines to contributeExplain how to be a nice contributor in a handy way. Signed-off-by: Vincent JARDIN <vincent.jardin@6wind.com> Acked-by: Paul Jakma <paul@jakma.org>
Joakim TjernlundVincent JARDINJoakim Tjernlund
6b274d90fa9ospfd: Don't leave stale RouterLSA's when changing areaIDSigned-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Feng Lu <lu.feng@6wind.com>
Stephen HemmingerVincent JARDINStephen Hemminger
3790eb0d3f0stream: remove unused stream_read_unblockThe one place this was being used in BGP is now gone, can remove deprecated interface. Acked-by: Feng Lu <lu.feng@6wind.com>
Yasuhiro OharaVincent JARDINYasuhiro Ohara
bdd8cd70a04Bug in ospf6_lsa_compare()This fix is probably correct on 32bit systems, but i think it will not work on 64bit systems. sizeof(signed long) would be 8 and therefore the cast from u_int32_t will map all the values to non-negative part of long int. You would like to use int (like in ospfd) and change the type of seqnuma, seqnumb to that. The type int32_t would be even more proper, but sizeof(int) is 4 on relevant platfo...
Joakim TjernlundVincent JARDINJoakim Tjernlund
ea2a598411cospfd: invalid MD5 auth_key?This looks fishy in ospf_make_md5_digest() if (list_isempty (OSPF_IF_PARAM (oi, auth_crypt))) auth_key = (const u_int8_t *) ""; ... MD5Update(&ctx, auth_key, OSPF_AUTH_MD5_SIZE); auth_key points to a "" string of len 1 which is a lot smaller that OSPF_AUTH_MD5_SIZE. Is this intentional to get some random data or just a plain bug? Anyone using MD5 should have a closer look and decide what t...
Lu FengVincent JARDINLu Feng
969d3550a8czebra: route_unlock_node is missing in "show ip[v6] route <prefix>" commandsSigned-off-by: Feng Lu <lu.feng@6wind.com> Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
Paul JakmaPaul Jakma
384d7ad98c1docs: defines.texi include seems to want to be after setfilename* quagga.texi: I'm getting warnings about stuff in defines.texi not being defined when building quagga.info. Seems to be fixed by moving the include of defines.texi to the end of the header. Also, the Texinfo docs suggest setfilename must go first.
Paul JakmaPaul Jakma
7a6eec54eafzebra: Build the test client, can be useful, and add IPv6 to testrib.conf
Olivier Cochard-LabbéPaul JakmaOlivier Cochard-Labbé
f6444e4f6e1FreeBSD has changed its SOCK_RAW for being truly raw.
Paul JakmaPaul Jakma
055086f70febgpd: well-known attr check only run for v4/uni, which could cause a crash.* ANVL testing by Martin Winter threw up a crash in bgpd in aspath_dup called from bgp_packet_attribute, if attr->aspath was NULL, on an IPv6 UPDATE. This root cause is that the checks for well-known, mandatory attributes were being applied only if an UPDATE contained the IPv4 NLRI and the peer was configured for v4/unicast (i.e. not deconfigured). This is something inherited from ...
Joakim TjernlundPaul JakmaJoakim Tjernlund
b166ea2dda9[lib] Add support for backtrace on more platforms* lib/sigevent.c: (program_counter) extend to support more platforms. Joint effort with Paul Jakma.
Paul JakmaPaul Jakma
18f420e9f99lib/plist: Add some required parentheses, according to clang-analyzer
Paul JakmaPaul Jakma
16f1606382bripng_nexthop: remove unused store to variable
Paul JakmaPaul Jakma
7bef33cbf50ospf6_lsdb: trivial, make it clear that showfunc is set before deref.
Paul JakmaPaul Jakma
b2dd59ee0e7bgpd.c: Remove unused store to variable
Paul JakmaPaul Jakma
7aa9dcef80bFix most compiler warnings in default GCC build.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 ri...
Paul JakmaPaul Jakma
010ebbbca63Add missing GPL headers, and copyright claims that certainly apply.* Fix (a subset of)? files with non-trivial code that are missing GPL headers. * A few copyright claims added which I am certain apply, but which I had missed out on the original commits. NB: Copyright claims are not exclusive and the addition of any copyright claim should not be read as implying a lack of any further claims, or denying the validity of any other claims. All those with clai...
Steve HillPaul JakmaSteve Hill
ea555004096lib: Improve error reporting from broken config files* command.h: (config_from_file) Add variable to interface for line number reporting. * command.c: (config_from_file) Set & increment 'line_num' while parsing. * vty.c: (vty_read_file) Report parse errors in the correct order to stderr, with added line numbers.
Paul JakmaPaul Jakma
d4a8607d12eHACKING: remove an unneeded escape