Commit Graph

11935 Commits

Author SHA1 Message Date
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
Lou Berger
1e469d276c bgpd: fix NHT free when nht_info is null (fixes crash)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-05-09 16:07:36 -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
Russ White
bf16dbf1de
Merge pull request #2173 from chiragshah6/ospfv3_dev
ospf6d: fix area border router duplicate
2018-05-08 20:03:48 -04:00
Thomas Gelf
b8df060063 doc, snmp: fix file formatting
Signed-off-by: Thomas Gelf <thomas@gelf.net>
2018-05-09 02:00:06 +02:00
Russ White
35481c03c3
Merge pull request #2160 from donaldsharp/prefix_sid
bgpd: Handle multiple PREFIX_SID's at a time.
2018-05-08 19:52:56 -04:00
Russ White
ae57fcbfef
Merge pull request #2137 from mkanjari/evpn-addr-change
*: change struct evpn_addr to include a union of all evpn route types
2018-05-08 19:50:33 -04:00
Donald Sharp
914432b5eb lib: Fix bad function
Fix the decleration of a function to be better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-08 19:33:07 -04:00
Donald Sharp
e543616348 doc: Fix pbr documentation to be correct
The recent change of pbr necessitates this change in the doc

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-08 19:31:40 -04:00
Donald Sharp
3518f35264 bgpd, lib, zebra: Cleanup formatting issues found
Cleanup the formating issues found.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-08 19:24:15 -04:00
radhika
a2023fab27 Zebra: Fix ptm-enable config failure on internally created interfaces
Ticket: CM-15658
Reviewed By: CCR-6534
Testing Done: Unit

Issue: frr ptm-enable command not working for interfaces that have been created by frr as a place holder.

Root Cause: The ptm-enable on interface configuration was not getting stored when the interface was internally created by frr.

Fix: Store the ptm-enable configuration even if the interface is internally created.

Signed-off-by: Radhika Mahankali <radhika@cumulusnetworks.com>
2018-05-08 19:24:15 -04:00
vivek
6c0a605355 bgpd: Fix VRF route leaking for multipath routes
Ensure that the next hop of the leaked VRF is not overwritten when the
route is being imported into the target VRF from the VPN table. Also, in
the case of multipath routes, ensure that the nexthop's ifindex is not
inadvertently reset.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
2018-05-08 19:24:15 -04:00
vivek
9ed7517b1a zebra: Increase recvmsg buffer size for picking up netlink messages
Netlink messages from the kernel need to be received in a buffer larger
than 8K in order to handle some types of info - for example, the VLAN
information. Define a separate size for receive and set it to 32K, which
is the value used by other netlink receivers like iproute2.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-08 19:24:15 -04:00
Donald Sharp
8cb73ba40d zebra: Fixup crash with vlan interfaces attempted to be used
When zebra starts up it receives from the kernel a full dump of
interface information.  Unfortunately it is in no particular order.
As such we sometimes receive data from the kernel about interfaces
we do not know about yet.

In this bug, we are attempting to use the interface pointer(->link)
for a vlan interface that we have not properly resolved.

This fix ensures that we will not attempt to call zvni_map_svi
if we have a NULL pointer.  There are other places in the code
we are already checking for the fact that the ->link pointer
is valid before calling this function, so I believe that this
is correct.

We do need to come back and resolve all ->link pointers
after we have received the full table.  This can be
done in another commit.

Ticket: CM-17041
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-08 19:24:15 -04:00
Donald Sharp
dcfe47166a bgpd: Fix compiler warning->errors of might be used uninited
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-08 19:24:15 -04:00
vivek
1e00627b3b bgpd: Don't generate spurious warning on VNI deletion
There are situations in which zebra may issue more than one delete
notification, so BGP should not warn when it can't locate the VNI
at delete. This is comparable to the situation when a withdraw is
received but the route isn't present locally.

Signed-off-by: Vivek Venkatraman <vivek@cumulusmetworks.com>

Ticket: CM-17512
Reviewed By: Trivial
Testing Done: Manual
2018-05-08 19:24:15 -04:00
Mitesh Kanjariya
637315fc78 bgpd: set NEXTHOP_UNCHANGED for l2vpn evpn by default for all BGP peers
This flag needs to be set by default for l2vpn evpn address-family.
We needed to find a place in the code which gets called by all peers
at somepoint in the statemachine and before the routes are advertised.
peer_new seems like the right place for this
as we are setting other default af_flags here as well.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
2018-05-08 19:24:15 -04:00
Donald Sharp
2017b3ead0 zebra: Use STREAM_GETXXX functions
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-05-08 19:24:15 -04:00