]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoMerge pull request #2229 from qlyoung/fix-readme-typo
Renato Westphal [Tue, 15 May 2018 14:58:27 +0000 (11:58 -0300)]
Merge pull request #2229 from qlyoung/fix-readme-typo

frr: fix typo in README

6 years agoMerge pull request #2133 from Fredi-raspall/fix_label_manager
Renato Westphal [Tue, 15 May 2018 13:00:12 +0000 (10:00 -0300)]
Merge pull request #2133 from Fredi-raspall/fix_label_manager

Fix broken label manager (proxy-mode) and improve of proxy function

6 years agofrr: fix typo in README
Quentin Young [Mon, 14 May 2018 15:06:27 +0000 (11:06 -0400)]
frr: fix typo in README

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2223 from ppmathis/fix/no-password-warnings
Quentin Young [Mon, 14 May 2018 15:01:19 +0000 (11:01 -0400)]
Merge pull request #2223 from ppmathis/fix/no-password-warnings

lib: Improved warnings for 'no (enable) password'

6 years agoMerge pull request #2225 from xdel/master
Donald Sharp [Sun, 13 May 2018 17:14:22 +0000 (13:14 -0400)]
Merge pull request #2225 from xdel/master

Fix compilation against rtrlib with ssh

6 years agolib: Moved no-password warnings into header file
Pascal Mathis [Sun, 13 May 2018 17:11:43 +0000 (19:11 +0200)]
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>
6 years agoFix compilation against rtrlib with ssh
Andrey Korolyov [Sun, 13 May 2018 10:36:50 +0000 (13:36 +0300)]
Fix compilation against rtrlib with ssh

Signed-off-by: Andrey Korolyov <andrey@xdel.ru>
6 years agolib: Improved warnings for 'no (enable) password'
Pascal Mathis [Sat, 12 May 2018 18:19:49 +0000 (20:19 +0200)]
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>
6 years agoMerge pull request #2217 from donaldsharp/pim_threads
Russ White [Sat, 12 May 2018 10:41:27 +0000 (06:41 -0400)]
Merge pull request #2217 from donaldsharp/pim_threads

Pim cleanup when networking restarts under itself

6 years agoMerge pull request #2216 from qlyoung/fix-doc-warnings
Russ White [Sat, 12 May 2018 10:40:14 +0000 (06:40 -0400)]
Merge pull request #2216 from qlyoung/fix-doc-warnings

doc: cleanup zebra vrf docs

6 years agoMerge pull request #2215 from qlyoung/docuser-building-openbsd6
Russ White [Sat, 12 May 2018 10:39:29 +0000 (06:39 -0400)]
Merge pull request #2215 from qlyoung/docuser-building-openbsd6

doc: update pkg version for automake on openbsd6

6 years agoMerge pull request #2214 from donaldsharp/pointer_counting
Russ White [Sat, 12 May 2018 10:38:57 +0000 (06:38 -0400)]
Merge pull request #2214 from donaldsharp/pointer_counting

More bgp fixes

6 years agoMerge pull request #2213 from donaldsharp/errno
Russ White [Sat, 12 May 2018 10:38:02 +0000 (06:38 -0400)]
Merge pull request #2213 from donaldsharp/errno

some small bgp issues

6 years agoMerge pull request #2211 from chiragshah6/ospf_vrf_dev
Russ White [Sat, 12 May 2018 10:37:00 +0000 (06:37 -0400)]
Merge pull request #2211 from chiragshah6/ospf_vrf_dev

ospfd: packet fifo init in interface create

6 years agoMerge pull request #2197 from qlyoung/docuser-debianpkg
Russ White [Sat, 12 May 2018 10:27:26 +0000 (06:27 -0400)]
Merge pull request #2197 from qlyoung/docuser-debianpkg

doc: move Debian packaging docs to dev docs

6 years agoMerge pull request #2196 from LabNConsulting/working/master/bgpd-shutdown-race
Russ White [Sat, 12 May 2018 10:27:00 +0000 (06:27 -0400)]
Merge pull request #2196 from LabNConsulting/working/master/bgpd-shutdown-race

BGP: Preclude race condition between listener thread and core during shutdown

6 years agoMerge pull request #2189 from qlyoung/move-bug-reports-to-docs
Russ White [Sat, 12 May 2018 10:25:48 +0000 (06:25 -0400)]
Merge pull request #2189 from qlyoung/move-bug-reports-to-docs

doc: move REPORTING-BUGS to user docs

6 years agoMerge pull request #2187 from qlyoung/remove-netbsd
Russ White [Sat, 12 May 2018 10:25:17 +0000 (06:25 -0400)]
Merge pull request #2187 from qlyoung/remove-netbsd

frr: remove README.NetBSD

6 years agoMerge pull request #2171 from pguibert6WIND/misc_crashes_moving_ifp_from_netns
Russ White [Sat, 12 May 2018 10:24:45 +0000 (06:24 -0400)]
Merge pull request #2171 from pguibert6WIND/misc_crashes_moving_ifp_from_netns

Misc crashes moving ifp from netns

6 years agoMerge pull request #2162 from qlyoung/fix-vpath-build
Russ White [Sat, 12 May 2018 10:23:03 +0000 (06:23 -0400)]
Merge pull request #2162 from qlyoung/fix-vpath-build

doc: support VPATH builds

6 years agoMerge pull request #2132 from donaldsharp/missed_stuff
Russ White [Sat, 12 May 2018 10:18:15 +0000 (06:18 -0400)]
Merge pull request #2132 from donaldsharp/missed_stuff

Missed stuff

6 years agoMerge pull request #2124 from donaldsharp/missed
Russ White [Sat, 12 May 2018 10:16:02 +0000 (06:16 -0400)]
Merge pull request #2124 from donaldsharp/missed

bgpd, zebra: Handle EVPN router MAC per next hop

6 years agopimd: Clean up rpf_hash *after* upstream cleanup
Donald Sharp [Fri, 11 May 2018 22:39:09 +0000 (18:39 -0400)]
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>
6 years agopimd: Allow interface to move in and out of vrfs
Donald Sharp [Fri, 11 May 2018 19:04:10 +0000 (15:04 -0400)]
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>
6 years agopimd: Cleanup all pim_ifp pointers on termination
Donald Sharp [Fri, 11 May 2018 18:34:20 +0000 (14:34 -0400)]
pimd: Cleanup all pim_ifp pointers on termination

Properly cleanup pim_ifp pointers on termination

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Cleanup ifchannel deletion
Donald Sharp [Fri, 11 May 2018 18:07:53 +0000 (14:07 -0400)]
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>
6 years agopimd: Cleanup msdp shutdown
Donald Sharp [Fri, 11 May 2018 17:57:13 +0000 (13:57 -0400)]
pimd: Cleanup msdp shutdown

Shutdown pim msdp code a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Cleanup the deletion event a tiny bit
Donald Sharp [Fri, 11 May 2018 17:46:59 +0000 (13:46 -0400)]
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>
6 years agodoc: cleanup zebra vrf docs
Quentin Young [Fri, 11 May 2018 19:53:07 +0000 (15:53 -0400)]
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>
6 years agodoc: update pkg version for automake on openbsd6
Quentin Young [Fri, 11 May 2018 20:04:15 +0000 (16:04 -0400)]
doc: update pkg version for automake on openbsd6

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2172 from msablic/pim_igmp_stats
Donald Sharp [Fri, 11 May 2018 17:48:31 +0000 (13:48 -0400)]
Merge pull request #2172 from msablic/pim_igmp_stats

pimd: show ip igmp statistics command

6 years agoMerge pull request #2207 from ppmathis/fix/bgpd-snmp-peer-lookup
Donald Sharp [Fri, 11 May 2018 13:32:08 +0000 (09:32 -0400)]
Merge pull request #2207 from ppmathis/fix/bgpd-snmp-peer-lookup

bgpd: fix and improve snmp peer lookups

6 years agoMerge pull request #2202 from dslicenc/bgp-neigh-auto-complete
Lou Berger [Fri, 11 May 2018 12:49:17 +0000 (08:49 -0400)]
Merge pull request #2202 from dslicenc/bgp-neigh-auto-complete

bgpd: fix auto-completion for neighbors and peer-groups

6 years agoMerge pull request #2208 from ppmathis/fix/debianpkg-env-pager
Donald Sharp [Fri, 11 May 2018 12:08:47 +0000 (08:08 -0400)]
Merge pull request #2208 from ppmathis/fix/debianpkg-env-pager

debianpkg: improve VTYSH_PAGER environment check

6 years agoMerge pull request #2212 from ppmathis/feature/implement-no-password-cmd
Donald Sharp [Fri, 11 May 2018 12:07:18 +0000 (08:07 -0400)]
Merge pull request #2212 from ppmathis/feature/implement-no-password-cmd

lib: Ported 'no (enable) password' from stable/3.0

6 years agobgpd: Set NEXT_HOP attribute for EVPN imported routes
vivek [Mon, 7 May 2018 19:04:26 +0000 (12:04 -0700)]
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>
6 years agobgpd: Update parent entry's refcount for imported routes
vivek [Wed, 9 May 2018 05:16:04 +0000 (22:16 -0700)]
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.

6 years agobgpd: fix and improve snmp peer lookups
Pascal Mathis [Thu, 10 May 2018 21:35:37 +0000 (23:35 +0200)]
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>
6 years agobgpd: Respect ability to reach nexthop if available
Donald Sharp [Fri, 11 May 2018 11:40:55 +0000 (07:40 -0400)]
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>
6 years agobgpd: Cleanup messages from getsockopt
Donald Sharp [Fri, 11 May 2018 11:34:24 +0000 (07:34 -0400)]
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>
6 years agolib: Ported 'no (enable) password' from stable/3.0
Pascal Mathis [Fri, 11 May 2018 00:54:30 +0000 (02:54 +0200)]
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>
6 years agoospfd: packet fifo init in interface create
Chirag Shah [Tue, 1 May 2018 14:36:53 +0000 (07:36 -0700)]
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>
6 years agodebianpkg: improve VTYSH_PAGER environment check
Pascal Mathis [Thu, 10 May 2018 22:03:23 +0000 (00:03 +0200)]
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>
6 years agobgpd: fix auto-completion for neighbors and peer-groups
Don Slice [Thu, 10 May 2018 13:10:18 +0000 (09:10 -0400)]
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>
6 years agoMerge pull request #2195 from qlyoung/docuser
Jafar Al-Gharaibeh [Thu, 10 May 2018 15:24:06 +0000 (10:24 -0500)]
Merge pull request #2195 from qlyoung/docuser

doc: update doc titles

6 years agobgpd: block io thread reads once shutdown has started
Lou Berger [Thu, 10 May 2018 12:47:11 +0000 (08:47 -0400)]
bgpd: block io thread reads once shutdown has started

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoMerge pull request #2075 from pguibert6WIND/doc_vrf
Lou Berger [Thu, 10 May 2018 10:56:56 +0000 (06:56 -0400)]
Merge pull request #2075 from pguibert6WIND/doc_vrf

doc: add information about zebra VRF configuration

6 years agodoc: move Debian packaging docs to dev docs
Quentin Young [Wed, 9 May 2018 19:12:07 +0000 (15:12 -0400)]
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>
6 years agodoc: update doc titles
Quentin Young [Wed, 9 May 2018 14:44:08 +0000 (10:44 -0400)]
doc: update doc titles

Should be a bit easier to Google this way.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2183 from Thomas-Gelf/fix/doc-snmp-file-formatting
Quentin Young [Wed, 9 May 2018 14:41:59 +0000 (10:41 -0400)]
Merge pull request #2183 from Thomas-Gelf/fix/doc-snmp-file-formatting

doc, snmp: fix file formatting

6 years agodoc: add information about zebra VRF configuration
Philippe Guibert [Fri, 13 Apr 2018 14:13:23 +0000 (16:13 +0200)]
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>
6 years agoMerge pull request #2182 from qlyoung/docuser
Jafar Al-Gharaibeh [Wed, 9 May 2018 04:40:21 +0000 (23:40 -0500)]
Merge pull request #2182 from qlyoung/docuser

doc: remove duplicate option doc

6 years agoMerge pull request #2179 from qlyoung/fix-maximum-prefix-override
Russ White [Wed, 9 May 2018 00:07:32 +0000 (20:07 -0400)]
Merge pull request #2179 from qlyoung/fix-maximum-prefix-override

bgpd: fix maximum-prefix + peer-group

6 years agoMerge pull request #2173 from chiragshah6/ospfv3_dev
Russ White [Wed, 9 May 2018 00:03:48 +0000 (20:03 -0400)]
Merge pull request #2173 from chiragshah6/ospfv3_dev

ospf6d: fix area border router duplicate

6 years agodoc, snmp: fix file formatting
Thomas Gelf [Mon, 7 May 2018 23:09:03 +0000 (01:09 +0200)]
doc, snmp: fix file formatting

Signed-off-by: Thomas Gelf <thomas@gelf.net>
6 years agoMerge pull request #2160 from donaldsharp/prefix_sid
Russ White [Tue, 8 May 2018 23:52:56 +0000 (19:52 -0400)]
Merge pull request #2160 from donaldsharp/prefix_sid

bgpd: Handle multiple PREFIX_SID's at a time.

6 years agoMerge pull request #2137 from mkanjari/evpn-addr-change
Russ White [Tue, 8 May 2018 23:50:33 +0000 (19:50 -0400)]
Merge pull request #2137 from mkanjari/evpn-addr-change

*: change struct evpn_addr to include a union of all evpn route types

6 years agolib: Fix bad function
Donald Sharp [Tue, 8 May 2018 23:33:07 +0000 (19:33 -0400)]
lib: Fix bad function

Fix the decleration of a function to be better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: Fix pbr documentation to be correct
Donald Sharp [Tue, 8 May 2018 23:31:40 +0000 (19:31 -0400)]
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>
6 years agobgpd, lib, zebra: Cleanup formatting issues found
Donald Sharp [Sun, 29 Apr 2018 18:35:39 +0000 (14:35 -0400)]
bgpd, lib, zebra: Cleanup formatting issues found

Cleanup the formating issues found.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoZebra: Fix ptm-enable config failure on internally created interfaces
radhika [Tue, 1 Aug 2017 17:10:35 +0000 (10:10 -0700)]
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>
6 years agobgpd: Fix VRF route leaking for multipath routes
vivek [Fri, 6 Apr 2018 16:31:11 +0000 (09:31 -0700)]
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>
6 years agozebra: Increase recvmsg buffer size for picking up netlink messages
vivek [Fri, 20 Apr 2018 15:40:42 +0000 (08:40 -0700)]
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>
6 years agozebra: Fixup crash with vlan interfaces attempted to be used
Donald Sharp [Fri, 7 Jul 2017 17:42:40 +0000 (13:42 -0400)]
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>
6 years agobgpd: Fix compiler warning->errors of might be used uninited
Donald Sharp [Wed, 24 Jan 2018 15:34:52 +0000 (10:34 -0500)]
bgpd: Fix compiler warning->errors of might be used uninited

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Don't generate spurious warning on VNI deletion
vivek [Fri, 13 Oct 2017 22:46:23 +0000 (15:46 -0700)]
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

6 years agobgpd: set NEXTHOP_UNCHANGED for l2vpn evpn by default for all BGP peers
Mitesh Kanjariya [Wed, 4 Apr 2018 20:01:45 +0000 (13:01 -0700)]
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>
6 years agozebra: Use STREAM_GETXXX functions
Donald Sharp [Fri, 27 Apr 2018 13:21:28 +0000 (09:21 -0400)]
zebra: Use STREAM_GETXXX functions

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: enable neighbor-nexthop-self for l2vpn evpn address family
Mitesh Kanjariya [Thu, 1 Mar 2018 09:47:28 +0000 (01:47 -0800)]
bgpd: enable neighbor-nexthop-self for l2vpn evpn address family

In the FRR implementation of EVPN,
eBGP leaf-spine peering for EVPN is fully supported by allowing
the next hop to be propagated and not rewritten at each hop.
There are other changes also related to route import to facilitate this.
However, propagating the next hop is not correct in some cases.
Specifically, if the DC is comprised of multiple PODs
with distinct intra-POD and inter-POD VxLAN tunnels,
EVPN routes received from an adjacent POD by a border/exit leaf
must be propagated into the local POD with the next hop rewritten (to self).

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: modify route install/withdraw logic for evpn type-5 routes in vrf
Mitesh Kanjariya [Wed, 11 Apr 2018 09:29:46 +0000 (02:29 -0700)]
bgpd: modify route install/withdraw logic for evpn type-5 routes in vrf

We install type-5 routes as ipv4/ipv6 unicast routes in the vrf table.
along with these routes, we also install the RMAC
and the nexthop Neigh entries.
There might be scenarios were the bestpath has changed and
we are now pointing to a new nexthop with a different RMAC.
As per BGP logic, we just send an update for the route and the nexthop
is replaced. However, this causes problem because the RMAC and neigh entry
corresponding to the previous nexthop are still lingering in the system.
We need to clear those entries for proper functoning.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: apply advertise ipv4 unicast route-map while advertising type-5 routes
Mitesh Kanjariya [Mon, 16 Apr 2018 08:09:03 +0000 (01:09 -0700)]
bgpd: apply advertise ipv4 unicast route-map while advertising type-5 routes

A newly added ipv4/ipv6 route in BGP RIB might be advertised as type-5 EVPN route.
The user might have configured a route-map for advertising type-5 routes.
We need to apply this route-map while advertising ipv4/ipv6 routes as type-5.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: write route-map to config for advertise type5 commands
Mitesh Kanjariya [Tue, 10 Apr 2018 10:02:24 +0000 (03:02 -0700)]
bgpd: write route-map to config for advertise type5 commands

We enable/disable type-5 routes by following commands:
advertise ipv4 unicast [route-map <route-map>]
advertise ipv6 commands [route-map <route-map>]
the route-map part was writtem to conf file.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: no advertise ipv6 unicast comand should unset the af_flags
Mitesh Kanjariya [Tue, 10 Apr 2018 10:31:05 +0000 (03:31 -0700)]
bgpd: no advertise ipv6 unicast comand should unset the af_flags

no advertise ipv6 unicast command should unset the corresponding
af_flag in bgp_vrf rather than the vrf_flags.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: Display table version for EVPN routes
vivek [Wed, 1 Nov 2017 23:57:55 +0000 (16:57 -0700)]
bgpd: Display table version for EVPN routes

Display the table version for EVPN routes like it is done for other
address families. Note that this is really relevant only for the
per-VNI routing table.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-12903

6 years agobgpd/zebra: use stream_putl/getl to send VNIs
Mitesh Kanjariya [Fri, 2 Mar 2018 01:18:34 +0000 (17:18 -0800)]
bgpd/zebra: use stream_putl/getl to send VNIs

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: vni [prefix-routes-only] should also be provided for the 'no' cmd
Mitesh Kanjariya [Tue, 10 Apr 2018 08:37:21 +0000 (01:37 -0700)]
zebra: vni [prefix-routes-only] should also be provided for the 'no' cmd

We have a command to enable symmetric routing only for type-5 routes.
This command is provided under vrf <> option in zebra as follows:
vrf <VRF>
  vni <VNI> [prefix-routes-only]
We need the corresponding no version of the command as well as follows:
vrf <VRF>
  no vni <VNI> [prefix-routes-only]

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: remote RMAC for EVPN ipv6 hosts should be programmed against the ipv4 nexthop
Mitesh Kanjariya [Mon, 9 Apr 2018 04:04:11 +0000 (21:04 -0700)]
zebra: remote RMAC for EVPN ipv6 hosts should be programmed against the ipv4 nexthop

For ipv6 host, the next hop is conevrted to ipv6 mapped address.
However, the remote rmac should still be programmed with the ipv4 address.
This is how the entries will look in the kernel for ipv6 hosts routing.

vrf routing table:
ipv6 -> ipv6_mapped remote vtep on l3vni SVI

neigh table:
ipv6_mapped remote vtep -> remote RMAC

bridge fdb:
remote rmac -> ipv4 vtep tunnel

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agowatchfrr always writes 'log syslog informational' to the config
Daniel Walton [Fri, 4 Aug 2017 20:39:56 +0000 (00:39 +0400)]
watchfrr always writes 'log syslog informational' to the config

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
Ticket: CM-16501

6 years agolib: move ip node above vrf node for config order
Quentin Young [Tue, 3 Apr 2018 20:25:13 +0000 (16:25 -0400)]
lib: move ip node above vrf node for config order

VRF static route commands adopt global static config if static config is
placed after a vrf context with no separator, workaround by always
writing static route config before vrf config

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agopbrd, vtysh: Limit range to actual 1-700
Donald Sharp [Thu, 12 Apr 2018 17:27:36 +0000 (13:27 -0400)]
pbrd, vtysh: Limit range to actual 1-700

The range for sequence numbers needs to be limited
by the range we have currently choosen for rule
ranges.

Ticket: CM-20562
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd, zebra: Handle EVPN router MAC per next hop
vivek [Wed, 29 Nov 2017 07:40:30 +0000 (23:40 -0800)]
bgpd, zebra: Handle EVPN router MAC per next hop

Ensure that when EVPN routes are installed into zebra, the router MAC
is passed per next hop and appropriately handled. This is required for
proper multipath operation.

Ticket: CM-18999
Reviewed By:
Testing Done: Verified failed scenario, other manual tests
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agoospf6d: Fix ABR brouter calculation corruption
Chirag Shah [Mon, 7 May 2018 17:16:08 +0000 (10:16 -0700)]
ospf6d: Fix ABR brouter calculation corruption

During Intra brouter calculation, brouters will be
marked for remove. if one of the brouter is removed,
as part of its remove callback, ospf6_abr_examin_summary
is performed where marked for brouter would be removed.
Since refcount of next brouter node still higher, it will
retain one node with dangled next brouter pointer.
When intra brouter calculation iteration goes to next node,
where accessing free node causes a crash.

Ticket:CM-20807
Testing Done:
Configure multilple ABR routers between area 0 and area x, y.
Remove ospf6 configuration on area x, y abrs and check area 0
Intra brouter calculations.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years ago*: clean up various top level stuff
Quentin Young [Tue, 8 May 2018 20:05:11 +0000 (16:05 -0400)]
*: clean up various top level stuff

* Updated README to point to new bug report location
* Updated README to point to community doc location
* Remove COMMUNITY.md
* Remove references to no longer extant docs in packaging files

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoospf6d: fix area border router duplicate
Chirag Shah [Fri, 4 May 2018 02:39:07 +0000 (19:39 -0700)]
ospf6d: fix area border router duplicate

Avoid duplicate ABR brouter entry and
its nexthops.
The route lookup results in first element of the
route/redix node. In case of Intra and inter area
brouter, the first element always intra brouter.
the first element comparison results in always addition
of new element for inter area brouter in brouter table.
Now, iterate all elements of the route node and compare
for brouter origin, if it is same simply update its
nexthops to FIB.

brouter and brouter route nexthops should be merge to avoid
duplicate nexthops for the inter area routes.

Ticket:CM-20807

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agodoc: move REPORTING-BUGS to user docs
Quentin Young [Tue, 8 May 2018 18:40:32 +0000 (14:40 -0400)]
doc: move REPORTING-BUGS to user docs

Doesn't belong here anymore.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2178 from pguibert6WIND/issue_2177
Donald Sharp [Tue, 8 May 2018 18:41:28 +0000 (14:41 -0400)]
Merge pull request #2178 from pguibert6WIND/issue_2177

pbrd: encode null fwmark to be consistent with zebra decode rule

6 years agoMerge pull request #2185 from opensourcerouting/isis-redist-metric-fix
Donald Sharp [Tue, 8 May 2018 18:10:02 +0000 (14:10 -0400)]
Merge pull request #2185 from opensourcerouting/isis-redist-metric-fix

isisd: use 0 as default-metric for redistribution

6 years agofrr: remove README.NetBSD
Quentin Young [Tue, 8 May 2018 18:07:03 +0000 (14:07 -0400)]
frr: remove README.NetBSD

This thing is virtually unused and has a weird name, let's delete it

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib, zebra: fix formatting and style
Fredi Raspall [Tue, 8 May 2018 08:13:20 +0000 (10:13 +0200)]
lib, zebra: fix formatting and style

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
6 years agoisisd: use 0 as default-metric for redistribution
Christian Franke [Mon, 7 May 2018 11:46:03 +0000 (13:46 +0200)]
isisd: use 0 as default-metric for redistribution

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agodoc: remove duplicate option doc
Quentin Young [Mon, 7 May 2018 22:12:17 +0000 (18:12 -0400)]
doc: remove duplicate option doc

Earlier commit added docs on `--enable-multipath` but it was already
documented.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2181 from zefanxu-bsn/patch-1
Quentin Young [Mon, 7 May 2018 21:19:14 +0000 (17:19 -0400)]
Merge pull request #2181 from zefanxu-bsn/patch-1

Default hello interval is wrong

6 years agoDefault hello interval is wrong
Zefan Xu [Mon, 7 May 2018 21:16:42 +0000 (14:16 -0700)]
Default hello interval is wrong

6 years agobgpd: fix maximum-prefix + peer-group
Quentin Young [Mon, 7 May 2018 17:25:10 +0000 (13:25 -0400)]
bgpd: fix maximum-prefix + peer-group

Attribute set on peer was being overridden when set on the peer-group.

This commit also adds a parallel flags array that indicates whether a
particular flag is sourced from the peer-group or is peer-specific. It
assumes the default state of all flags is unset. This looks to be true
except in the case of PEER_FLAG_SEND_COMMUNITY,
PEER_FLAG_SEND_EXT_COMMUNITY, and PEER_FLAG_SEND_LARGE_COMMUNITY; these
flags are set by default except when the user specifies to use
config-type = cisco. However the flag field can merely be flipped to
mean the negation of those options in a future commit.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agopbrd: encode null fwmark to be consistent with zebra decode rule
Philippe Guibert [Mon, 7 May 2018 16:59:41 +0000 (18:59 +0200)]
pbrd: encode null fwmark to be consistent with zebra decode rule

A null 4-byte long fwmark is encoded in pbr rule.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoMerge pull request #2156 from donaldsharp/zebra_doc
Renato Westphal [Mon, 7 May 2018 15:18:14 +0000 (12:18 -0300)]
Merge pull request #2156 from donaldsharp/zebra_doc

doc: Explain ecmp building and startup for zebra

6 years agoMerge pull request #2166 from qlyoung/docuser
Renato Westphal [Mon, 7 May 2018 15:15:18 +0000 (12:15 -0300)]
Merge pull request #2166 from qlyoung/docuser

doc: add figures & fix some typos in arch. docs

6 years agoMerge pull request #2175 from chiragshah6/mdev
Renato Westphal [Mon, 7 May 2018 15:08:16 +0000 (12:08 -0300)]
Merge pull request #2175 from chiragshah6/mdev

ospf6d: add newline to show debugging cmd

6 years agoospf6d: add newline to show debugging cmd
Chirag Shah [Sat, 5 May 2018 22:38:11 +0000 (15:38 -0700)]
ospf6d: add newline to show debugging cmd

Ticket:CM-20738
Testing Done:
Before:
OSPF6 debugging status:debug ospf6 lsa inter-router examine
debug ospf6 lsa as-external examine
debug ospf6 route memory
debug ospf6 border-routers

After:
OSPF6 debugging status:
debug ospf6 lsa inter-router examine
debug ospf6 lsa as-external examine
debug ospf6 route memory
debug ospf6 border-routers

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agopimd: show ip igmp statistics command
Mladen Sablic [Fri, 4 May 2018 11:25:38 +0000 (13:25 +0200)]
pimd: show ip igmp statistics command

Command showing IGMP Rx statistics, useful for analyzing IGMP
activity on interfaces.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>