Commit Graph

8682 Commits

Author SHA1 Message Date
Jorge Boncompte
f104f6c1a6 lib: cleanup the work queue implementation
Convert the work queue implementation to not use the generic linked list
to mantain the item list and use instead a simple queue from queue.h that
does not allocate memory for each node.

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
2017-08-17 17:47:07 +02:00
Jorge Boncompte
cd85bc2e0b lib: standardize use of queue.h
The simple queue implementation in OpenBSD and FreeBSD are called diferently,
standardize in the use of the FreeBSD version and map the missing names only
if we compile on OpenBSD.

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
2017-08-17 17:47:05 +02:00
Jorge Boncompte
01dccc0b19 lib: inline route_node_lock()/route_node_unlock()
Avoid function calls.

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
2017-08-17 17:46:22 +02:00
Daniel Walton
c6e7b95248 pimd: "No Path to RP address specified" should exit 0
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

This could happen if routing isn't up yet but the command did take so we
should exit 0 here.  Testing:

root@cel-redxp-10[frr-dwalton76]# vtysh -c 'conf t' -c' ip pim rp
11.11.11.11'
% No Path to RP address specified: 11.11.11.11
root@cel-redxp-10[frr-dwalton76]# echo $?
0
root@cel-redxp-10[frr-dwalton76]#
2017-08-17 15:04:25 +00:00
Donald Sharp
7fe9e03556 Merge pull request #999 from fabled/master
nhrpd: use hop count 1 for registration requests
2017-08-17 10:48:28 -04:00
Donald Sharp
9c273c6d28 eigrpd: Rework ack sent to neighbor
EIGRP schedules and builds packets to send in the future.
Before those packets are being sent, we are receiving
update information from our peer.  At that time we
need to reach into the built packet and reset the
outgoing ack to a better value.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-17 10:02:54 -04:00
Timo Teräs
ef9329ac02 nhrpd: use hop count 1 for registration requests
Cisco has a bug that it rejects packets with zero hop count.
Use one to avoid potential forwarding of registration requests.

Fixes #951

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
2017-08-17 16:57:09 +03:00
Donald Sharp
907b430346 eigrpd: Store nbr in packet data
Store the neighbor information( if available ) in the packet
data that we are sending.  This will allow in a future commit
the ability to fixup the outgoing ack we are sending.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-17 09:53:51 -04:00
Donald Sharp
3bbde7327a eigrpd: Remove extra newline in debug
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-17 09:48:21 -04:00
David Lamparter
f66bd13f3c Merge pull request #994 from dwalton76/ospfd-show-neighbor
ospfd: "show ip ospf neighbor" options not passed
2017-08-17 12:37:25 +02:00
Daniel Walton
596074af62 vtysh: vtysh -f FOO should exit non-zero if it hits an error
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

Today if we hit an error while apply the contents of file FOO that error
does not bubble up to a non-zero exit.
2017-08-16 20:22:59 +00:00
Daniel Walton
b4e84315e4 ospfd: "show ip ospf neighbor" options not passed
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2017-08-16 18:40:12 +00:00
David Lamparter
74218b297f Merge pull request #989 from qlyoung/if-area-df
ospfd: remember area-id format for ifaces
2017-08-16 19:28:09 +02:00
David Lamparter
c9974c7995 Merge pull request #984 from donaldsharp/debugging
Some Small Pim Issues
2017-08-16 19:18:31 +02:00
Russ White
863f4bf143 Merge pull request #990 from donaldsharp/eigrp_cleanup
Eigrp cleanup
2017-08-16 13:16:54 -04:00
David Lamparter
1208e7bca2 Merge pull request #979 from donaldsharp/ifchannel_fix
pimd: Ensure cleanup of S,G on ifchannel failure to create
2017-08-16 19:16:46 +02:00
David Lamparter
ad5c17afcd Merge pull request #972 from chiragshah6/mdev
Pim Bfd related changes
2017-08-16 19:14:08 +02:00
Quentin Young
5ed0add5e4
ospfd: remember area-id format for ifaces
Display dotted quad or decimal back in the config depending on what the
user enters.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-08-16 11:18:11 -04:00
Martin Winter
fb13970d31 Merge pull request #985 from chiragshah6/mdev2
ospfd: Fix ospfd crash in free_nexthop
2017-08-15 20:30:23 -07:00
Donald Sharp
9a8d52a495 eigrpd: Cleanup eigrp_get_fsm_event
Make this function a bit more legible

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-15 22:38:17 -04:00
Donald Sharp
748a2ba408 eigrpd: Make eigrp_get_fsm_event use metric changed
Refactor eigrp_get_fsm_event a tiny bit to let all
the states get the new metric.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-15 22:38:17 -04:00
Donald Sharp
9294886309 eigrpd: cleanup eigrp_topology_update_distance
Cleanup eigrp_topology_update_distance to
return an enum of whether or not the metric
has changed or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-15 22:38:17 -04:00
Donald Sharp
47bf9e213a pimd: Add 'show ip msdp vrf all sa ...' command
Allow the ability to iterate over all vrfs.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-15 16:37:13 -04:00
Donald Sharp
0dac59e943 Merge pull request #983 from opensourcerouting/vtysh-watchfrr-no-conf
vtysh: don't collect config from watchfrr
2017-08-15 11:37:15 -04:00
Quentin Young
001169e172 Merge pull request #982 from opensourcerouting/buildfix-parallel-tests-clippy
tests: fix clippy include paths / double-build
2017-08-15 11:28:37 -04:00
Chirag Shah
cd4af52574 ospfd: Fix ospfd crash in free_nexthop
Fix ANVL-OSPF-5.1 reported ospfd crash.

vertex_nexthop_free was added as valgrind reported potential
memory leak, but in some cases nexthop would not be available
freed.
The actual nexthop free is part of ospf_canonical_nexthops_free(),
upon trying to free, qfree checks mtype count becomes 0 and asserts.
Removing vertex_nexthop_free() from ospf_spf_flush_parents().

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-08-15 07:47:08 -07:00
Donald Sharp
15507b63e6 pimd: Rename duplicate JSON key
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-15 10:31:09 -04:00
Donald Sharp
8dbdb215b3 pimd: Add more vrf debugging to pim_upstream.c
Cleanup a few missed spots of debugging to know
what vrf we are talking about.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-15 10:17:33 -04:00
Donald Sharp
2243bb17bd pimd: Allow user to specify ip address for 'no ip pim use-source'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-15 10:16:51 -04:00
David Lamparter
0ed9196b0c redhat: ship IRDP module
No point in configuring IRDP (it's always available on Linux), just ship
the module and let the user decide whether to enable it by way of module
loading.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 14:19:16 +02:00
David Lamparter
a23587faac vtysh: don't collect config from watchfrr
This results in some hardcoded watchfrr logging config ending up in the
integrated config otherwise.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 13:43:50 +02:00
David Lamparter
e2799b1d67 Merge pull request #935 from donaldsharp/kernel_metric
zebra: Pay attention to metric from kernel
2017-08-15 13:42:04 +02:00
Donald Sharp
6e5d1bf498 Merge pull request #976 from lucize/lededoc
doc: add LEDE/OpenWRT build instructions
2017-08-15 07:30:54 -04:00
David Lamparter
8dc1f7fc88 zebra: irdp: convert into module
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 13:26:55 +02:00
David Lamparter
ead4ee99ac zebra: irdp: manage separate IRDP struct
This allocates the per-interface IRDP data as needed; so the pointer in
zebra_if is now really opaque.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 13:26:03 +02:00
David Lamparter
2eb27eecf0 zebra: start detangling rtadv & irdp
Replace some cross-dependencies with hooks & move bits to where they
belong.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 13:25:44 +02:00
David Lamparter
ce19a04aea lib: replace if_add_hook with hook_* logic
This allows modules to register their own additional hooks on interface
creation/deletion.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 13:25:44 +02:00
David Lamparter
2a6a7a656d doc: sample code-doc in .rst+sphinx
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 13:25:44 +02:00
David Lamparter
0395137477 *: centralize some exit cleanup into libfrr
Start creating a counterpart to frr_init and frr_late_init.
Unfortunately, some daemons don't do any exit handling, this doesn't
change that just yet.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 13:25:44 +02:00
David Lamparter
08c4c73be6 lib: hooks: support priority ordering & reversing
Allow registering callbacks with a priority value used to order them
relative to each other.  Plus a reverse variant that just flips the
direction on priorities.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 13:25:41 +02:00
David Lamparter
279f5e0934 tests: fix clippy include paths / double-build
A mismatch between the make rule and the include path causes dependency
tracking to try to build the clippy.c file twice (at the same time),
which results in spurious build failures.

Fixes: #971
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-08-15 11:21:07 +02:00
David Lamparter
865f5bb8cb Merge pull request #978 from devicenull/master
bgpd: Check for per-peer outbound configuration, in addition to the peer-group config
2017-08-15 11:12:15 +02:00
David Lamparter
bf30e5eaf2 Merge pull request #948 from qlyoung/fix-set-ip-next-hop-peer-address
lib, bgpd: fix `set ip next-hop peer-address`
2017-08-15 11:10:01 +02:00
David Lamparter
24fb3b1873 Merge pull request #934 from qlyoung/mac-parser
lib: add CLI token for 48-bit mac addresses
2017-08-15 11:09:15 +02:00
Donald Sharp
c6f94e1971 pimd: Ensure cleanup of S,G on ifchannel failure to create
There exists a path for ifchannel creation that if a S,G
fails to create and a corresponding *,G ifchannel is there,
the S,G will be deleted but we were leaving the S,G in the
*,G ifchannel sources list.  Remove from the list in this case

Ticket: CM-17605
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-08-14 20:16:48 -04:00
Brian Rak
a1e91fee4c bgpd: Check for per-peer outbound configuration, in addition to the peer-group config
When displaying the config, bgpd only checked for the existance of a peer-group prefix-list before
deciding to not display the outbound prefix-list.  This commit updates the outbound prefix-list
logic to match the inbound.
2017-08-14 17:25:12 -04:00
Lucian Cristian
1c58ed47bf doc: add LEDE/OpenWRT build instructions
Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2017-08-14 22:22:06 +03:00
Quentin Young
473196f613
lib, python: add M:A:C support for clippy
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-08-14 11:30:08 -04:00
Jafar Al-Gharaibeh
7e4f56d349 Merge pull request #959 from donaldsharp/pim_fixes
Pim fixes
2017-08-14 09:58:23 -05:00
Chirag Shah
df83d4e19d pimd: pim bfd vrf aware
BFD replay for all interfaces was only considering VRF_DEFAULT interface
list.
The change will walk all VRFs, interface list per VRF to register pim
neighbor with BFD.

Signed-off-by: Chirag shah <chirag@cumulusnetworks.com>
2017-08-13 17:41:01 -07:00