Commit Graph

18604 Commits

Author SHA1 Message Date
Donatas Abraitis
65f40ecdb5 tests: Improve bgp_aggregate-address_route-map test
Rewrite some parts to add more visibility what's going on if test fails.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-09-13 11:16:32 +03:00
Lucian Cristian
2cd3abe419 clippy: fail libcap test only when !enable_clippy_only
when building native clippy we don't need libcap

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2019-09-13 07:16:18 +03:00
Lucian Cristian
2163a630eb clippy: CARES fail only if !enable_clippy_only
test for CARES otherwise config will fail with conditional "CARES" not defined

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2019-09-13 07:12:34 +03:00
Martin Winter
4e5441e749 tests: Disable bgp-ecmp-topo2 topotest until proper fix is developed
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2019-09-13 02:13:12 +02:00
Quentin Young
b0584ad3c6 yang: add user type for ip-address
Convert ietf-inet-types:ip-address to struct ipaddr.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-12 21:39:43 +00:00
Mark Stapp
40f321c000 zebra: revise redistribution delete to improve update case
When selecting a new best route, zebra sends a redist update
when the route is installed. There are cases where redist
clients may not see that redist add - clients who are not
subscribed to the new route type, e.g. In that case, attempt
to send a redist delete for the old/previous route type.

Revised the redist delete api to accomodate both cases;
also tightened up the const-ness of a few internal redist apis.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-09-12 08:51:05 -04:00
kh_shi
c5ca731e64 bgpd: prefer-global command not working on IPv4 peers
`set ipv6 next-hop prefer-global` is not working on IPv4 peers.
In MP-BGP, bgp routers can advertising IPv6 routes over IPv4 peers.
Remove the peer's remote address AFI type checking.

Signed-off-by: shikenghua <kh_shi@edge-core.com>
2019-09-12 10:26:26 +00:00
Donald Sharp
90316c973f
Merge pull request #4968 from rubenk/fix-surname
doc: Djikstra -> Dijkstra
2019-09-11 20:29:20 -04:00
Ruben Kerkhof
afb2a168bb doc: Djikstra -> Dijkstra
Signed-off-by: Ruben Kerkhof <ruben@rubenkerkhof.com>
2019-09-11 20:35:06 +02:00
Donald Sharp
51678b6504
Merge pull request #4722 from ak503/static
staticd: correct update static route when specify nexthop-vrf
2019-09-11 13:36:55 -04:00
Donald Sharp
fa0ebe5a8a
Merge pull request #4302 from rgirada/fix_pim_upstream
staticd: static route config should get fail if nexthop configured as  its local connected ip.
2019-09-11 13:35:32 -04:00
Renato Westphal
e25352de4a
Merge pull request #4950 from donaldsharp/table_summary
Table summary
2019-09-11 12:34:07 -03:00
Renato Westphal
5fba0463e1
Merge pull request #4954 from qlyoung/yang-interface-ref
yang: create interface reference type
2019-09-11 12:31:49 -03:00
Mark Stapp
ec8a965eed
Merge pull request #4962 from donaldsharp/large_admin_distance_tests
Large admin distance tests and documentation
2019-09-11 10:46:40 -04:00
Donald Sharp
a3fd74f7b0 doc: Add show ip route summary documentation
Add a bit of doc for the `show ip route summary` command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-11 08:16:18 -04:00
Donald Sharp
ae813e21a6 zebra: Modify show ip route summary to allow you to specify a table
Add a bit of extra command `show ip route summary table XXX`
To allow end user to specify a specific table that they want
summary information on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-11 08:16:18 -04:00
Donald Sharp
963d10dfb0 tests: Add admin distance 255 static routes
Add a couple of test cases to ensure that admin distance of
255 actually causes the route to be accepted by zebra but
not installed into the linux kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-11 07:53:43 -04:00
Donald Sharp
9187f11ac1 doc: Update documentation to talk about Administrative Distance
The FRR documentation had no discussion about how Administrative
Distance is used.  Update the documentation to reflect the reality
on the ground.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-11 07:53:43 -04:00
Donatas Abraitis
ebbb2bdcd1
Merge pull request #4963 from donaldsharp/fix_topotests_due_to_json
tests: Fix topotests due to json error
2019-09-11 09:15:23 +03:00
Donald Sharp
bce69e3c54 tests: Fix topotests due to json error
Recent commit: 5fba22485b added a new topotest that used
an older version of FRR that referenced some json code
that was changed in between when the PR was submitted
and when it got in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-10 23:16:01 -04:00
Quentin Young
f22b925085 yang: create interface reference type
Instead of copy-pasting a 16 character string type for use as an
interface reference, create a new typedef that leafref's the name node
of an interface. This way the constraints change with the constraints on
an interface name itself, and it's self documenting.

Incidentally ripd and ripngd forgot the 16 character constraint in their
offset-list configs and IS-IS forgot it entirely, so this also fixes
minor bugs.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-10 20:29:10 +00:00
Jafar Al-Gharaibeh
ba439635c6
Merge pull request #4958 from donaldsharp/pim_assert_a_saurus
pimd: Slightly loosen pim assert message length tests
2019-09-10 13:21:29 -05:00
Lou Berger
ccc13acc0f
Merge pull request #4866 from ton31337/feature/apply_route-map_for_aggregate-address
bgpd: Apply route-map for aggregate-address
2019-09-10 11:59:10 -04:00
Russ White
6740a30296
Merge pull request #4933 from chiragshah6/evpn_dev2
bgpd: clear l3vni prefix-only flag upon deletion
2019-09-10 11:53:08 -04:00
Donatas Abraitis
c728d02764 bgpd: Do not send next-hop as :: in MP_REACH_NLRI if no link-local exists
This is the unusual case when you have global IPv6 address and no link-local
on interface attached. Like here:

eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP
 link/ether 08:00:27:65:c6:82 brd ff:ff:ff:ff:ff:ff
 inet6 2a02:4780:face::1/64 scope global
    valid_lft forever preferred_lft forever

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-09-10 18:11:58 +03:00
Russ White
853ba636ff
Merge pull request #4955 from sworleys/GW-IFINDEX-Verify-Resolve
zebra: Don't resolve to diff interface if given
2019-09-10 11:06:34 -04:00
Donald Sharp
f0ce8ac3e1 pimd: Slightly loosen pim assert message length tests
The Pim RFC does not appear to state any length requirements
of pim, other than the checksum must be correct.

Certain vendors are sending extra data at the end of a pim assert
message.  This while not explicitly against the rules was a bit
of surprise to pim when we threw the assert message on the floor
for being too long.

Modify the test to see if length left will allow us to read
the 8 bytes of data that we need.  If it is sufficient for
that allow the packet to be used.

Fixes: #4957
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-10 10:53:15 -04:00
Donald Sharp
260fcb956b isisd: Add vrf_id to the main isis structure
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-10 10:10:22 -04:00
Donald Sharp
cf319495a4 ospf6: Add vrf_id to the ospf6 data structure
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-10 10:10:22 -04:00
Naveen Thanikachalam
4cb5e18ba5 BGP: Rectifying the log messages.
This change addresses the following:
1) Ensures logs under DEBUG macro checks are categorized
   as zlog_debug instead of zlog_info.
2) Error logs are categorized as zlog_err instead of zlog_info.
3) Rephrasing certain logs to make them appear more intuitive.

Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
2019-09-09 22:59:22 -07:00
Renato Westphal
e6dafed0e2
Merge pull request #4951 from qlyoung/doc-fix-edgar-dijkstra-spelling
doc: Edgar -> Edsger
2019-09-10 01:15:39 -03:00
Renato Westphal
bf54ca8213 ospfd: avoid installing SR FTNs twice
There's no need to install MPLS FTNs using the ZEBRA_ROUTE_ADD
message since the ZEBRA_MPLS_LABELS_ADD message already does that
(in addition to installing an MPLS LSP).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-10 00:37:00 -03:00
Renato Westphal
ea6b290bf6 lib, zebra: add new MPLS zapi message with route replace semantics
This new message makes it possible to install/reinstall LSPs with
multiple nexthops using a single ZAPI message.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-10 00:01:10 -03:00
Stephen Worley
6913cb1b20 zebra: Don't resolve to diff interface if given
If the nexthop is of type `GATEWAY_IFINDEX` then the nexthop
should not resolve to a nexthop that has a different ifindex
from the one given.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-09-09 17:20:17 -04:00
Quentin Young
c0643af64e
Merge pull request #4952 from mjstapp/fix_bgp_peer_hook
bgpd: fix build breakage after hook re-definition
2019-09-09 15:12:36 -04:00
Mark Stapp
df9e8ae722 bgpd: fix build breakage after hook re-definition
A recent merge re-defined a hook, but one file did not get
the appropriate change.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-09-09 12:03:30 -04:00
Quentin Young
0e6fa0e9c7 doc: Edgar -> Edsger
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-09 15:02:21 +00:00
Quentin Young
1ce14168b3
Merge pull request #4809 from martonksz/master
bgpd: hook for bgp peer status change events
2019-09-09 10:55:00 -04:00
Russ White
d0367e6c58
Merge pull request #4934 from donaldsharp/ospf_reject_or_ignore
ospfd: Remove flog_warn for a situation user can never do anything with
2019-09-07 17:41:23 -04:00
rgirada
b1ab2876fa staticd: static route config should fail if gw configured as its local ip.
Fix:
Added a check in staticd upon receiving nexthop update from zebra such that
it will fail to resolve the nexthop if the connected address added as nexthop.

But still allowing to add to staticd database and appears in running config.
Throwing an warning massage to user if such misconfig issued.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2019-09-07 08:11:14 -07:00
Donatas Abraitis
d32b3c5bbc
Merge pull request #4947 from sworleys/Docker-Update-Libcap
topotests: Add libcap-dev to the Dockerfile
2019-09-07 10:03:34 +03:00
Renato Westphal
651105b5fb zebra: improve cleanup of MPLS labels when zclient disconnects
Use the zserv_client_close hook to cleanup all MPLS labels advertised
by a zclient when it disconnects. We were doing this cleanup for
ldpd only, but now we have other daemons that are MPLS aware,
like ospfd (due to the new Segment Routing feature).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-06 21:06:11 -03:00
Renato Westphal
b3c49d0e77 lib, zebra: enhance the MPLS zapi messages
* Add ability to specify the nexthop type;
* Add ability to install or not a FTN (in addition to an LSP).

These two additions will be useful to install local SR Prefix-SIDs
configured with the no-PHP option.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-06 21:06:11 -03:00
Renato Westphal
635a039eef lib, zebra: rename LSP type used for OSPF SR
SR support for IS-IS is coming so we need to be able to distinguish
OSPF and IS-IS LSPs.

While here, add missing case statement for LDP on
lsp_type_from_re_type().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-06 21:06:11 -03:00
Renato Westphal
e132dea064 zebra: identify MPLS FTNs by route type and instance
Use the route type and instance instead of the route distance
to identify MPLS FTNs. This is a more robust approach since the
routing daemons can modify the distance of their announced routes
via configuration, which can cause inconsistencies.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-06 21:06:11 -03:00
Renato Westphal
bad6b0e72e lib: introduce encode/decode functions for the MPLS zapi messages
Do this for the following reasons:
* Improve modularity of the code by separating the decoding of the
  ZAPI messages from their processing;
* Create an API that is easier to use by the client daemons.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-06 21:06:11 -03:00
Renato Westphal
be489c5738 zebra: add missing case statement in nhlfe2str()
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-06 20:58:09 -03:00
Renato Westphal
e29f8d0db3 tests: remove topotest compatibility with older ldpd versions
Now that topotest was integrated into the FRR repository, we
don't need to worry anymore about creating tests that work across
different FRR versions. The topotests present on any branch need
to be compatible only with the FRR daemons from that same branch.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-06 20:58:09 -03:00
Renato Westphal
a971aeb68e zebra: improve the output of "show mpls table"
Use the table generator to adjust the columns width according to
the table's content.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-06 20:54:59 -03:00
Stephen Worley
a4e6a2f808 topotests: Add libcap-dev to the Dockerfile
Add libcap-dev to the Dockerfile now that its a required depency.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-09-06 18:20:47 -04:00