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.
lib: include thread information in backtracesnow that we know what thread we're currently executing, let's add that
information to SEGV / assert backtraces.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib: unstupidify thread debug informationthe library's thread scheduling functions keep track of the thread
function's name, so far so good. However, copying the compiler-provided
constant into a buffer inside the thread structure is plain useless.
Also, strip_funcname() was trying to support something that never
happens.
Instead, let's use some bytes here to track where threads are scheduled
from. Another commit will print that in...
zebra: fix rtnh_len in the rt_netlink messages for multipath caseIn _netlink_route_build_multipath():
- Each time when appending a IPv4 gateway in the message, rtnh_len
is increased by sizeof (struct rtattr) + 4, where we should use
"bytelen" instead of the hard coding "4".
- As what done for IPv4, we should increase rtnh_len accordingly
along with adding a IPv6 gateway, or else the IPv6 gateways will
be lost.
Signed-off-by: Feng Lu <lu.feng@6wind.c...
ripd: allow to enable/disable the ECMP featureIntroduce a new command "[no] allow-ecmp" to enable/disable the
ECMP feature in RIP. By default, ECMP is not allowed.
Once ECMP is disabled, only one route entry can exist in the list.
* rip_zebra.c: adjust a debugging information, which shows the number
of nexthops according to whether ECMP is enabled.
* ripd.c: rip_ecmp_add() will reject the new route if ECMP is not
...
ripd: add ECMP support* Each node in the routing table is changed into a list, holding
the multiple equal-cost paths.
* If one of the multiple entries gets less-preferred (greater
metric or greater distance), it will be directly deleted instead
of starting a garbage-collection timer for it.
The garbage-collection timer is started only when the last entry
in the list gets INFINITY.
* Some new functions ar...
lib: unset ZEBRA_IFA_PEER if no dst addr present (BZ#801)On OpenBSD, carp interfaces claim to be PtP interfaces with a 0.0.0.0/0
peer address. We process those in zebra and try to send them to
clients, at which point they get encoded as all-0. The client code,
however, decodes that to a NULL pointer instead of 0.0.0.0. This later
turns into a SEGV when CONNECTED_PREFIX sees that ZEBRA_IFA_PEER is set
and tries to access the peer prefix.
This is a...
isisd: type mix-up in 28a8cfc "don't require IPv4"Whoops, these are in6_addrs, not prefix_ipv6... funnily enough, it does the
right thing either way, if it compiles, which it only does on Linux because
IN6_IS_ADDR_LINKLOCAL contains a cast to the right type. On BSD there is no
such cast, hence it explodes on trying to compile, trying to access struct
members of in6_addrs while operating on prefix_ipv6...
Fixes: 28a8cfc ("isisd: don't require...
bgpd: memmove needed in community_del_valIn bgpd/bgp_community_del_val memcpy is used for potentially overlapping
regions which is *not* safe. It may "work" in some cases but is not
guaranteed to work in all cases. The case that I saw fail was on an
x86_64 architecture with the number of bytes being moved/copied equal to
8.
The way the code is written the uint32_t pointers will always differ by
1, which is equivalent to a memcpy/memm...
build: do not assume glibc on linuxThe whole IPv6 stack detection could need refactoring. But this
fixes the linux check to not assume glibc. Fixes build against
musl c-library.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
zebra: fix struct msghdr initializersstruct msghdr field orders are not strictly specified in POSIX.
Improve portability by using designated initializer. This fixes
build against musl c-library where struct msghdr is POSIX
compliant (Linux kernel and glibc definitions are non-conforming).
As the result is also more readable, struct iovec initilizers
were also converted.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by...
*: fix detection and usage of sys/cdefs.hThis header is non-standard (though present on many systems) and
there is no standard for what it should or should not define.
Remove it where it is not really needed. But add also a configure
check, so it can be used if available but otherwise fallback to
defining the needed macroes.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
isisd: don't require IPv4 for adjacencyThis was precluding isisd from IPv6-only operation; no adjacency would
come up unless there was IPv4 in parallel.
Reported-by: Martin Winter <mwinter@netdef.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
tests/bgpd: don't hardcode error number (fix f57000c)f57000c ("bgpd: don't send NOTIFY twice for malformed attrs") introduces
BGP_ATTR_PARSE_ERROR_NOTIFYPLS as additional error code that implies the
caller should sent a NOTIFY and convert it to BGP_ATTR_PARSE_ERROR.
Sadly, the latter was hardcoded in bgp_mp_attr_test.c, which now didn't
consider the new value to be an error.
Make the testcase treat all nonzero values as error without discern.
S...
ripd: use only one constant for derivationRIP_MAX_RTE is defined in ripd.h as 25 but is in fact the
result of a formula. More over it is not used in the code:
the code itself includes the fomula. This makes it un-clear
for maintenance.
Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>