Philippe Guibert [Wed, 28 Nov 2018 11:15:09 +0000 (12:15 +0100)]
lib: do not convert ip prefixes without '.'
There are cases where the passed parameter for a vty command is either
an interface name or an ip address. Because the interface name can be a
number, and because the user may want to use a number to define an IP (
for instance 'ping 0' is valid from shell purpose), there is a choice
that needs to be done at frr level. either from the application point of
view, the interface name will be priorized, or each number will be
considered as an ip address. In that commit, the inet_aton procedure is
replaced with the inet_pton procedure that ignores ips with just a
number.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Nitin Soni [Thu, 22 Nov 2018 09:56:52 +0000 (01:56 -0800)]
zebra: Add "show evpn arp-cache vni all detail" command
Change helps display detailed output for all possible VNI neighbors
without specifying VNI and ip. It helps in troubleshooting as a single
command can be fired to capture detailed info on all VNIs.
Ticket: CM-22832 Signed-off-by: Nitin Soni <nsoni@cumulusnetworks.com> Reviewed-by: CCR-8034
Renato Westphal [Mon, 26 Nov 2018 17:30:14 +0000 (15:30 -0200)]
lib, ripd: rework API for converted CLI commands
When editing the candidate configuration, the northbound must ensure
that either all changes made by a command are accepted or none are.
This is done to prevent inconsistent states where only parts of a
command are applied in the event any error happens.
The previous API for converted commands, the nb_cli_cfg_change()
function, required callers to pass an array containing all changes
that needed to be applied in the candidate configuration. The
problem with this API is that it was very inconvenient for complex
commands, which change different configuration options depending
on several factors. This required users to manipulate the array
of configuration changes using low-level primitives, making it
complicated to implement some commands.
To solve this problem, introduce a new API based on the two following
functions:
- nb_cli_enqueue_change()
- nb_cli_apply_changes()
The first function is used to enqueue configuration changes, one
at time. Then the nb_cli_apply_changes() function is used to apply
all the enqueued configuration changes.
To implement this, a static-sized array was allocated in the "vty"
structure, along with a counter of enqueued changes. This eliminates
the need to declare an array of configuration changes in every
converted CLI command, simplifying things quite considerably.
Renato Westphal [Sat, 24 Nov 2018 23:55:25 +0000 (21:55 -0200)]
ripd: fix display of the "distance" command
When displaying a configuration using the "with-defaults" option,
do not display "distance 0" when the "distance" command is not
configured. The range of accepted values is (1-255), so "distance
0" isn't a valid command. In this case, display "no distance".
Renato Westphal [Sun, 25 Nov 2018 16:41:38 +0000 (14:41 -0200)]
lib: make yang_dnode_get_entry() more flexible
Add the "abort_if_not_found" parameter to the yang_dnode_get_entry()
function instead of always aborting when an user pointer is not
found. This will make it possible, for example, to use this function
during the validation phase of a configuration transaction. Callers
will only need to check if the function returned NULL or not,
since new configuration objects (if any) won't be created until
the NB_EV_APPLY phase of the transaction.
Renato Westphal [Sat, 24 Nov 2018 23:56:48 +0000 (21:56 -0200)]
lib: introduce function to retrieve the schema name of a data node
In some cases it might be desirable to obtain the schema name of
a libyang data node. Introduce the yang_dnode_get_schema_name()
function for this purpose.
Renato Westphal [Fri, 16 Nov 2018 23:02:36 +0000 (21:02 -0200)]
lib: improve error handling when connection to confd is lost
This fixes an infinite loop that happened every time the connection
to the confd daemon was lost. Deactivate the confd module when
that happens to fix the infinite loop. This is only a temporary
workaround, in the long term we need to add a connection retry timer
to reestablish the connection to the confd daemon once it's back.
Renato Westphal [Fri, 16 Nov 2018 22:41:16 +0000 (20:41 -0200)]
build: fix detection of the confd binary
The confd binary must be searched in the path given by the user and not
in the system standard directories. This is necessary because, the way
confd is distributed, multiple installations of confd (from different
versions) are possible. Users must choose at configure time which confd
installation they want to use.
Donald Sharp [Wed, 21 Nov 2018 21:13:25 +0000 (16:13 -0500)]
vtysh: Don't attempt to reconnect the non-instanced ospf process
When running ospf instances we should not attempt to reconnect
the default ospf instance on running a command.
This commit should be targeted enough because in the case
of normal operation we connect to everything we should
and only set the VTYSH_WAS_ACTIVE flag for those we
truly have lost connection too.
Before:
donna.cumulusnetworks.com# config t
donna.cumulusnetworks.com(config)# router ospf 100
Warning: connecting to ospfd...failed!
donna.cumulusnetworks.com(config-router)#
After:
donna.cumulusnetworks.com# conf t
donna.cumulusnetworks.com(config)# router ospf 100
donna.cumulusnetworks.com(config-router)# end
donna.cumulusnetworks.com#
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Mark Stapp [Wed, 14 Nov 2018 19:45:30 +0000 (14:45 -0500)]
zebra: add dataplane routing socket
To avoid conflicts between the zebra main pthread and the
dataplane pthread, use a separate routing socket (on non-netlink
platforms) for dataplane route updates to the OS.
Mark Stapp [Mon, 12 Nov 2018 20:57:03 +0000 (15:57 -0500)]
zebra: separate netlink socket for dataplane
Use a separate netlink socket for the dataplane's updates, to
avoid races between the dataplane pthread and the zebra main
pthread. Revise zebra shutdown so that the dataplane netlink
socket is cleaned-up later, after all shutdown-time dataplane
work has been done.
Mark Stapp [Thu, 27 Sep 2018 19:10:54 +0000 (15:10 -0400)]
zebra: dplane lock and thread_master apis
Improve, simplify dataplane provider locking apis. Add accessor
for dataplane pthread's thread_master, for use by providers who
need to use the thread/event apis.
Mark Stapp [Fri, 31 Aug 2018 17:46:50 +0000 (13:46 -0400)]
zebra: dataplane provider enhancements
Limit the number of updates processed from the incoming queue;
add more stats. Fill out apis for dataplane providers; convert
route update processing to provider model; move dataplane
status enum
Kishore Aramalla [Wed, 21 Nov 2018 00:15:56 +0000 (16:15 -0800)]
bgpd: BGP daemon crashed when a L2VNI is unconfigured
When a VNI is unconfigured it deletes all of its import and export
route-targets. There is a export route-target link list and import
route-target linked list. There are redudant loops in the
route-target deletion code. In the first iteration it deleted the
route-target and freed the RT node, but not list node.
In the 2nd iteration it tries to free the RT node again, resulting in
the double free of RT node.
Christian Franke [Tue, 20 Nov 2018 18:18:42 +0000 (19:18 +0100)]
isisd: Consider non-mt links usable when either v4 or v6 works
When we run in non-mt mode, we should consider links which have either
working IPv4 or IPv6 active and look at the neighbors nlpids to judge
wether a link is usable.
David Lamparter [Mon, 19 Nov 2018 18:18:37 +0000 (19:18 +0100)]
yang: embed models into binaries
This bakes our YANG models straight into the library/daemons, so they
don't need to be loaded from /usr/share/yang. This makes the
installation quite a bit more robust, as well as gets us halfway to
running uninstalled. (The other half is baking in the extension type
module.)
The /usr/share/yang directory is still searched as a fallback, as well
as for the experimental YANG model translator. This is likely to stay
as is for the time being.
Signed-off-by: David Lamparter <equinox@diac24.net>
* The function bgp_router_id_zebra_bump() will check for active bgp
peers before chenging the router ID.
If there are established peers, router ID is not modified
which prevents the flapping of established peer connection
* Added field in bgp structure to store the count of established peers
Display following Per MAC and Neigh's output:
If duplicate address detection is under process,
display detection start time and detection count.
If duplicate address detection detected an address
as duplicate, display detection time and duplicate
status.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Chirag Shah [Thu, 1 Nov 2018 15:28:08 +0000 (08:28 -0700)]
bgpd: dup addr detect config cli
Duplicate address detection configuration clis
under bgp l2vpn evpn config mode.
- Enabled/Disable (global knob) for feature.
- Configure cli for duplicate detection action
freeze and freze until time (auto-recovery).
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Chirag Shah [Wed, 31 Oct 2018 23:53:28 +0000 (16:53 -0700)]
bgpd: dup addr detect data struct for cfg
Enable/disable duplicate address detection
there are 3 actions
warning-only: Default action which generates
only frr warning (syslog) to user for any
duplicate detecton
freeze: Permanently freezes address, manual
intervene required.
freeze with time: An address will recover once
the time has expired (auto-recovery).
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Renato Westphal [Sat, 17 Nov 2018 23:33:37 +0000 (21:33 -0200)]
zebra: improve identification of loopback interfaces in the router-id code
The if_is_loopback() function is the right abstraction for identifying
loopback interfaces. There should be no reason for not using it in the
router-id code.
Chirag Shah [Fri, 16 Nov 2018 01:05:58 +0000 (17:05 -0800)]
ospf6d: abr summary advertise best route
ABR summary should contain best intra prefix LSA.
There might be a case where intra-prefix route with different
cost from different advertising router present, summary
advertisement should only consider best intra-prefix route.
A route which is marked for remove, while purging the route's
ABR summary LSA also remove summary route from the summary
table.
Ticket:CM-22665
Testing Done:
Validate on ABR topology, intra-prefix route with
different cost, a higher cost intra-prefix route skip from sending
ABR summary LSA.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Donald Sharp [Fri, 16 Nov 2018 00:28:43 +0000 (19:28 -0500)]
pimd: When we fail to initiate ifchannel backout work done
When we receive a igmp report and attempt to initiate
a pim ifchannel for it and that fails to work then
let's back out the work done setting stuff up to this
point.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>