Commit Graph

10669 Commits

Author SHA1 Message Date
Quentin Young
a378155757
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>
2018-03-20 15:20:33 -04:00
Jafar Al-Gharaibeh
1af416bc25
Merge pull request #1825 from chiragshah6/ospfv3_dev
ospf6d: Intra-prefix LSA update after frr restart
2018-03-20 13:09:29 -06:00
Jafar Al-Gharaibeh
5c0f567a57
Merge pull request #1933 from qlyoung/move-community-md
frr, doc: Move COMMUNITY.md to doc/developer/workflow.rst
2018-03-20 12:55:45 -06:00
Donald Sharp
18febdb05a
Merge pull request #1913 from LabNConsulting/working/master/bgp-vpn-leak-cli
bgpd: new vpn-policy CLI
2018-03-20 13:26:48 -04:00
Quentin Young
0cef94229f
Merge pull request #1937 from LabNConsulting/working/master/bgp-vpn-leak-doc
doc: bgp vpn-vrf leaking CLI
2018-03-20 13:08:56 -04:00
Martin Winter
631f11131d
Merge pull request #1932 from ajones-rvbd/ajones-issue-1930
redhat: build dist tarball in a chroot
2018-03-20 14:55:22 +00:00
Renato Westphal
b49dc9f301
Merge pull request #1909 from donaldsharp/zebra_rule
Zebra rule
2018-03-20 09:45:57 -03:00
Renato Westphal
067d01be57
Merge pull request #1936 from qlyoung/fix-static-route-config-write-missing-space
zebra: fix static route config write
2018-03-20 08:52:25 -03:00
G. Paul Ziemba
c7109e09e7 bgp_vty.c: fix docstrings for bgp_imexport_vpn
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-03-19 22:14:43 -07:00
G. Paul Ziemba
d555f3e904 bgpd: vpn-vrf-leaking new CLI: address Vivek's review comments + crash fix
- 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"

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-03-19 22:14:42 -07:00
G. Paul Ziemba
b9c7bc5ab0 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:

router bgp <as> [vrf <FOO>]
    address-family <afi> unicast
        rd (vpn|evpn) export (AS:NN | IP:nn)
        label (vpn|evpn) export (0..1048575)
        rt (vpn|evpn) (import|export|both) RTLIST...
        nexthop vpn (import|export) (A.B.C.D | X:X::X:X)
        route-map (vpn|evpn|vrf NAME) (import|export) MAP

        [no] import|export [vpn|evpn|evpn8]
        [no] import|export vrf NAME

User documentation of the vpn-specific parts of the above syntax is in PR #1937

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-03-19 22:13:43 -07:00
G. Paul Ziemba
b572f82665 doc: bgp vpn-vrf leaking CLI
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2018-03-19 21:25:59 -07:00
Quentin Young
08a4253e71
Merge pull request #1875 from ajones-rvbd/ajones-for-upstream
docker build: build Alpine Linux dev packages in docker
2018-03-19 18:03:18 -04:00
Quentin Young
be627102c0
zebra: fix static route config write
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-19 17:37:00 -04:00
Quentin Young
281ba953fe
doc: document code style tools
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-19 16:22:53 -04:00
Arthur Jones
79bb456408 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>
2018-03-19 13:05:26 -07:00
Arthur Jones
a61bbca831 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>
2018-03-19 11:37:58 -07:00
Quentin Young
c804874aca
frr, doc: Move COMMUNITY.md to doc/developer/workflow.rst
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-03-19 13:56:43 -04:00
Rafael Zalamena
5a52387a11
Merge pull request #1908 from donaldsharp/peer_established
bgpd: Clean up peer status checking for a received nlri
2018-03-19 11:35:37 -03:00
Rafael Zalamena
69796ce6f6
Merge pull request #1924 from donaldsharp/cs
Cs
2018-03-19 11:27:53 -03:00
Donald Sharp
bd6a17203d
Merge pull request #1925 from opensourcerouting/bugfix-isis_bpf_read
isisd: Fixed the way isis reads from bpf
2018-03-19 10:13:35 -04:00
Donald Sharp
c3e345b1d5 bgpd: Don't leak the ecommunity_ecom2str string in debug
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-19 09:18:10 -04:00
Donald Sharp
978caa0c88 zebra: Free memory leak
Free the memory leaked stream in failure cases.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-19 09:18:10 -04:00
Donald Sharp
993b143225 pimd: Fix leaked fd and prevent null pointer deref
When the pim_nexthop_lookup fails, close the opened fd
as part of the failure condition.

Additionally pim_nexthop_lookup assumes that we've
actually already looked up a nexthop in the past.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-19 09:18:10 -04:00
Donald Sharp
149a38a313 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>
2018-03-19 09:18:10 -04:00
Donald Sharp
af734bc7cf zebra: Fix leaked fd.
When we detect an error condition, close down the opened
fd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
2018-03-19 09:09:15 -04:00
ipinlnd
b9347997d6 isisd: Fixed the way isis reads from bpf
With this fix, we parse the bpf to process every packet read

Signed-off-by: Ali Rezaee nlndipi@hotmail.com
2018-03-19 10:02:03 -03:00
Renato Westphal
d6716be3d9
Merge pull request #1911 from donaldsharp/mpls_love
Mpls love
2018-03-19 08:37:13 -03:00
Martin Winter
e1d4b1fbe4
Merge pull request #1920 from donaldsharp/rpik_more
bgpd: Fix warning on 32 bit systems
2018-03-18 05:07:20 -07:00
Lou Berger
bff428d057
Merge pull request #1889 from donaldsharp/static_stuff1
zebra: Auto create the nexthop-vrf if needed.
2018-03-17 21:47:20 -04:00
paulzlabn
afe07392e4
Merge pull request #1914 from donaldsharp/fix_it
bgpd: Move back nh_vrf setting to where it was
2018-03-17 17:20:24 -07:00
Donald Sharp
f932e9ffb2
Merge pull request #1918 from opensourcerouting/rpki-pkg-master
Rpki pkg master
2018-03-17 15:29:34 -04:00
Donald Sharp
6f577f582a bgpd: Fix warning on 32 bit systems
We have a signed/unsigned comparison warning that this should
fix.

This should be ok because the range of input is a very limited
value and should never be of concern

Fixes: #1919
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-17 15:09:42 -04:00
Martin Winter
89073ff1af debianpkg: Fix - need to always run dh_gencontrol
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-03-17 10:16:42 -07:00
Martin Winter
100c355e51 debianpkg: Add option to build with RPKI
No RPKI support for Ubuntu 12.04

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-03-17 10:15:51 -07:00
Martin Winter
c8cd451cab redhat: Add RPKI comment on build instructions
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-03-17 09:57:45 -07:00
Martin Winter
aaf38c9461 redhat: Add option to build with RPKI
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>

Conflicts:
	redhat/frr.spec.in
2018-03-17 09:56:33 -07:00
Donald Sharp
34a0beaa6c
Merge pull request #1898 from opensourcerouting/reload-helper2
tools: Add helper frr-reload shell script for clean error
2018-03-17 07:18:51 -04:00
Quentin Young
db4629b81f
Merge pull request #1890 from LabNConsulting/working/master/checkpatch1
checkpatch minor tweaks
2018-03-16 23:20:01 -04:00
Donald Sharp
6a17b1a0f2 zebra: Extend unknown vrf to vrf part of ip route
When specifying a ip route:

ip route 4.3.2.0/24 192.168.201.1 vrf DONNA

Accept DONNA even if it has not been created yet.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-16 18:45:29 -04:00
Donald Sharp
ad97d1c10a zebra: Allow duplicate entry of a route
If a user enters a route inside a non kernel existant vrf:

vrf BLOOP
  ip route 4.3.2.0/24 192.168.201.1
!

They should be able to enter it over and over and over and
over and over no matter how futile it is.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-16 18:38:25 -04:00
Donald Sharp
e7f96f7411 zebra: Auto create the nexthop-vrf if needed.
Currently if I try to use a nexthop-vrf that has
not been specified yet we get a failure from the cli.

Add code to zebra so that if we fail to find the nexthop-vrf
we auto create it, instead of failing the install.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-16 18:36:10 -04:00
Donald Sharp
a12495e7d8 bgpd: Move back nh_vrf setting to where it was
Place the nexthop vrf id setting outside the afi if split
so that each side does not need to keep track of this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-16 16:18:15 -04:00
Rafael Zalamena
911d8ac862
Merge pull request #1902 from donaldsharp/vtysh_doc
doc: Clean up vtysh man page
2018-03-16 15:29:02 -03:00
Donald Sharp
072834ca5e zebra: Cleanup function prototypes for rib.h
Add to the function prototypes the names of variables
to hopefully make it easier for people to program against
this header.

Signed-off-by: Donald Sharp<sharpd@cumulusnetworks.com>
2018-03-16 12:53:00 -04:00
Donald Sharp
0ae8130def sharpd: Add ability to register for nht
Add code to sharpd to allow it to register for nexthop tracking
and then to display when it receives information about the nexthop
it is watching.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-16 12:27:22 -04:00
Donald Sharp
0acf4df095 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>
2018-03-16 12:27:22 -04:00
Donald Sharp
8f77d0ee6c zebra: Apply label to all nexthops when needed
The application of a label to a route entry needs to
look at all non-recursive nexthops to be attached to
instead of just the first one.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-16 10:46:28 -04:00
Donald Sharp
ea7637ccd4 zebra: Cleanup dead function rib_weed_table
the rib_wib_table function was uncalled by anyone remove
and additionally remove it's static function it called.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-03-16 10:20:32 -04:00
Donald Sharp
95a29032bc 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>
2018-03-16 10:18:58 -04:00