Commit Graph

11241 Commits

Author SHA1 Message Date
Quentin Young
62362d70aa
Merge pull request #2223 from ppmathis/fix/no-password-warnings
lib: Improved warnings for 'no (enable) password'
2018-05-14 11:01:19 -04:00
Donald Sharp
c02bcc728b
Merge pull request #2225 from xdel/master
Fix compilation against rtrlib with ssh
2018-05-13 13:14:22 -04:00
Pascal Mathis
4911ca9cab
lib: Moved no-password warnings into header file
The warning string which appears when the users executes 'no (enable)
password' was moved into command.h and declared as a constant named
'NO_PASSWD_CMD_WARNING'.

This avoids duplicate code and makes it easy to change the warning
message in all places at once.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
2018-05-13 19:11:43 +02:00
Andrey Korolyov
45c0bedaa5 Fix compilation against rtrlib with ssh
Signed-off-by: Andrey Korolyov <andrey@xdel.ru>
2018-05-13 13:36:50 +03:00
Pascal Mathis
eb83f7ce84
lib: Improved warnings for 'no (enable) password'
When the user executes one of the commands 'no password' or 'no enable
password', a warning message gets shown to inform the user of the
security implications.

While the current implementation works, a warning message gets printed
once for each daemon, which can lead to seeing the same message many
times. This does not affect functionality, but looks like an error to
the user as it can be seen within issue #1432.

This commit only prints the warning message inside lib when vtysh
dispatch is not being used. Additionally, the warning message was copied
into the vtysh command handlers, so that they get printed exactly once.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
2018-05-12 22:22:09 +02:00
Russ White
05859298a3
Merge pull request #2217 from donaldsharp/pim_threads
Pim cleanup when networking restarts under itself
2018-05-12 06:41:27 -04:00
Russ White
439fcfd306
Merge pull request #2216 from qlyoung/fix-doc-warnings
doc: cleanup zebra vrf docs
2018-05-12 06:40:14 -04:00
Russ White
596b724cc1
Merge pull request #2215 from qlyoung/docuser-building-openbsd6
doc: update pkg version for automake on openbsd6
2018-05-12 06:39:29 -04:00
Russ White
0231e11c1a
Merge pull request #2214 from donaldsharp/pointer_counting
More bgp fixes
2018-05-12 06:38:57 -04:00
Russ White
cfe50de15b
Merge pull request #2213 from donaldsharp/errno
some small bgp issues
2018-05-12 06:38:02 -04:00
Russ White
4f366c086c
Merge pull request #2211 from chiragshah6/ospf_vrf_dev
ospfd: packet fifo init in interface create
2018-05-12 06:37:00 -04:00
Russ White
8d659e9168
Merge pull request #2197 from qlyoung/docuser-debianpkg
doc: move Debian packaging docs to dev docs
2018-05-12 06:27:26 -04:00
Russ White
2d6d27bcf1
Merge pull request #2196 from LabNConsulting/working/master/bgpd-shutdown-race
BGP: Preclude race condition between listener thread and core during shutdown
2018-05-12 06:27:00 -04:00
Russ White
16c3f08823
Merge pull request #2189 from qlyoung/move-bug-reports-to-docs
doc: move REPORTING-BUGS to user docs
2018-05-12 06:25:48 -04:00
Russ White
8b07901a37
Merge pull request #2187 from qlyoung/remove-netbsd
frr: remove README.NetBSD
2018-05-12 06:25:17 -04:00
Russ White
efe6e16ade
Merge pull request #2171 from pguibert6WIND/misc_crashes_moving_ifp_from_netns
Misc crashes moving ifp from netns
2018-05-12 06:24:45 -04:00
Russ White
6b50b12ac7
Merge pull request #2162 from qlyoung/fix-vpath-build
doc: support VPATH builds
2018-05-12 06:23:03 -04:00
Russ White
71ef4ee49a
Merge pull request #2132 from donaldsharp/missed_stuff
Missed stuff
2018-05-12 06:18:15 -04:00
Russ White
1b6e597cca
Merge pull request #2124 from donaldsharp/missed
bgpd, zebra: Handle EVPN router MAC per next hop
2018-05-12 06:16:02 -04:00
Donald Sharp
48d331e7dd pimd: Clean up rpf_hash *after* upstream cleanup
Cleanup the pim->rpf_hash after upstream cleanup is done
since upstream cleanup uses the rpf_hash to cleanup itself.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-11 18:39:09 -04:00
Donald Sharp
26bb1fd528 pimd: Allow interface to move in and out of vrfs
When we get an interface move event track the correct
pim instance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-11 18:38:01 -04:00
Donald Sharp
399495806c pimd: Cleanup all pim_ifp pointers on termination
Properly cleanup pim_ifp pointers on termination

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-11 18:36:24 -04:00
Donald Sharp
7692c5ae82 pimd: Cleanup ifchannel deletion
When we are being told to go away, cleanup ifchannel deletion
a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-11 18:36:24 -04:00
Donald Sharp
845d9af76a pimd: Cleanup msdp shutdown
Shutdown pim msdp code a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-11 18:36:24 -04:00
Donald Sharp
172e45dc30 pimd: Cleanup the deletion event a tiny bit
The pim_upstream_free command was leaving slag by
not deleting data associated with the upstream
data structure.  Modify the code to explicitly free
all data associated with an upstream on a pim instance
deletion event.  Additionally the end result is that
the pim_upstream_free command is not needed anymore

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-11 18:36:24 -04:00
Quentin Young
80ca5b6d75 doc: cleanup zebra vrf docs
* Fix missing references
* Fix displaced reference target
* Fix miscellaneous typos
* Remove duplicate CLI documentation
* Rewrap lines to 80 characters

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-11 16:08:06 -04:00
Quentin Young
6dc2757463 doc: update pkg version for automake on openbsd6
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-11 16:05:14 -04:00
Donald Sharp
5456d3b844
Merge pull request #2172 from msablic/pim_igmp_stats
pimd: show ip igmp statistics command
2018-05-11 13:48:31 -04:00
Donald Sharp
2c263b3bca
Merge pull request #2207 from ppmathis/fix/bgpd-snmp-peer-lookup
bgpd: fix and improve snmp peer lookups
2018-05-11 09:32:08 -04:00
Lou Berger
d2b349f9c8
Merge pull request #2202 from dslicenc/bgp-neigh-auto-complete
bgpd: fix auto-completion for neighbors and peer-groups
2018-05-11 08:49:17 -04:00
Donald Sharp
971c03d1ce
Merge pull request #2208 from ppmathis/fix/debianpkg-env-pager
debianpkg: improve VTYSH_PAGER environment check
2018-05-11 08:08:47 -04:00
Donald Sharp
deb253051a
Merge pull request #2212 from ppmathis/feature/implement-no-password-cmd
lib: Ported 'no (enable) password' from stable/3.0
2018-05-11 08:07:18 -04:00
vivek
450e362d2a bgpd: Set NEXT_HOP attribute for EVPN imported routes
Ensure that when EVPN routes are imported into a VRF as IPv4 routes,
the NEXT_HOP attribute is set. In the absence of this, this attribute
is currently not generated when advertising the route to peers in the
VRF. It is to be noted that the source route (the EVPN route) will only
have the MP_REACH_NLRI attribute that contains the next hop in it.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Reviewed-by:   Don Slice <dslice@cumulusnetworks.com>
2018-05-11 08:02:42 -04:00
vivek
528cd74fd3 bgpd: Update parent entry's refcount for imported routes
Imported routes in a VRF routing table have a reference to their parent
route entry which resides in the EVPN or IPVPN routing table. Ensure that
this reference uses appropriate locking so that the parent entry doesn't
get freed prematurely.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 13cb6b22ba9d558b1b4a1e8752f63f13242462a7)

Conflicts:
	bgpd/bgp_mplsvpn.c

Ticket: CM-20471
Testing Done:
a) Ran vrf_route_leak tests without fix and hit crash, ran twice with fix
and did not see the crash.
b) Ran evpn-smoke and ensured there were no new failures.
2018-05-11 08:02:05 -04:00
Pascal Mathis
2b8e62f2db
bgpd: fix and improve snmp peer lookups
The previous implementation of bgp_peer_lookup_next did not consider the
internal ordering of peers when using peer groups, which led to all
standalone peers being skipped that had a lower IP address than the
highest IP address of a peer belonging to a group.

As the ordering of peers can not be arbitrary due to SNMP requiring
increasing OIDs when walking an OID tree, this commit fixes the bug by
properly looping through all peers and detecting the next highest IP
address.

Additionally, this commit improved both bgp_peer_lookup_next and
peer_lookup_addr_ipv4 by using the socketunion stored within the peer
struct (peer->su) instead of calling inet_pton for each peer during
comparison.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
2018-05-11 13:54:57 +02:00
Donald Sharp
c42eab4bf5 bgpd: Respect ability to reach nexthop if available
When bgp is thinking about opening a connection to a peer,
if we are connected to zebra, allow that to influence our
decision to start the connection.

Found Scenario:

Both bgp and zebra are started up at the same time.  Zebra is
being used to create the connected route through which bgp
will establish a peering relationship.  The machine is a
bit loaded due to other startup conditions and as such bgp
gets to the connection stage here before zebra has installed
the route.  If bgp does not respect zebra data when it does
have a connection then we will attempt to connect.  The
connect will fail because there is no route.  At that time
we will go into the connect timeout(2 minutes) and delay
connection.

What this does.  If we have established a zebra connection and
we do not have a clear path to the destination at this point
do not allow the connection to proceed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-11 07:46:43 -04:00
Donald Sharp
54ff5e9b02 bgpd: Cleanup messages from getsockopt
The handling of the return codes for getsockopt was slightly wrong.

getsockopt returns -1 on error and errno is set.
What to do with the return code at that point is dependent
on what sockopt you are asking about.  In this case
status holds the error returned for SO_ERROR.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-11 07:34:24 -04:00
Pascal Mathis
322e2d5c69
lib: Ported 'no (enable) password' from stable/3.0
The pull request #1545 from @donaldsharp introduced the command 'no
password' to remove an existing terminal connection password.
Additionally, warnings have been added to both 'no password' and 'no
enable password' to make the user aware of any security implications.

It seems that this specific pull request was never merged against master
and got lost. This commit is a cherry-pick of d4961273cb with fixed
conflicts and updated documentation.

Thanks to @donaldsharp and @pogojotz for the original PR.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
2018-05-11 02:54:30 +02:00
Chirag Shah
4fc8a85288 ospfd: packet fifo init in interface create
Currently, interface packet transmit queue is created/deleted
as part of Interface UP/Down event. This results in
a rare condition where port came up but queue
was not created. The creation of queue occupies only few bytes.

Moving fifo queue creation to interface create
would add few bytes of fifo creation but at least it guaranteed
to be available during Up/down -->Up event.

Initialize ospf packet fifo queue during ospf
interface creation.

Drain queue during interface down event.

Drained and free the queue as part of the interface
delete/cleanup.

Ticket:CM-20744
Testing Done:

Bring up ospfv2 topology with multiple neighbors.
1) Trigger multiple shut/no shut events and validate
all queues are freed.
2) configure/deconfigure router ospf and validate
all ospf instance and interface underneath are freed.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-05-10 17:45:43 -07:00
Pascal Mathis
332266dbd1
debianpkg: improve VTYSH_PAGER environment check
The current post-installation scripts for all Debian packages execute
grep 'VTYSH_PAGER=/bin/cat' to check if the VTYSH_PAGER variable is
present within /etc/environment.

While presence of that environment variable should be checked, the
current implementation does not handle this line being a comment (and
therefor not active) or the user picking a different VTYSH_PAGER than
/bin/cat.

This commit ensures that the environment variable can be freely changed
by the user, while still guaranteeing that it is present in the file
without being a comment.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
2018-05-11 00:03:23 +02:00
Don Slice
47a306a040 bgpd: fix auto-completion for neighbors and peer-groups
Before this fix, both real neighbors and peer-groups were lumped
together in auto-completion and it didn't work at all for
peer-groups.  This fix changes that behavior to do the right
thing.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2018-05-10 17:59:27 +00:00
Jafar Al-Gharaibeh
3dc755e492
Merge pull request #2195 from qlyoung/docuser
doc: update doc titles
2018-05-10 10:24:06 -05:00
Lou Berger
97b4a0ec78 bgpd: block io thread reads once shutdown has started
Signed-off-by: Lou Berger <lberger@labn.net>
2018-05-10 08:47:11 -04:00
Lou Berger
f3c8da18cb
Merge pull request #2075 from pguibert6WIND/doc_vrf
doc: add information about zebra VRF configuration
2018-05-10 06:56:56 -04:00
Quentin Young
9993fd8bac doc: move Debian packaging docs to dev docs
Updated the doc to cross-reference build documentation as well and
reformatted to RST. Removed stub section on how to configure daemons and
whatnot, as that's the domain of the user docs.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-09 15:23:28 -04:00
Quentin Young
f0d96d1d32 doc: update doc titles
Should be a bit easier to Google this way.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-05-09 10:44:08 -04:00
Quentin Young
216972dd3f
Merge pull request #2183 from Thomas-Gelf/fix/doc-snmp-file-formatting
doc, snmp: fix file formatting
2018-05-09 10:41:59 -04:00
Philippe Guibert
204ed384be doc: add information about zebra VRF configuration
As there are subtle differences between VRF-lite and VRF-netns,
some information is given to the operator on what can be/ can not be
done.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-05-09 09:52:36 +02:00
Jafar Al-Gharaibeh
6b3725b354
Merge pull request #2182 from qlyoung/docuser
doc: remove duplicate option doc
2018-05-08 23:40:21 -05:00
Russ White
b54c710717
Merge pull request #2179 from qlyoung/fix-maximum-prefix-override
bgpd: fix maximum-prefix + peer-group
2018-05-08 20:07:32 -04:00