zebra: 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>
zebra: 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>
zebra: 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>
zebra: 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>
lib: 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")
...
bgpd: 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...
bgpd: 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...
zebra/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.
bgpd: 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>
bgpd: 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.
Fix 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...
Fix 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...
Add 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...
OSPFd: 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...
ospfd: 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.
Avoid 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...
Added 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>
ospfd: 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...
Compute 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...
make 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>
zebra: 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>
tests: 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...
build: 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>
Revert "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>
zebra: 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>
bgpd: 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...
mrlg: 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.
Handy 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>
ospfd: 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>
stream: 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>
Bug 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...
ospfd: 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...
zebra: 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>
docs: 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.
bgpd: 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 ...
Fix 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...
Add 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...
lib: 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.