Chirag Shah [Thu, 28 Dec 2017 19:12:35 +0000 (11:12 -0800)]
ospf6d: Fix ospf6 redist with route-map
When ospf6 configure with redistribute connected/protocol
with route-map. Upon restart of frr.service, ospf6 receives
redistribute update then route-map update.
During redistribute route update, since route-map info is not
filled, route is suppressed from injected as external route.
Fix: reset redistribute when route-map update received
matches with redistribution (type) and route-map name.
Ticket:CM-13800
Testing Done:
Configure ospf6 redistribute with route-map to inject
Type-2 external routes into database. Trigger frr restart
redistribute with route-map happens.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
ETH_ALEN is not equivalent to ETHER_HDR_LEN. ETHER_HDR_LEN is the
definition for the length of the full ethernet header, meanwhile
ETH_ALEN is just the length of the ethernet address.
Here is the OpenBSD/FreeBSD definition for ETHER_HDR_LEN:
#define ETHER_ADDR_LEN 6 /* Ethernet address length */
#define ETHER_TYPE_LEN 2 /* Ethernet type field length */
#define ETHER_HDR_LEN ((ETHER_ADDR_LEN * 2) + ETHER_TYPE_LEN)
(OpenBSD's definition is at net/if_ether.h, FreeBSD's is at
net/ethernet.h)
Linux definitions can be found at: net/ethernet.h
#define ETHER_ADDR_LEN ETH_ALEN /* size of ethernet addr */
#define ETHER_TYPE_LEN 2 /* bytes in type field */
#define ETHER_HDR_LEN ETH_HLEN /* total octets in header */
net/if_ether.h:
#define ETH_HLEN 14 /* Total octets in header. */
#define ETH_ALEN 6 /* Octets in one ethernet addr */
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Donald Sharp [Wed, 13 Dec 2017 15:58:55 +0000 (10:58 -0500)]
ospf6d: Don't assign to values that are never read
offset and offsetlen are never used without reassigning
in the code. So comment out the assignments and
in case we want to start using the code for snmp
changes in the future.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 8 Dec 2017 20:02:46 +0000 (15:02 -0500)]
zebra: Display if a taged route is being used as a realm
When displaying a specific route and if it has a tag
and if we have turned on realm support notify the user
that a tag value of (1-255) is installed into the kernel
with the realm set.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra: Add ability to support tags -> realms in linux
Linux has the ability to support a concept of 'realms'.
This concept allows you to mark routes with a realm id
value of 1-255. If you have marked the realm
of a route then you can use the tc program to
apply policy to the routes.
This commit adds the ability of FRR to interpret
a tag from (1-255) as a realm when installing into
the kernel. Please note that at this point in time
there is no way to set policy from within FRR. This
must be done outside of it.
The normal methodology for setting tags is valid here
via a route-map.
Finally this is only applied if the --enable-realms configure
option is applied.
Rafael Zalamena [Mon, 11 Dec 2017 20:25:06 +0000 (18:25 -0200)]
isisd: fix l2 neighbor formations
Add a timestamp information for level 2 circuits, otherwise if the
circuit is marked as already processed on level 1 we will not process
level 2 areas.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Donald Sharp [Thu, 7 Dec 2017 15:47:30 +0000 (10:47 -0500)]
zebra: Try to move non zapi cli commands from zserv.c
zserv.c has become a bit of a dumping ground for zebra cli.
I'd like to focus the zserv.c code into it's core functionality
which is handling the zapi interface.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Rafael Zalamena [Tue, 12 Dec 2017 13:47:04 +0000 (11:47 -0200)]
isisd: save a clock_gettime() call
Use the thread cached clock to use as start time. It will save a call to
clock_gettime() and also provide a more 'accurate' time measurement from
the start of the procedure.
Donald Sharp [Tue, 5 Dec 2017 15:09:36 +0000 (10:09 -0500)]
bgpd: Cleanup SA error in ignoring return from function
Ignoring the return from argv_find_and_parse_afi
makes the SA system assume that you could pass a AFI_MAX
value to bgp_show_route. Which in turn would cause
an array out of bounds read.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 5 Dec 2017 14:44:11 +0000 (09:44 -0500)]
bgpd: Fix prefix2str using BUFSIZ to PREFIX_STRLEN
PREFIX_STRLEN is the correct length for buffers needed to output
a prefix2str. Additionally cleanup some setting of the last
value to a `\0` this is handled by prefix2str.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Chirag Shah [Fri, 8 Dec 2017 17:33:53 +0000 (09:33 -0800)]
ospfd: prevent passive interface cmd crash
Current OSPF VRF configuration are allow pre-provisining even if
VRF is not configured. In such case ospf->vrf_id would VRF_UNKNOWN,
when passive interface configuration done under such ospf instance,
it would lookup all vrf_device and try to create ifp with unknown
vrf_id.
for passive interface config command lookup ifp for vrf_id is within range.
Donald Sharp [Thu, 7 Dec 2017 23:59:54 +0000 (18:59 -0500)]
ldpd: Switch over to new debug style
When compiling ldpd on a mac, there exists a #define MSG_SEND
which conflicts with a define in ldp_debug.h.
During discussion about this we decided that it would be
better to remove the macro massaging that was going on and
to just call our own #define for it.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Quentin Young [Wed, 6 Dec 2017 22:35:21 +0000 (17:35 -0500)]
bgpd: fix config display of coalesce-time
Since coalesce time is now heuristically adjusted based on peer count,
we need to separate out specific configuration by the user from the
current value. Behavior established is to not adjust if the user has a
value set.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Chirag Shah [Fri, 1 Dec 2017 01:45:12 +0000 (17:45 -0800)]
ospf6d: Fix multi nexthop route remove
Fix sorting of route storage to DB.
Fix two list comparison which allows route with
multiple nexthop to updates.
Ticket:CM-19025
Testing Done:
Configured a topology where ospf6 learn
ecmp route via one neighbor and upon removal
of intra-prefix route from origin, DUT removes
ECMP intra-prefix route from RIB.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Don Slice [Wed, 6 Dec 2017 17:00:48 +0000 (09:00 -0800)]
zebra: do not display ipv6 ra commands created by bgpd
If the frr.conf file contains bgp unnumbered peering but the associated
interfaces do not have the commands "no ipv6 nd suppress-ra" and
"ipv6 nd ra-interval 10" configured, when frr-reload.py is issued the
interface commands are removed from the running config, causing peers to
got down and stay down after a link flap. This situation can occur if
the frr.conf file is created manually or via automation (like ansible)
but a subsequent "wr mem" has not been performed.
This fix changes the behavior so that the interface ipv6 nd ra commands
created by bgp are not displayed. Therefore, when the above condition
occurs, there is no difference between the running and stored configs
and peers work fine.
Ticket: CM-18702 Signed-off-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: CCR-7004
Testing-done: Manual testing successful. L3-smoke has no new failures
Donald Sharp [Mon, 4 Dec 2017 15:12:36 +0000 (10:12 -0500)]
*: Remove cvs control points
The $Id: lines would allow code kept in cvs to substitute
the file version upon checkout. Since we are not using
cvs there is no need to keep these lines anymore.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 4 Dec 2017 14:29:08 +0000 (09:29 -0500)]
configure, zebra: Kame is not responsible for on/off of v6 forwarding
The KAME flag should not be used to turn on/of v6 forwarding on
*bsd systems. Create a configure #define to better describe
what we are doing and the why of it.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 30 Nov 2017 19:03:07 +0000 (14:03 -0500)]
zebra: Replace SELECTED_FIB flag with a rib_dest_t pointer
The SELECTED_FIB flag was placed upon the entry that we
have inserted into the kernel. Remove this flag and replace
with a `rib_dest_t` *selected_fib. Just keep track of the
selected_fib as we modify it. This removes allot of
FOREACH_RE loops as that we do not need to find the
entry anymore.
At this point in time I think this is a very minor performance
boost. Most `rib_dest_t` structures do not typically carry
more than 1 route_entry, but the minute you start having more
than one entry you can and will start having significant processing
time spent finding the selected_fib.
A future commit may re-order the route entries and possibly
keep more pointers on `rib_dest_t` to avoid lookup. This
is a bit tricky because of the FIB_OVERRIDE code.
Signed-off-by Donald Sharp <sharpd@cumulusnetworks.com>
Chirag Shah [Mon, 4 Dec 2017 22:08:23 +0000 (14:08 -0800)]
ospfd: fix crash no router ospf/show running
no router ospf removes default ospf instance,
if there are other non-default vrf instance present
with interface level configuration. Lookup ospf instance
for ifp->vrf_id, if ospf instnace present use that
to access 'instance id'.
Ticket: CM-19078
Testing Done:
run no router ospf and show running config along with other
non-default vrf aware ospf configurations.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Chirag Shah [Mon, 27 Nov 2017 21:59:19 +0000 (13:59 -0800)]
ospfd: Display all vrf aware interface config
OSPF interface specific configuration can be done independent
of router ospf [vrf x] global config.
In cases where ospf interface non default vrf configuration
is done prior to 'router ospf vrf x', show running-config
would not display such configuration.
To display configuration now walk all vrfs and interface list
and only display where OSPF configure params are set.
Ticket:CM-18952
Testing Done:
Tried ospf interface specific configuration with VRF,
where router ospf vrf x is not present.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Donald Sharp [Fri, 1 Dec 2017 16:49:13 +0000 (11:49 -0500)]
bgpd: Allow Address-Family activation to work in certain states
If we are in OpenSent or OpenConfirm peer state and we receive a new
address-family activation, we would end up ignoring the new activation
and not tell our peer about it. You could notice this by seeing
the fact that a 'show bgp neighbor' command returns a 'Not in
any update group' for a particular family.
This modifies the code such that we now notice that we are in
either OpenSent or OpenConfirm state and reset the peer to
allow us to send them the new capability.
Ticket: CM-19021 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>