saravanank [Mon, 23 Mar 2020 02:40:05 +0000 (19:40 -0700)]
pimd: bsr election elects wrong bsr
RCA: preferred bsr routine, compare address in network byte order
Fix: changed to host format before comparision.
Testing:
Verified between 1.1.2.7 and 10.2.1.1, 10.2.1.1 is chosen as bsr
Initially:
R11# sh ip pim bsr
PIMv2 Bootstrap information
Current preferred BSR address: 1.1.2.7
Priority Fragment-Tag State UpTime
0 2862 ACCEPT_PREFERRED 00:00:30
Last BSM seen: 00:00:30
After next bsr started:
R11# sh ip pim bsr
PIMv2 Bootstrap information
Current preferred BSR address: 10.2.1.1
Priority Fragment-Tag State UpTime
0 3578 ACCEPT_PREFERRED 00:00:01
Last BSM seen: 00:00:01
R11# sh ip pim bsr
PIMv2 Bootstrap information
Current preferred BSR address: 10.2.1.1
Priority Fragment-Tag State UpTime
0 3578 ACCEPT_PREFERRED 00:00:04
Last BSM seen: 00:00:04
Signed-off-by: Saravanan K <saravanank@vmware.com>
Donald Sharp [Sun, 22 Mar 2020 18:50:46 +0000 (14:50 -0400)]
bgpd: More `const struct prefix` work
Modify more code to use `const struct prefix` throughout
bgp. This is all prep work for adding an accessor function
for bgp_node to get the prefix and reduce all the places that
code needs to be touched when we get that work done.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 21 Mar 2020 12:22:51 +0000 (08:22 -0400)]
isisd: Expand send/receive buffers to allow for larger mtu
User is reporting:
2020/03/21 03:12:36 ISIS: isis_send_pdu_bcast: sock_buff size 8192 is less than output pdu size 9014 on circuit em0
2020/03/21 03:12:36 ISIS: [EC 67108865] ISIS-Adj (1): Send L2 IIH on em0 failed
MTU's can frequently hit 9k in size, we have buffer limits
that prevent this from being fully used and creating errors.
Modify the code to allow for up to 16k mtu
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Martin Winter [Fri, 20 Mar 2020 22:50:29 +0000 (23:50 +0100)]
tests: Make topotest working on different locale
"sort" as used in all-protocol-startup used sort which causes
different sort order based on locale settings. Specify the
correct one to make output matching our expected result
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Donald Sharp [Wed, 18 Mar 2020 14:31:34 +0000 (10:31 -0400)]
zebra: Modify some route install debugs to allow us to understand a bit better
1) When programming a nhg id to the kernel we had no debug of that
is what we are doing.
2) Add debugs to all nexthop information to allow us to follow
which prefix we are talking about. This is especially
useful when dealing with a large number of routes and
you want to grep out one or two too see what is going on.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 20 Mar 2020 00:19:50 +0000 (20:19 -0400)]
bgpd: Convert #define of bgp fsm events to an enum
In PR #6052 which fixes issue #5963 the bgp fsm events
were confused with the bgp fsm status leading
to a bug. Let's start separating those out
so these types of failures cannot just
easily occur.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lynne [Thu, 20 Feb 2020 21:46:47 +0000 (16:46 -0500)]
tests: Fixing test for LDP
LDP now advertises routes it learns over an interface not configured
with LDP. If the route, which is learned over a non-LDP configured
interface, has no other NHs learned over an interface running LDP,
the router will act as a LDP egress router.
Modifying ldp-topo1/r1/ip_mpls_route.ref to include an extra newline.
Without this newline, the ldp-topo1 was failing.
Karen Schoener [Thu, 20 Feb 2020 19:27:49 +0000 (14:27 -0500)]
ldpd: adding support for LDP ordered label distribution control
LDP ordered label distribution control only binds a label to
a FEC if it is the egress LSR, or the router received a label
binding for a FEC from the next hop router. In this mode,
an MPLS router will create a label binding for each FEC and
distribute it to its neighbors so long as he has a entry in
the RIB for the destination.
the vtysh command to set the isis metric on an interface
is 'isis metric level-1 X', but when showing the running
config we were displaying it as 'isis metric X level-1'.
This would confuse frr-reload.py when attempting to apply
a config file populated with the correct command; on the
other hand, using the show command format would return an
error when running vtysh -C on the file.
Fix this by making the show command return the same format
as the vtysh setting command.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
vivek [Wed, 18 Mar 2020 22:40:04 +0000 (15:40 -0700)]
bgpd: Allow EVPN advertise route-map to modify attributes
Ensure that the EVPN advertise route-map is applied on a copy of the
original path_info and associated attribute, so that if the route-map
has SET clauses, they can operate properly. This closely follows
the model already in use in other route-map application code.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ruben Kerkhof [Thu, 19 Mar 2020 13:00:20 +0000 (14:00 +0100)]
bgpd: use the right format specifier
Fixes:
/Library/Developer/CommandLineTools/usr/bin/make all-am
CC bgpd/bgp_attr.o
bgpd/bgp_attr.c:2664:5: warning: format specifies type 'unsigned char' but the argument has type 'uint16_t' (aka 'unsigned short') [-Wformat]
length, STREAM_READABLE(peer->curr));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./lib/log.h:94:50: note: expanded from macro 'flog_err'
zlog_err("[EC %" PRIu32 "] " format, ferr_id, ##__VA_ARGS__)
~~~~~~ ^~~~~~~~~~~
1 warning generated.
Donald Sharp [Thu, 19 Mar 2020 12:24:37 +0000 (08:24 -0400)]
tests: Increase some wait time in tests
The bfd-bgp-cbit-topo3 test is testing bfd timers
with some timers that only wait 4 seconds. The CI
system is failing in various places due to bfd
not converging properly. Upon logging into a
CI system and running tests with intensive disk i/o
I was able to make the tests fail repeatedly in
a couple of different places. Add some additional
time to allow the system to converge on our CI
systems that are running in vm's and may not
always have complete control of cpu's.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
saravanank [Wed, 18 Mar 2020 02:22:57 +0000 (19:22 -0700)]
pimd: pimd crashes during neighbor clean up
RCA:
It has asserted because during neighbor delete on a interface,
pim_number_of_nonlandelay_neighbors count has become less less than 0.
This was due to not updating the count when hello option changed.
Fix:
During hello option update, check and increment or decrement when this option changes.
Signed-off-by: Saravanan K <saravanank@vmware.com>
vivek [Wed, 18 Mar 2020 03:36:05 +0000 (20:36 -0700)]
bgpd: Strip Route Targets during VRF-to-VRF route leak
During VRF-to-VRF route leaking, strip any extraneous route targets. This
ensures that source-VRF-specific route targets or route targets that are
internally assigned for the VRF-to-VRF route leaking don't get attached
to the route in the target VRF.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
vivek [Wed, 18 Mar 2020 03:27:23 +0000 (20:27 -0700)]
bgpd: Make strip extcommunity handle multiple extcommunities
Extended communities like the BGP Route Target can be present multiple
times in a route's path attribute. Ensure that the strip function for a
particular extended community (type and subtype) handles this and
strips all occurrences.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
vivek [Wed, 18 Mar 2020 02:59:52 +0000 (19:59 -0700)]
bgpd: Refine multiaccess check for next hop resetting
A BGP update-group is dynamically created to group together a set of peers
such that any BGP updates can be formed just once for the entire group and
only the next hop attribute may need to be modified when the update is sent
out to each peer in the group. The update formation code attempts to
determine as much as possible if the next hop will be set to our own IP
address for every peer in the group. This helps to avoid additional checks
at the point of sending the update (which happens on a per-peer basis) and
also because some other attributes may/could vary depending on whether the
next hop is set to our own IP or not. Resetting the next hop to our own IP
address is the most common behavior for EBGP peerings in the absence of
other user-configured or internal (e.g., for l2vpn/evpn) settings and
peerings on a shared subnet.
The code had a flaw in the multiaccess check to see if there are peers in
the update group which are on a shared subnet as the next hop of the path
being announced - the source peer could itself be in the same update group
and cause the check to give an incorrect result. Modify the check to skip
the source peer so that the check is more accurate.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
vivek [Wed, 18 Mar 2020 02:25:13 +0000 (19:25 -0700)]
zebra: Install nexthop's weight for IPv4 routes with IPv6 next hops
Ensure that any weight associated with the next hop is installed for
IPv4 routes with IPv6 next hops too.
Updates: lib, zebra: Allow for installation of a weighted nexthop
bgpd: support for match ip address next-hop address command
this command is missing, compared with 'match ipv6 next-hop' command
available. Adding it by taking into account the backward compatible
effect when supposing that some people have configured acls with name
being an ipv4 address.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>