Commit Graph

18714 Commits

Author SHA1 Message Date
David Lamparter
668b6011b3 zebra: fix sign-compare warning in cumulus mlag
This trips up the CI on Ubuntu 16.04.  (I guess the code wasn't getting
built there before...)

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-11 11:41:54 +01:00
David Lamparter
d621815a0e zebra: create zebra_cumulus_mlag module
This is pretty much just to get rid of the HAVE_CUMULUS.  The
hook/module API is as "wtf" as it was before...

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-12-11 11:40:47 +01:00
Donald Sharp
659a3e4288
Merge pull request #5517 from mjstapp/fix_evpn_state
zebra: use correct state when installing evpn macs
2019-12-10 17:14:34 -05:00
Donald Sharp
5857e8411a
Merge pull request #5521 from mjstapp/fix_pim_upstream_sa
pimd: clear SA warning in pimd
2019-12-10 17:14:03 -05:00
Mark Stapp
174d3891ab pimd: clear SA warning in pimd
Remove a dead store in pim_upstream.c to clear up an SA
warning.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-12-10 12:10:44 -05:00
David Lamparter
2d7932e153
Fix bgp transit double free (#5436)
Fix bgp transit double free
2019-12-10 17:56:57 +01:00
Russ White
7d708d3c01
Merge pull request #5511 from Jafaral/ipmroute
doc: document ip mroute static route cmd
2019-12-10 08:55:57 -05:00
Renato Westphal
531868034a
Merge pull request #5513 from m-varasteh/fix-running-entry-in-vrf-change
lib: fixes invalid running_entry when VRF is changed
2019-12-10 10:03:01 -03:00
Donatas Abraitis
e9613d32cc
Merge pull request #5429 from Spantik/bug_fix
BGP: BGP assert when it tries to access peer which is closed.
2019-12-10 09:43:28 +02:00
Mahdi Varasteh
ced28861d4 lib: fixes invalid running_entry when VRF is changed
we just unset the entry from old node and add it to the new one

Signed-off-by: Mahdi Varasteh <mahdy.varasteh@gmail.com>
2019-12-10 08:38:45 +03:30
Jafar Al-Gharaibeh
6a40ad3ee1 doc: document ip mroute static route cmd
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2019-12-09 16:55:14 -06:00
Renato Westphal
c3a964360d
Merge pull request #5509 from manuhalo/fix_isis_circ_del
isisd: clean ipv4/6 circuit config on destroy
2019-12-09 18:34:49 -03:00
Mark Stapp
e1f3a8eb19 lib,zebra: add api to enforce nexthop sort order when copying
Add an api that creates a copy of a list of nexthops and
enforces the canonical sort ordering; consolidate some nhg
code to avoid copy-and-paste. The zebra dplane uses
that api when a plugin sets up a list of nexthops, ensuring
that the plugin's list is ordered when it's processed in
zebra.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-12-09 16:25:53 -05:00
Mark Stapp
1c30d64bb6 zebra: align dplane notify processing with nhg work
The processing of dataplane route notifications was a little
off-target after the nexthop-group re-work. This should allow
notifications to work better.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-12-09 16:19:14 -05:00
Quentin Young
534b98f925 vrrpd, yang: cleanup vrrp nb conversion
- Use correct units and conversions in model & code
- Fix incorrect CLI help string for V6 virtual addrs
- Fix nb get-entry callback for virtual router
- Fix a couple style nits
- Simplify some CLI code
- Remove unused code
- Remove unused YANG definitions
- Update sighup() to handle reloads
- Update interface level config writer to use NB callbacks
- Add simplified `no` forms for priority and advertisement-interval
  commands

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 16:05:01 -05:00
Quentin Young
0dad8e91b7 lib: add ipaddr_isset()
Compare ip address against 0

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young
4c5b9faef5 yang: add org, description data to vrrp model
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young
6356b28642 vrrpd: remove unused variables
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young
5084ff592e vrrpd: remove unused variable in nb
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young
f495425b64 vrrpd: northbound conversion
Convert VRRPD to use the northbound API.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young
e6a70ae8f1 yang: add opderdata & slight reorg for vrrp
- Move virtual address configs to be under the version specific (v4/v6)
  nodes
- Add lots of operdata

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young
4d12b27efe yang: add v2 support to vrrp yang model
This adds support for VRRPv2 to the VRRP YANG model, which entails the
following changes:

- Add a version leaf with a default of 3
- Split v4 and v6 vritual addresses into separate lists, with
  constraints on v6 addresses to only exist when the version is 3

General improvements:

- Remove unused config groupings
- Add administrative shutdown leaf
- Split state reporting into v4 and v6 blocks, since these are
  considered separate virtual routers

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young
2ea09c7379 yang: update vrrp yang model
Remove config / state blocks; this is an OpenConfig-ism that is not
relevant for FRR

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young
21a22f4cd2 yang: add vrrp yang model
Adapted from OpenConfig. Changes:
- Interface tracking commented out (unsupported)
- Preemption delay commented out (unsupported)
- Accept_Mode default changed to 'true'

Also linted and stylized.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young
9323f278f3 vrrpd: allow vrrp_shutdown() on shutdown rtr
No need for a state check before the call, although still a good idea

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young
fb8b348cc1 vrrpd: const vrrp_lookup()
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young
671fd2a318 vrrpd: make vrrp_[add|del]_ip not insane
For some reason I made these functions require you to pass the correct
(v4 or v6) router when we could determine it from the type of address
passed; fix this

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Donald Sharp
597371a615 lib: Add weight to nexthop for nexthop-group nexthops
Add the ability to read in the weight of a nexthop and store/handle
it appropriately

nexthop-group BLUE
  nexthop 192.168.201.44 weight 33
  nexthop 192.168.201.45 weight 66
  nexthop 192.168.201.46 weight 99

Is appropriately read in and handled as appropriate.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-12-09 13:39:59 -05:00
Donald Sharp
bd054c1aa2 lib, zebra: Allow for encode/decode of nexthop weight in pass down
Add code to encode/decode the nexthop weight when we pass it down
into zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-12-09 13:37:37 -05:00
Donald Sharp
df7fb5800b lib, zebra: Allow for installation of a weighted nexthop
Linux has the idea of allowing a weight to be sent
down as part of a nexthop group to allow the kernel
to weight particular nexthop paths a bit more or less
than others.

See:
http://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.rpdb.multiple-links.html

Allow for installation into the kernel using the weight attribute
associated with the nexthop.

This code is foundational in that it just sets up the ability
to do this, we do not use it yet.  Further commits will
allow for the pass through of this data from upper level protocols.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-12-09 13:37:37 -05:00
Emanuele Di Pascale
d38a3cb24a isisd: clean ipv4/6 circuit config on destroy
when deleting an isis interface config with 'no [ip|ipv6] router isis'
we are destroying the isis yang container for that interface, but the
actual circuit struct is kept, and so are the flgs determining whether
that circuit is configured for ipv4 and/or ipv6. This caused issues
when removing and re-adding configuration, as the area counters for
ip circuits were not correctly updated and the topology was never
populated.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-12-09 18:22:25 +01:00
Quentin Young
490810d52a vrrpd: add vrf support
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 12:17:53 -05:00
Quentin Young
3cb543cf1e vrrpd: handle failure to lookup parent iface
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 12:17:53 -05:00
Santosh P K
74e00a55c1 bgpd: BGP assert when it tries to access peer which is closed.
Problem: BGP peer pointer is present in keepalive hash table
even when socket has been closed in some race condition.
When keepalive tries to access this peer it asserts.

RCA: Below sequence of events causing assert.
1. Config node peer has went down due to TCP reset
   it's FD has been set to -1.
2. Doppelganger peer goes to established state and it has
   been added to peer hash table for keepalive when it was
   in openconfirm state.
3. Config node parameters including FD are exchanged with
   doppelganger. Doppelganger will not have FD -1.
4. Doppelganger will be deleted as part of this it will
   remove it from the keepalive peer hash table.
5. While removing from hash table it tries to acquire lock.
6. During this time keepalive thread has the lock and in
   a loop trying to send keepalive for peers in hash table.
7. It tries to send keepalive for doppelganger peer with fd
   set to -1 and asserts.

Signed-off-by: Santosh P K <sapk@vmware.com>
2019-12-09 09:10:57 -08:00
Donald Sharp
0dcbec72aa
Merge pull request #5498 from mjstapp/sharp_with_labels
lib,sharpd: support labelled nexthop-groups in sharpd
2019-12-07 11:44:02 -05:00
Jafar Al-Gharaibeh
73373085bc
Merge pull request #5499 from sworleys/Pbr-Detail
pbrd: make the show pbr map output better
2019-12-06 18:02:08 -06:00
Jafar Al-Gharaibeh
5bc47da6b5
Merge pull request #5421 from sworleys/PBR-Del-Mark-All-Seq
pbrd: only remove interface after all seq uninstalled
2019-12-06 17:49:56 -06:00
Jafar Al-Gharaibeh
94c1ae82da
Merge pull request #5355 from AnuradhaKaruppiah/pim-state-machine-fixes
PIM state machine fixes
2019-12-06 17:47:07 -06:00
Quentin Young
5e0e9c09f6 bgpd: more attribute parsing cleanup & paranoia
* Move VNC interning to the appropriate spot
* Use existing bgp_attr_flush_encap to free encap sets
* Assert that refcounts are correct before exiting to keep the demons
  contained in their fiery prison

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-06 14:33:54 -05:00
Donald Sharp
4f63093247
Merge pull request #4765 from opensourcerouting/defaults-v2
lib/*: new config defaults system, v2
2019-12-06 14:07:42 -05:00
Stephen Worley
1ce24b9b88 pbrd: use yes/no for pbr map validity vty output
Change the pbr map validity state to indicate yes/no
rather than 1/0 in the `show pbr map` command.

Humans aren't robots, so don't use binary.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-12-06 14:04:02 -05:00
Stephen Worley
b740126d97 pbrd: use spaces in show pbr map vty output
We were using a mix of spaces and tabsin show pbr map vty output.
Tabs can be inconsistent depending on the system settings.
Using spaces is a safer option for more consistent output.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-12-06 14:04:02 -05:00
Stephen Worley
b781c0869d doc: add show pbr map doc
Add some doc for the `show pbr map [NAME] [detail]` command.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-12-06 14:04:02 -05:00
Stephen Worley
add5e0a4cf pbrd: make vty nexthop/nexthop-group output consistent
The vty output for pbr maps with a nexthop-group was not
consistent with those configured with an individual nexthop.
Fix that so its easier for users to read.

alfred# show pbr map
  pbr-map TEST1 valid: 1
    Seq: 222 rule: 521
        Installed: yes Reason: Valid
        SRC Match: 2.2.2.2/32
        Nexthop-Group: blue
                Installed: yes Tableid: 10000
    Seq: 333 rule: 632
        Installed: yes Reason: Valid
        SRC Match: 3.3.3.3/32
        Nexthop-Group: blue
                Installed: yes Tableid: 10000
    Seq: 444 rule: 743
        Installed: yes Reason: Valid
        SRC Match: 4.4.4.4/32
        Nexthop-Group: blue
                Installed: yes Tableid: 10000
    Seq: 555 rule: 854
        Installed: yes Reason: Valid
        SRC Match: 5.5.5.5/32
        Nexthop-Group: red
                Installed: yes Tableid: 10001
    Seq: 666 rule: 965
        Installed: yes Reason: Valid
        SRC Match: 6.6.6.6/32
        nexthop 1.1.1.1
                Installed: yes Tableid: 10002
alfred#

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-12-06 14:04:02 -05:00
Stephen Worley
3259cde637 pbrd: make show pbr map detail actually work
The `detail` keyword was doing literally nothing. Changed the
default show to be a bit more user friendly and detail
to give the information you might would need for
debugging.

alfred# show pbr map
  pbr-map TEST1 valid: 1
    Seq: 222 rule: 521
    Installed: yes Reason: Valid
        SRC Match: 2.2.2.2/32
        Nexthop-Group: blue(10000) Installed: yes
    Seq: 333 rule: 632
    Installed: yes Reason: Valid
        SRC Match: 3.3.3.3/32
        Nexthop-Group: blue(10000) Installed: yes
    Seq: 444 rule: 743
    Installed: yes Reason: Valid
        SRC Match: 4.4.4.4/32
        Nexthop-Group: blue(10000) Installed: yes
    Seq: 555 rule: 854
    Installed: yes Reason: Valid
        SRC Match: 5.5.5.5/32
        Nexthop-Group: red(10001) Installed: yes
    Seq: 666 rule: 965
    Installed: yes Reason: Valid
        SRC Match: 6.6.6.6/32
     nexthop 1.1.1.1
        Installed: yes Tableid: 10002
alfred# show pbr map detail
  pbr-map TEST1 valid: 1
    Seq: 222 rule: 521
    Installed: 1(1) Reason: Valid
        SRC Match: 2.2.2.2/32
        Nexthop-Group: blue(10000) Installed: 1(1)
    Seq: 333 rule: 632
    Installed: 1(2) Reason: Valid
        SRC Match: 3.3.3.3/32
        Nexthop-Group: blue(10000) Installed: 1(1)
    Seq: 444 rule: 743
    Installed: 1(3) Reason: Valid
        SRC Match: 4.4.4.4/32
        Nexthop-Group: blue(10000) Installed: 1(1)
    Seq: 555 rule: 854
    Installed: 1(4) Reason: Valid
        SRC Match: 5.5.5.5/32
        Nexthop-Group: red(10001) Installed: 1(1)
    Seq: 666 rule: 965
    Installed: 1(5) Reason: Valid
        SRC Match: 6.6.6.6/32
     nexthop 1.1.1.1
        Installed: 1(1) Tableid: 10002
alfred#

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-12-06 14:04:02 -05:00
Stephen Worley
1eaa836128 pbrd: refactor vty map show output into functions
Refactor the pbr_map and pbr_map_sequence vty output
into some functions to make the code a bit easier to read.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-12-06 14:04:02 -05:00
Mark Stapp
054af19a41 lib,sharpd: support labelled nexthop-groups in sharpd
Update sharpd's zapi client code to support labelled nexthops if
they're present in a nexthop-group.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-12-06 13:49:25 -05:00
Donald Sharp
a44dcdee55
Merge pull request #5332 from mjstapp/remove_zapi_label_flag
*: revise zapi nexthop encoding
2019-12-06 13:19:34 -05:00
David Lamparter
0d26af1203
Merge pull request #5462 from dslicenc/ipv6-ra-lifetime-0
zebra: send RA lifetime of 0 before ceasing to advertise RAs
2019-12-06 18:23:39 +01:00
David Lamparter
d4b391321d
Merge pull request #5226 from donaldsharp/interface_fixup
Interface fixup
2019-12-06 18:21:51 +01:00