Commit Graph

7591 Commits

Author SHA1 Message Date
Renato Westphal
9785dbcbca ldpd: fix log level of log_warn() and log_warnx()
The log_warn() and log_warnx() functions indicate non-critical warnings
and errors, so use LOG_ERR instead of LOG_CRIT.

Keep using LOG_CRIT only in fatal() and fatalx() since these functions
indicate critical errors (when the program needs to exit).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-06-05 12:18:58 -03:00
Renato Westphal
0b4d8f1e38 ldpd: split log.c into two files
This is basically to keep in sync with OpenBSD's ldpd(8) where the same
change was done.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-06-05 12:05:22 -03:00
Don Slice
a9609069a5 bgpd: fix ipv6 network statement label-index node
Problem reported with the inability to define "network xx::/64 label-index" to
the config.  Found that the install_element was pointing to the wrong node.

Ticket: CM-16615
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2017-06-05 13:13:57 +00:00
Donald Sharp
697629e190 Merge remote-tracking branch 'origin/stable/2.0' 2017-06-05 08:19:11 -04:00
Donald Sharp
e8863a75e6 Merge pull request #665 from opensourcerouting/rpm-postun-fix
redhat/frr.spec.in: Fix postun script for Fedora.
2017-06-05 07:46:11 -04:00
Donald Sharp
98c02f4cc1 babeld: Modify code to use zapi_route function
Signed-off-by: Donald Sharp <sharpd@cumuusnetworks.com>
2017-06-04 19:21:40 -04:00
Donald Sharp
657cde1267 lib: Add zapi_route function.
Allow routing protocols to call one function to add/delete
routes into zebra.  Future commits will start adding
this code to individual routing protocols.

Why are we doing this?  Well the zapi_ipv[4|6]_route functions
are fundamentally broken in their ability to pass down anything
but NEXTHOP_TYPE_IFINDEX or NEXTHOP_TYPE_IPV[4|6] and we need
the ability to pass down a bit more information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-04 19:14:44 -04:00
Quentin Young
31c6fa450a zebra: remove extraneous help string
caused tag to display null0 helpstr

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-04 21:01:52 +00:00
Renato Westphal
33a57d94fa bgpd: fix segfault with some show commands
The following commands were causing bgpd to crash when vpnv4/vpnv6 static
routes are configured:

bgpd aborted: vtysh  -c "show ip bgp view all ipv4 vpn json"
bgpd aborted: vtysh  -c "show ip bgp view all ipv4 vpn"
bgpd aborted: vtysh  -c "show ip bgp view all ipv6 vpn json"
bgpd aborted: vtysh  -c "show ip bgp view all ipv6 vpn"
bgpd aborted: vtysh  -c "show ip bgp vrf all ipv4 vpn json"
bgpd aborted: vtysh  -c "show ip bgp vrf all ipv4 vpn"
bgpd aborted: vtysh  -c "show ip bgp vrf all ipv6 vpn json"
bgpd aborted: vtysh  -c "show ip bgp vrf all ipv6 vpn"
bgpd aborted: vtysh  -c "show bgp view all ipv4 vpn json"
bgpd aborted: vtysh  -c "show bgp view all ipv4 vpn"
bgpd aborted: vtysh  -c "show bgp view all ipv6 vpn json"
bgpd aborted: vtysh  -c "show bgp view all ipv6 vpn"
bgpd aborted: vtysh  -c "show bgp vrf all ipv4 vpn json"
bgpd aborted: vtysh  -c "show bgp vrf all ipv4 vpn"
bgpd aborted: vtysh  -c "show bgp vrf all ipv6 vpn json"
bgpd aborted: vtysh  -c "show bgp vrf all ipv6 vpn"

Problem found with the CLI fuzzer.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-06-04 19:12:14 +00:00
Quentin Young
406f99f81d bgpd: fix addpath buffer overrun
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-04 19:07:55 +00:00
Quentin Young
cb63fd542a ospf6d: fix filter-list commands
incorrect indexes resulted in use of area id as the name of the prefix
list

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-04 19:05:14 +00:00
Quentin Young
ce2570bc0a bgpd: fix large-community-list commands
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-04 19:04:56 +00:00
Quentin Young
7d6e13e138 ospfd: fix 'show ip ospf interface json'
json obj not recreated for each interface

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-04 18:50:12 +00:00
Quentin Young
0c2206de31 ospfd: shufflin
move virtual-link command down to be next to its no form

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-04 18:49:07 +00:00
Quentin Young
f1c2f41143 ospfd: fix virtual-link timers commands
Use {} semantics, correct docstrings, switchup parsing.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-04 18:48:57 +00:00
Martin Winter
e321aed1e9 redhat/frr.spec.in: Fix postun script for Fedora.
Fedora uninstall showed some non-fatal postun script error because of an empty if which only applied to other distro's

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-06-04 00:43:34 -07:00
Renato Westphal
082ac4fc2f Merge pull request #656 from qlyoung/fix-varhandler-reachable
lib: free varhandlers on exit
2017-06-03 19:00:52 -03:00
Renato Westphal
247e6469da Merge pull request #657 from donaldsharp/rompapotamus
Rompapotamus
2017-06-03 18:52:59 -03:00
Renato Westphal
b49f20e36d Merge pull request #663 from chiragshah6/pim_dev
ospfd: Fix ospf timers commands
2017-06-03 18:45:23 -03:00
Renato Westphal
045e974877 Merge pull request #646 from qlyoung/fix-ospf-timers
Fix ospf timers
2017-06-03 13:29:31 -03:00
Donald Sharp
ce9798c433 Merge pull request #664 from opensourcerouting/ldpd-fixes
Ldpd fixes/cleanup
2017-06-03 11:00:26 -04:00
Chirag Shah
fac05f2fd6 ospfd: fix clear ip ospf interface cmd
clear ip ospf interface <IFNAME> parsing issue,
instead of arguement of interface "IFNAME" parsed.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-06-02 22:52:41 -07:00
Renato Westphal
ca534dcb41 Merge pull request #654 from qlyoung/ignore-compile-commands
frr: ignore 'compile_commands.json'
2017-06-02 23:27:56 -03:00
Renato Westphal
e91163e78c Merge pull request #647 from qlyoung/zebra-mpls-error-messages
zebra: more informative error messages & help strings for mpls labels
2017-06-02 22:53:53 -03:00
Renato Westphal
2cfaf92bc8 Merge pull request #652 from donaldsharp/miscapotamus
Miscapotamus
2017-06-02 22:40:56 -03:00
Renato Westphal
802f0900c4 Merge pull request #650 from donaldsharp/zebrafication
zebra: Refactor 'struct rib' to be 'struct route_entry'
2017-06-02 22:38:51 -03:00
Renato Westphal
e4a82008c6 ldpd: further improvements in the configuration handling
This patch attempts to make the code easier to read by removing a
global variable and changing a few other things. Also, ldpd now calls
merge_config() only after reading the whole initial configuration at
startup, instead of doing that for every command in the configuration
file.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-06-02 22:15:17 -03:00
Renato Westphal
ca70b756bf ldpd: remove variable that is not necessary anymore
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-06-02 22:08:07 -03:00
Renato Westphal
be0fbdebca ldpd: fix bug in pseudowire control-word negotiation
Bingen discovered a bug in the pseudowire control-word negotiation that
might happen when the "control-word exclude" command is used. Under some
very specific conditions, ldpd might ignore a PWID label mapping when
it shouldn't.

This patch removes a wrong optimization that was preventing ldpd to call
l2vpn_pw_reset() every time we change the configuration of a pseudowire.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-06-02 22:07:33 -03:00
Chirag Shah
3ba2603926 ospfd: Fix ospf timers command
ospf timers related commands under router ospf were not accepted
due to incorrect argument count check.

timers throttle lsa all (0-5000)
timers throttle spf (0-600000) (0-600000) (0-600000)
timers lsa arrival (0-1000)
timers lsa min-arrival (0-600000)

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-06-02 15:49:13 -07:00
Donald Sharp
7656e7fc46 pimd: Remove qpim_inaddr_any
In prep for switching over to having PIM understand VRF
remove the qpim_inaddr_any global variable and just
use INADDR_ANY directly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-02 13:44:37 -04:00
Donald Sharp
9ce0f6a5df ospfd: Make OSPF TE warnings be less chatty
If you are not using OSPF-TE than there is no need to
be warned that we cannot find anything about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-02 13:44:13 -04:00
Donald Sharp
9a7aa8be43 vtysh: Cleanup some stuff(tm)
1) vtysh_config_dump was not properly indented.  Fix

2) Add VRF_NODE to be line_uniq when parsing return from sub-daemons

3) Fix 'no log monitor' to be line_uniq as well

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-02 13:43:57 -04:00
Donald Sharp
1da2945621 lib, zebra: Pass up kernel table_id for vrf's
pim controls the vrf table creation for due to the way that
pim must interact with the kernel.  In order to match the
table_id for unicast <-> multicast( not necessary but a
real nice to have ) we need to pass up from zebra the
table_id associated with the vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-02 13:43:15 -04:00
Quentin Young
2b4dc78f7f lib: free varhandler on exit
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-02 17:24:01 +00:00
Quentin Young
09acca5bb0 frr: ignore 'compile_commands.json'
This file is generated by most tooling for Clang and generally wants to
be in the root directory. Best to ignore it.

https://clang.llvm.org/docs/JSONCompilationDatabase.html

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-02 17:09:21 +00:00
Donald Sharp
58f1b7ccbd zebra: Fix help string ordering
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-02 07:35:38 -04:00
Donald Sharp
bade23d3b0 pimd: Remove some unneeded debugs from pim
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-01 20:11:19 -04:00
Donald Sharp
4b872c22a3 nhrpd: Guard a debug that was constantly spewing information
This debug when nhrpd was just running but not configured
was constantly being sent to the log file.  Filling it
with useless information

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-01 20:09:06 -04:00
Donald Sharp
95c7c2dd3d doc: Fix up some missed stuff for Ubuntu 12.04 build doc
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-01 20:05:15 -04:00
David Lamparter
509fac8d85 release: frr-3.0-rc0 2017-06-01 19:23:00 +02:00
Donald Sharp
f0f77c9a59 zebra: Refactor 'struct rib' to be 'struct route_entry'
The 'struct rib' data structure is missnamed.  It really
is a 'struct route_entry' as part of the 'struct route_node'.
We have 1 'struct route_entry' per route src.  As such
1 route node can have multiple route entries if multiple
protocols attempt to install the same route.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-01 08:00:05 -04:00
Quentin Young
95db01eb22 lib: use heap for pollfds
a bunch of pollfds can cause a stack overflow when using a stack
allocated buffer...silly me...

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-31 23:21:40 +00:00
Quentin Young
6feb1a21af zebra: define mpls label helpstr
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-31 21:50:20 +00:00
Quentin Young
8062bf1c6b zebra: more informative error messages for mpls labels
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-31 21:31:55 +00:00
Quentin Young
b1c02cec70 ospfd: shufflin
move virtual-link command down to be next to its no form

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-31 19:08:33 +00:00
Renato Westphal
f0683d2227 Merge pull request #634 from dwalton76/bgp-ipv6-nexthop-ll-and-global-takeII
bgpd: resolve IPv6 LL and Global nexthop issue
2017-05-31 16:07:57 -03:00
Quentin Young
a663a38ef8 ospfd: fix virtual-link timers commands
Use {} semantics, correct docstrings, switchup parsing.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-31 19:07:49 +00:00
David Lamparter
a1e61a923f Merge pull request #645 from qlyoung/nonblocking-fixup
poll() fixup
2017-05-31 20:47:30 +02:00
Donald Sharp
fdcff57c97 Merge pull request #643 from opensourcerouting/2.0-pcreposix
[2.0] fix --enable-pcreposix
2017-05-31 13:43:45 -04:00