vivek [Wed, 1 Nov 2017 20:36:46 +0000 (13:36 -0700)]
bgpd: Use BGP instance to derive the VRF for route uninstall
When uninstalling routes from zebra, ensure that the BGP instance for
which processing is being done is used to derive the VRF. It is incorrect
to derive the VRF from the peer when dealing with scenarios like VRF route
leaking, EVPN symmetric/external routing etc., where the peer which sourced
the route could belong to a different VRF.
Donald Sharp [Tue, 20 Mar 2018 13:18:01 +0000 (09:18 -0400)]
bgpd: Fix peer withdrawal and route leaking for vpn's and vrf's
When a peer is removed the routes are withdrawn via bgp_process_main_one
As such we need to put a bit of code in to handle this situation
for the vpn/vrf route leaking code.
I think this code path is also called for when a vrf's route is
changed and I believe we will end up putting a bit more code
here to handle the nexthop changes.
I've also started trying to document the bgp_process_main_one
function a bit better.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lyq140 [Wed, 21 Mar 2018 11:46:36 +0000 (07:46 -0400)]
ripd: considering a interface with 2 or more IP
This commit fixes these three issues:
1) rinfo is used for rip packet sending not tmp_rinfo
2) With RIP_SPLIT_HORIZON and an interface with more than 1 ip addresses
we will not send the routes out an interface that they originate on
3) With RIP_SPLIT_HORIZON_POISONED_REVERSE and an interface with
more than 1 ip address we will not send out ipA with a metric of 16
and ipb with a metric of 1. Both will be 16 now.
Quentin Young [Wed, 14 Mar 2018 18:56:03 +0000 (14:56 -0400)]
doc: cleanup some misc files
* Translate plaintext stub documenting bgpd preprocessor constants for
attributes into a RST file and include it in the doctree
* Remove the Markdown version of the OSPF-API document, as I've already
translated it into RST
* Remove the Markdown version of the modules document, as I've already
translated it into RST
* Rename the various "Building_FRR_*" documents to match standard RST
file conventions
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Wed, 14 Mar 2018 20:36:14 +0000 (16:36 -0400)]
doc: cligraph.svg -> cligraph.png, misc cleanup
LaTeX doesn't know how to typeset SVG images, so use a png. Sphinx has a
plugin to automatically convert images to the right format for every
builder but it depends on imagemagick and God only knows what plugin
support is like on Centos 6...
Also correct the name of the BGP typecodes doc in its index file.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Wed, 14 Mar 2018 18:56:03 +0000 (14:56 -0400)]
doc: cleanup some misc files
* Translate plaintext stub documenting bgpd preprocessor constants for
attributes into a RST file and include it in the doctree
* Remove the Markdown version of the OSPF-API document, as I've already
translated it into RST
* Remove the Markdown version of the modules document, as I've already
translated it into RST
* Rename the various "Building_FRR_*" documents to match standard RST
file conventions
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
- vpn_leak_to_vpn_active(): check instance type
- vpn_leak_prechange(): qualify with test for active
- vpn_leak_postchange(): remove duplicated call to
vpn_leak_from_vrf_update_all()
- bgp_vty.c: Avoid null-pointer dereference for command "no rt vpn import"
G. Paul Ziemba [Fri, 16 Mar 2018 18:11:37 +0000 (11:11 -0700)]
bgpd: new vpn-policy CLI
PR #1739 added code to leak routes between (default VRF) VPN safi and unicast RIBs in any VRF. That set of changes included temporary CLI including vpn-policy blocks to specify RD/RT/label/&c. After considerable discussion, we arrived at a consensus CLI shown below.
The code of this PR implements the vpn-specific parts of this syntax:
Arthur Jones [Mon, 12 Mar 2018 19:24:26 +0000 (12:24 -0700)]
docker build: build Alpine Linux dev packages in docker
Building alpine packages in a "standard" distro can be
complicated due to the limited scope of the distro (embedded
and small docker images). Building in a VM is one possibility,
but docker support for alpine is very good (default docker images
come in alpine due to the very small size).
Here, we want to package up the current git repo into apk packages
that can be easily installed in alpine linux using the apk tool.
This support is not intended to package released versions of
apk packages, that, if it comes to be, should be done here:
git://git.alpinelinux.org/aports
We're content here to build packages that can be used by developers
to try out frr in docker and other alpine environments.
This is a very minimal environment, we don't support importing
keys (so, installing the packages with apk requires the
--allow-untrusted option). In addition, we can't use the
git commit id in hex as version tag, as alpine doesn't support hex
digits in the version string. So, we need to convert the git hash
to decimal before tagging the package with the extra version.
This is yucky, but I can't think of another way to get a
unique version per package. The alpine way (using a numeric date),
only works for released packages, not for dev packages.
Issue: https://github.com/FRRouting/frr/issues/1859 Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
Arthur Jones [Mon, 19 Mar 2018 17:04:00 +0000 (10:04 -0700)]
redhat: enable dist tarball to build in a chroot
When building the rpms, we can use a chroot (in my case docker) to
ensure that the BuildRequires are complete. This test failed with
errors like:
checking for CARES... no
configure: error: trying to build nhrpd, but libcares not found. install c-ares and its -dev headers.
error: Bad exit status from /var/tmp/rpm-tmp.FewvLf (%build)
This is due to a couple missing BuildRequires in the spec file. Here, we
add those in for all RPM builds.
Testing done:
Ran a docker build on CentOS7 which succeeded. Loaded the modules onto
CentOS6 to make sure they were at least valid there, that succeeded.
Issue: https://github.com/FRRouting/frr/issues/1930 Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
Donald Sharp [Mon, 19 Mar 2018 01:30:27 +0000 (21:30 -0400)]
zebra: Compare to the number of elements not size of array
When figuring out whom to call and if we actually can legally
call into the handler array actually use the number of elements
in the array instead of the size of the array.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 16 Mar 2018 14:53:58 +0000 (10:53 -0400)]
lib, zebra: Signal the existence of labels on a nexthop for nht
When we are signaling to a client from zebra that a nexthop
has changed, include the labels on the nexthop as well.
Upper level protocols need to know if the labels exist
in order to make intelligent decisions about what to do.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 16 Mar 2018 04:02:56 +0000 (00:02 -0400)]
zebra: Read in on startup arbitrary tables
When we receive an arbitrary table over the netlink bus
save it for later perusal and sweep any routes that
we may have created from an earlier run.
The current redistribute code is limited to
ZEBRA_KERNEL_TABLE_MAX. I left this alone for the
moment because I believe it needs to be converted
to a RB tree instead of a flat array. Which is more
work for the future. Additionally this proposed
change might necessitate some cli changes or rethinks.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 16 Mar 2018 13:12:55 +0000 (09:12 -0400)]
bgpd: Clean up peer status checking for a received nlri
In bgp_update_receive the first thing we do is establish
that the peer->status is Established. We then do a bunch
of work and call bgp_nlri_parse where we break out for
each address family. Each AFI is then checking for
being peer->status is Established again. There is no
point in checking this again.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 15 Mar 2018 00:14:36 +0000 (20:14 -0400)]
zebra: Add some additional vrf info to debugs
There were several places where when I am attempting
to debug zebra functionality that I would really
like to have the ability to know what vrf I think
I am operating on.
Add the vrf_id to a bunch of zlog_debug messages
to help figure out issues when they happen.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>