Commit Graph

19558 Commits

Author SHA1 Message Date
Renato Westphal
ee02198a38
Merge pull request #6352 from volta-networks/fix_ldp_dscp
ldpd: LDP does not always send traffic with correct DSCP value.
2020-05-06 12:23:01 -03:00
Karen Schoener
def23eb395 ldpd: LDP does not always send traffic with correct DSCP value.
Adding code so that the LDP neighbor that does not initiate the
TCP connection also sets the DSCP (via setsocketopt).

Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-05-06 09:46:07 -04:00
Quentin Young
6f2f2e6172
Merge pull request #6347 from opensourcerouting/llvm-callgraph
tools: LLVM-based call graphs
2020-05-05 17:40:21 -04:00
Quentin Young
794c2b2d73
Merge pull request #6350 from pureport/fix/bgp_double_community_free
bgpd: Check to ensure community attributes exist before freeing them
2020-05-05 17:39:28 -04:00
Josh Cox
2c15754ea3 bgpd: Check to ensure community attributes exist before freeing them
Community attributes might have been removed by an inbound route map, so we
should check to ensure they still exist before trying to free them.
This fixes a segfault described in issue #6345.

Signed-off-by: Josh Cox <josh.cox@pureport.com>
2020-05-05 15:59:38 -04:00
David Lamparter
d973526821
Merge pull request #6349 from qlyoung/hook-cpp-compat 2020-05-05 21:42:29 +02:00
Quentin Young
e01a788c44 lib: make hook.h cpp-compatible
Some CPP compilers don't support these designated initializers, since
we're just zero initializing don't need em

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-05-05 14:05:03 -04:00
Donald Sharp
44fb33ee58
Merge pull request #6103 from mjstapp/fix_all_unnumbered
zebra: don't treat every interface as unnumbered
2020-05-05 13:00:26 -04:00
David Lamparter
fd0cca8fe2
Merge pull request #6335 from ton31337/feature/show_policy_in_bgp_summary 2020-05-05 15:29:09 +02:00
David Lamparter
43436c155e build: don't link ldpd.c twice
... this breaks LLVM bitcode linking.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-05-05 14:39:12 +02:00
David Lamparter
3d62176b18 python: add graphviz callgraphs
Uses the JSON data extracted from LLVM bitcode by tools/frr-llvm-cg.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-05-05 14:39:12 +02:00
David Lamparter
8fb40377de build: add LLVM bitcode targets
Just an easy way to produce LLVM .bc (bitcode) files.  Not used during
normal builds.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-05-05 14:39:12 +02:00
David Lamparter
0045c13067 tools: frr-llvm-cg
This dumps call graph data from LLVM bitcode files into a JSON file.
Specifically for FRR, it understands thread_add_*(), hook_*() and
install_element() so it can provide extra information in these cases.
As a general feature, it tries to track down function pointers as far as
easily feasible.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-05-05 14:39:12 +02:00
David Lamparter
5999439549 build: rework Makefile var extraction... again
*sigh* I can't seem to catch a break on this.  Add a regex variant.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2020-05-05 14:06:42 +02:00
David Lamparter
15e9c561b2 Merge commit '97cfd5d207e46a027809125cfb356fd301af0cf5'
(from PR #6137)
2020-05-04 21:02:13 +02:00
Donatas Abraitis
62c42b0efe doc: Add an example about what "(Policy)" means under show bgp summary
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-05-04 15:31:13 +03:00
Donatas Abraitis
d3ada36668 bgpd: Show "(Policy)" under PfxRcd/PfxSnt when eBGP policy is in use
It could be hard to notice when eBGP policy is missing in `show bgp summary`.

This adds more sugar to the output:

Normal:
```
 MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
      10        0    0    0 00:02:07            6        8
```
When rfc8212 is enabled (default since 7.4) - OUTBOUND:
```
 MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
      13        0    0    0 00:04:56            6 (Policy)
```
INBOUND:
```
 MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
      19        0    0    0 00:06:27     (Policy)        2
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-05-03 21:49:46 +03:00
Mark Stapp
81ad029173
Merge pull request #6330 from sworleys/No-NHG-Install-With-VRFns
zebra: force off kernel NHG install with netns VRFs
2020-05-01 14:23:49 -04:00
Mark Stapp
061a8eb349
Merge pull request #6329 from donaldsharp/zebra_more_info
zebra: Display ifindex of interface being installed on
2020-05-01 13:48:50 -04:00
Stephen Worley
d982012a0e zebra: force off kernel NHG install with netns VRFs
Force off kernel NHG install with netns-based VRFs for
now. There is not really a good solution for allowing
kernel nexthop groups in namespaced based vrfs.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2020-05-01 12:34:43 -04:00
Donald Sharp
2c77ddee4b zebra: Display ifindex of interface being installed on
When installing a nexthop group, dump out the ifindex of the
nexthop being installed as a bit more data for the developer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-01 11:58:20 -04:00
Quentin Young
af6642f0e7
Merge pull request #6326 from mjstapp/ignore_emacs_desktop
git: ignore emacs desktop
2020-04-30 18:23:27 -04:00
Mark Stapp
7b7190e249 git: ignore emacs desktop
Ignore the emacs desktop files - should never ever be committed

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-04-30 14:19:10 -04:00
Mark Stapp
02d5306306
Merge pull request #6323 from donaldsharp/floom
bgpd: Ensure that we have a ifp pointer
2020-04-30 13:25:42 -04:00
Donald Sharp
5a48025ccc
Merge pull request #6322 from ton31337/feature/bgp_bogon_filter_example
doc: Add an example how to filter BGP bogon ASNs
2020-04-30 13:14:30 -04:00
Donald Sharp
68cecc3b69 bgpd: Ensure that we have a ifp pointer
It is possible that the if_lookup_by_index() call will return
a NULL value and calling zclient_send_interface_radv_req.  Just
test that we have a valid interface pointer.

Found by Coverity

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-30 11:16:28 -04:00
Donatas Abraitis
125cec1a8f doc: Add an example how to filter BGP bogon ASNs
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-04-30 17:38:31 +03:00
Donald Sharp
ba3f5f06d0
Merge pull request #6318 from opensourcerouting/fix-exit-vrf
lib: update the CLI xpath index when exiting from the VRF node
2020-04-30 07:30:01 -04:00
Donald Sharp
58df03afb1
Merge pull request #6320 from opensourcerouting/fix-vrf-misconfig-detection
zebra: fix detection of VRF misconfiguration
2020-04-30 07:29:17 -04:00
Renato Westphal
2e86d16d99 zebra: fix detection of VRF misconfiguration
The netlink_vrf_change() function is called both when a VRF device
is created in the Linux kernel and when it is activated. This
commit changes this function to perform the VRF misconfiguration
detection only when the VRF device is created, as doing the check
twice would cause a false positive followed by a hard failure (not
to mention the double check is unnecessary since the VRF table ID
can't change once the device is created).

Fixes #6319.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-04-29 23:34:06 -03:00
Renato Westphal
31b5355d6f
Merge pull request #6241 from volta-networks/fix_ldp_acl
ldpd: fix ACL rule modification
2020-04-29 22:44:25 -03:00
Renato Westphal
799a81df9d lib: update the CLI xpath index when exiting from the VRF node
All custom "exit-*" commands that exit from a YANG-modeled
CLI node need to use cmd_exit() to ensure the CLI xpath index
(vty->xpath_index) will be updated accordingly.

Fixes #6316.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-04-29 18:49:29 -03:00
Sri Mohana Singamsetty
a276f04a3f
Merge pull request #6314 from pjdruddy/fix-arp-cache-vtep-json-cli
zebra: fix json for show evpn arp-cache vni vtep
2020-04-29 09:31:22 -07:00
Stephen Worley
090152ec9c
Merge pull request #5786 from mjstapp/fix_notif_empty_nhg
zebra: fix handling of failed route install via notification
2020-04-29 12:28:56 -04:00
lynne
2d1aa1e887 ldpd: fix ACL rule modification
Changes to ACL rules were not applied to LDP.  This fix allows
LDP to be notified when a rule in an ACL filter is modified by
the user. The filter is properly applied to the LDP session.
The filter may cause a LDP session to go down/up or to remove/add
labels being advertised/received from a neighbor.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-04-29 12:27:17 -04:00
Mark Stapp
a79fdd6580 zebra: don't treat every interface as unnumbered
Commit e93a6fbb4 from PR3908 changed every interface into an
'unnumbered' interface - even interfaces that do not have
ipv4 at all. Undo that.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-04-29 12:08:49 -04:00
Russ White
dc1412e249
Merge pull request #6309 from dslicenc/ra-retrans-interval
zebra: add ability to set retransmit timer for IPv6 RAs
2020-04-29 11:10:33 -04:00
Russ White
37d6afef2a
Merge pull request #6303 from dslicenc/stop-enhe-ras
bgpd: turn off RAs when numbered peers are deleted
2020-04-29 11:09:58 -04:00
Donald Sharp
854a463b97
Merge pull request #6313 from volta-networks/fix_zebra_pw_nht
zebra: fix zebra pseudowire manager NHT
2020-04-29 10:22:04 -04:00
Donald Sharp
cd8e0b88e3
Merge pull request #6299 from ton31337/fix/access-list_deletion
lib: Delete the entire access-list only if there are no more entries
2020-04-29 08:31:31 -04:00
Pat Ruddy
1cc5b09394 zebra: fix json for show evpn arp-cache vni vtep
The function zebra_vxlan_print_neigh_vni_vtep does not create
a json object when json has been requested from the CLI and as a
result it prints out the information in normal CLI format.
Fix is to allocate the json object when required.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
2020-04-29 12:29:09 +01:00
Don Slice
534378996b doc: Documentation for ipv6 nd ra-retrans-timer command
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2020-04-29 11:26:04 +00:00
Don Slice
b19ac878be zebra: add ability to set retransmit timer for IPv6 RAs
Reported by testing agency that rfc 4861 section 6.2.1 states
that all implementations must have a configuration knob to change
the setting of the advertised retransmit timer sent in RA packets.
This fix adds that capability.

Ticket: CM-29199
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2020-04-29 11:26:04 +00:00
David Lamparter
f6be730827
Merge pull request #6228 from donaldsharp/change_network_statement_default 2020-04-29 09:02:42 +02:00
Sri Mohana Singamsetty
4a6cd98e54
Merge pull request #6310 from donaldsharp/revert_the_behavior
Revert "vtysh: fix searching commands in parent nodes"
2020-04-28 15:41:47 -07:00
Donald Sharp
f990a4169c doc: Update doc for the bgp network import-check command
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-28 15:57:53 -04:00
Donald Sharp
62282e8379 bgpd,tests: Modify import-check to require underlying prefixes to exist
Modify the import-check command to require the underlying prefix
to exist in the rib.  General consensus is that this is the correct
behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-28 15:57:53 -04:00
Donald Sharp
425c241a49
Merge pull request #6302 from volta-networks/fix_ldpd_af_reload
tools: fix frr-reload AF issue with ldpd
2020-04-28 15:05:57 -04:00
Karen Schoener
13c46fa1a0 zebra: fix zebra pseudowire manager NHT
Intermittently, there is a 30 second delay for a LDP pseudowire to become
operational.

One way to reproduce the issue is: Once PW is up, shutdown link to trigger
a change to the pseudowire's next hop, and then restore link to cause
pseudowire to return to original NH.

Problem Descripton:
    The Zebra PW manager installs pseudowires in the data plane when the
    following two conditions are met:
        1. Pseudowire is labeled via LDP mapping messages
        2. A labeled NH route exists to reach the remote pseudowire endpoint

    The Zebra PW manager registers a NHT callback when a pseudowire is enabled.
    This allows the Zebra PW manager to install or reinstall the pseudowire.

    The Zebra PW manager deregisters for the NHT callback when the pseudowire is
    disabled.  When LDP learns the remote-pseudowire status is 'not forwarding',
    LDP notifies Zebra that the pseudowire is disabled.

    This creates a race condition where a new labeled NH can be resolved after the
    Zebra PW manager deregistered for the NHT callback.

    For static pseudowires, it makes sense for Zebra PW manager to deregister for
    NHT callbacks for disabled pseudowires.  Static pseudowires become disabled
    via CLI configuration commands.

    For LDP pseudowires, the Zebra PW manager should not deregister for NHT
    callbacks for disabled pseudowires.

Overview of changes:
    1. Zebra PW manager should not deregister for NHT callbacks when an LDP
       pseudowire is disabled.
       Zebra PW manager will register for NHT callbacks when the LDP pseudowire
       is first enabled.
       Zebra PW manager will deregister for NHT callbacks when the LDP
       pseudowire is deleted.
    2. Remove the 30 second timer that was added in PR4122.
       PR4122 tried to fix this race condition with a timer.
       Once we eliminate the race condition (by keeping the Zebra PW manager
       registered for NHT callbacks), this timer can be removed.
    3. Zebra PW manager handling of static pseudowires will remain as-is.
       Zebra PW manager will register for NHT callbacks when the static
       pseudowire is enabled.
       Zebra PW manager will deregister for NHT callbacks when the static
       pseudowire is disabled.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-04-28 14:39:12 -04:00
Lou Berger
3b548ddc33
Merge pull request #6295 from ton31337/feature/show_bgp_afi_safi_sntpfx
bgpd: Show PfxSnt for `show bgp <afi> <safi>` command
2020-04-28 11:34:13 -04:00