Commit Graph

12377 Commits

Author SHA1 Message Date
Donald Sharp
1fae5ff24f lib: routemap.c trust backet->data
The backet->data cannot be NULL, no need to check for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-15 17:53:09 -04:00
Donald Sharp
d3ce24ef57 lib: Update hash.h documentation
The hash_get function when called and the alloc_func returns
a NULL value, we do not create a backet nor do we insert
anything into the hash.  As such backet->data must always
be non-NULL.

Modify the description in hash_get to inform of this.
Additionally indicate that hash_walk and hash_iterate
cannot have a NULL backet->data value.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-15 17:53:09 -04:00
David Lamparter
f5bffa5a74
Merge pull request #2845 from donaldsharp/cmsg_foolishness
lib, ripngd, zebra: Remove pre-solaris 9 special cased code
2018-08-15 22:10:56 +02:00
Donald Sharp
97f21f8c64
Merge pull request #2838 from opensourcerouting/bfd-alpine
bfdd: fix alpine build
2018-08-15 15:30:26 -04:00
Donald Sharp
adf0e7c6d7 lib, ripngd, zebra: Remove pre-solaris 9 special cased code
The CMSG_FIRSTHDR was broken on solaris pre version 9.  Version 9
was released in May of 2002 and EOL'ed in 2014.  Version 8 EOL'ed
in 2012.  Remove special case code for a little used platform
that has not seen the light of day in a very long time.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-15 15:06:53 -04:00
Rafael Zalamena
6bd01eebb2
Merge pull request #2844 from donaldsharp/unused
bfdd: Fix `don't assign to value to ourself` compiler warning
2018-08-15 15:49:05 -03:00
Donald Sharp
f0d2be3317 bfdd: Fix don't assign to value to ourself compiler warning
We were attempting to get around a unused value by setting
a variable to itself, but it runs afoul of a different
compiler and a message about not setting a variable to
itself.  So let's mark the ttl value as unused.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-15 13:48:09 -04:00
Quentin Young
24a04145c5
Merge pull request #2837 from ppmathis/cidr-style
bgpd: Always show CIDR mask when displaying routes
2018-08-15 12:37:58 -04:00
Donald Sharp
32b8321167
Merge pull request #2840 from opensourcerouting/snap-bfdd
snapcraft: Add bfdd to snap package
2018-08-15 07:54:50 -04:00
Donald Sharp
c4a811668d
Merge pull request #2843 from LabNConsulting/working/lb/doc-solo
bgpd: document how to avoid reflecting advertised information back to originator
2018-08-15 07:54:08 -04:00
Lou Berger
199ad5c47f user: document neighbor ... solo config
Signed-off-by: Lou Berger <lberger@labn.net>
2018-08-14 23:58:25 -04:00
Rafael Zalamena
1608496459 bfdd: fix alpine build
Move `recvmsg` parameter option initialization to function, initialize
the parameter struct with zeroes and access field by name.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-14 17:52:14 -03:00
Rafael Zalamena
98ef9c165c bfdd: fix downtime display
BFD peer status show command was using the wrong variable to display the
downtime counter.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-08-14 17:52:14 -03:00
Martin Winter
64a6fb039b snapcraft: Add bfdd to snap package
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-08-14 13:31:54 -07:00
Pascal Mathis
89e5e9f028
bgpd: Always show CIDR mask when displaying routes
Classful networking has been obsolete for ages and there is currently an
inconsistency between `show ip route` and `show bgp`, where the first
one always displays the CIDR mask while the second one hides classful
network masks.

This commit adjusts the behavior of `show bgp` to always show the CIDR
mask for a route, even when it is classful.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
2018-08-14 19:40:42 +02:00
Quentin Young
94cb1f61a4
Merge pull request #2805 from opensourcerouting/malloc-size
lib: track total memory per MTYPE if possible
2018-08-14 11:43:39 -04:00
Donald Sharp
6c70521823
Merge pull request #2294 from opensourcerouting/bfd-final
bfdd: add BFD support
2018-08-14 08:57:44 -04:00
Donald Sharp
d6853655b5
Merge branch 'master' into bfd-final 2018-08-14 08:16:10 -04:00
Donald Sharp
4354a8052c
Merge pull request #2823 from opensourcerouting/snap-staticd
Updates to snap package to support staticd
2018-08-14 07:48:15 -04:00
Donald Sharp
067d5028c1
Merge pull request #2833 from opensourcerouting/assorted-fixes
Assorted fixes (pre-northbound)
2018-08-13 20:24:57 -04:00
Donald Sharp
3e93c4e3fe
Merge pull request #2832 from opensourcerouting/rm-debug-leftovers
zebra: remove unguarded debugging leftovers
2018-08-13 19:05:36 -04:00
Renato Westphal
91e5b43ab4 lib, vtysh: fix inconsistent interface commands in vtysh
The definition of the interface commands in vtysh.c were outdated.
Currently, all daemons that call if_cmd_init() will have the "no interface
IFNAME" command and the "[no] description" commands as well, so there's
no need to define exceptions for these commands anymore.

To fix this, make extract.pl parse the if.c file so that vtysh can get the
interface commands from there automatically. Only the "interface IFNAME
[vrf NAME]" must be kept in vtysh.c because it changes the vty node and
thus needs special treatment.

Finally, make pimd and pbrd display interface descriptions on "sh run"
when they are configured.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-08-13 18:59:31 -03:00
Renato Westphal
34c4627457 lib, vtysh: fix inconsistent VRF commands in vtysh
* Only zebra and pimd call vrf_cmd_init(), so these are the only daemons
  that should receive VRF commands from vtysh;
* "netns NAME" and "no netns NAME" are available only in zebra, write
  custom DEFSHs in vtysh to make it aware of that;
* Remove the "no vrf NAME" definition from vtysh.c and expose the
  original command to vtysh by converting the DEFUN_NOSH to a simple
  DEFUN. This command doesn't change the vty node so there's no need to
  special case it.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-08-13 18:59:31 -03:00
Renato Westphal
1e9d118345 zebra: fix "no pseudowire IFNAME" on vtysh
We must hide only "pseudowire IFNAME" from vtysh, the "no" form of the
command should be made available to the extract.pl script. Split the
command into two to fix this problem.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-08-13 18:59:31 -03:00
Renato Westphal
281bd4dddf ldpd: use DEFPY_NOSH whenever possible
All ldpd commands were written using DEFPY except the ones that needed
to be ignored by vtysh, in which case we were using DEFUN_NOSH. Now that
DEFPY_NOSH is available, convert the remaining commands for consistency
and to simplify the code a little bit.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-08-13 18:59:31 -03:00
Renato Westphal
26d19c83b4 lib: implement DEFPY_NOSH
This is the DEFPY equivalent of DEFUN_NOSH.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-08-13 18:59:31 -03:00
Renato Westphal
cd02856824 babeld: avoid reading the configuration file twice
The frr_config_fork() function called by all FRR daemons during
initialization already takes care of reading the startup configuration
file.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-08-13 18:59:31 -03:00
Renato Westphal
9ea82f28d4 lib: add listnode_add_head()
Provide a new convenience function that adds an element to the beginning
of a list.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-08-13 18:59:31 -03:00
Martin Winter
138aa674c2 snapcraft: Add new staticd to snap package
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-08-13 14:55:59 -07:00
Martin Winter
45d005874e vtysh: Fix missing tailing / in --config_dir option parsing
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-08-13 14:55:59 -07:00
Renato Westphal
4373435488 zebra: remove unguarded debugging leftovers
These debug messages were committed by accident.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2018-08-13 18:53:45 -03:00
David Lamparter
27982ebc9d
Merge pull request #2830 from pacovn/Coverity_1221459_revert
ospf6d: revert fix for Coverity 1221459
2018-08-13 21:05:34 +02:00
Quentin Young
cd22c8ca74
Merge pull request #2820 from opensourcerouting/err-prep
remove alloc return value checks + minor babeld cleanup
2018-08-13 14:56:56 -04:00
F. Aragon
e26253c08b
ospf6d: revert fix for Coverity 1221459
The correction in commit 7edb6aa (PR #2502) was wrong, as it is was not
taking in consideration the unlock counter. Thanks to @eqvinox for noticing
it.

Signed-off-by: F. Aragon <paco@voltanet.io>
2018-08-13 19:46:56 +02:00
Quentin Young
5487152318
Merge pull request #2827 from pacovn/Coverity_1472310_Unchecked_return_value
bgpd: return value check (Coverity 1472310)
2018-08-13 13:22:17 -04:00
Rafael Zalamena
9af533f1d9
Merge pull request #2828 from pacovn/Coverity_1472311_null_check
staticd: null check (Coverity 1472311)
2018-08-13 14:09:31 -03:00
David Lamparter
a8c96c10bd
Merge pull request #2825 from dslicenc/frr-reload-vni
tools: correct frr-reload.py handling of bgp vni/exit-vni config
2018-08-13 19:04:52 +02:00
David Lamparter
6229137f6b
Merge pull request #2824 from vishaldhingra/reg_case
peer_delete did not trigger ZEBRA_NEXTHOP_UNREGISTER to ZEBRA
2018-08-13 19:04:13 +02:00
F. Aragon
45b28d099c
staticd: null check (Coverity 1472311)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-08-13 18:10:09 +02:00
F. Aragon
4d8405699e
bgpd: return value check (Coverity 1472310)
Signed-off-by: F. Aragon <paco@voltanet.io>
2018-08-13 18:05:42 +02:00
vishaldhingra
d5c4bac937 peer_delete did not trigger ZEBRA_NEXTHOP_UNREGISTER to ZEBRA
bgp_unlink_nexthop_check() PEER should be NULL and bgp_info list count should be 0

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2018-08-12 00:20:17 -07:00
Martin Winter
7e5a886a0b doc: Add missing flowspec.rst to distribution tar file
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-08-11 16:39:35 -07:00
Donald Sharp
e8c8f2e064 babeld: Use enum instead of #defines for kernel route type information
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-11 19:58:23 +02:00
Donald Sharp
1314370166 tests: Cleanup assumption that ALLOC could fail.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-11 19:58:23 +02:00
Donald Sharp
5cecdba9d1 lib: Remove memory check test
Found a missed memory check test that can just be removed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-11 17:14:58 +02:00
Quentin Young
aad95a7dc2 ripd: re-add check for rip_create fail
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-08-11 17:14:58 +02:00
Donald Sharp
0ce1ca805d *: ALLOC calls cannot fail
There is no need to check for failure of a ALLOC call
as that any failure to do so will result in a assert
happening.  So we can safely remove all of this code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-11 17:14:58 +02:00
Quentin Young
1408cdfc07
Merge pull request #2809 from opensourcerouting/routemap-rpki-fix
bgpd: Fix bgp rpki to match route-map update from PR #2697
2018-08-10 16:42:37 -04:00
David Lamparter
7aea4b8167 tools/checkpatch: fix some bogus macro warnings
checkpatch was throwing an error for "#define FOO , bar"

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-10 20:46:35 +02:00
Don Slice
d60f480010 tools: correct frr-reload.py handling of bgp vni/exit-vni config
Problem reported that when a peer-group was added in certain
configurations, it would be rejected because of the order of the
commands put in by nclu. Issued turned out to be how frr-reload.py
was handling the sub-sub-context of the vni under the address-family
and subsequently how it handled the following exit-vni.

Ticket: CM-21996
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-08-10 09:59:24 -07:00