]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
4 years agobgpd: Cleanup debugs for bgp_zebra_route_notify_owner 7817/head
Donald Sharp [Tue, 5 Jan 2021 20:22:57 +0000 (15:22 -0500)]
bgpd: Cleanup debugs for bgp_zebra_route_notify_owner

User %pRN as well as add some more debugs for other
interesting cases.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Allow more detailed knowledge of bgp's internal state
Donald Sharp [Tue, 5 Jan 2021 20:03:02 +0000 (15:03 -0500)]
bgpd: Allow more detailed knowledge of bgp's internal state

When bgp is using wait for install semantics it would be nice
to be able to debug it when it is running.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopathd: Convert to use our internal frr_weak_random
Donald Sharp [Tue, 5 Jan 2021 16:10:19 +0000 (11:10 -0500)]
pathd: Convert to use our internal frr_weak_random

rand() should not be used, we should be using the frr_weak_random()
call instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7762 from sworleys/PBR-Ipv4/Ipv6-Match-Fixes
Mark Stapp [Tue, 5 Jan 2021 18:54:06 +0000 (13:54 -0500)]
Merge pull request #7762 from sworleys/PBR-Ipv4/Ipv6-Match-Fixes

pbrd: pbr ipv4/ipv6 match fixes

4 years agoMerge pull request #7772 from LabNConsulting/ziemba/tests-lutil-timestamp
Mark Stapp [Tue, 5 Jan 2021 16:29:49 +0000 (11:29 -0500)]
Merge pull request #7772 from LabNConsulting/ziemba/tests-lutil-timestamp

tests: topotests/lib/lutil.py: add timestamp to log of test start

4 years agoMerge pull request #7807 from logbob0401/vrrpd_yang_bug_fix
Russ White [Tue, 5 Jan 2021 15:30:55 +0000 (10:30 -0500)]
Merge pull request #7807 from logbob0401/vrrpd_yang_bug_fix

Fix augment path problem in frr-vrrpd.yang to comply with rfc 7950

4 years agoMerge pull request #7507 from ton31337/fix/bgpd_do_not_send_update_if_path_really_did...
Russ White [Tue, 5 Jan 2021 15:26:18 +0000 (10:26 -0500)]
Merge pull request #7507 from ton31337/fix/bgpd_do_not_send_update_if_path_really_did_not_change

bgpd: Do not send BGP UPDATE if the route actually not changed

4 years agoMerge pull request #6810 from Orange-OpenSource/link_state
Russ White [Tue, 5 Jan 2021 15:25:38 +0000 (10:25 -0500)]
Merge pull request #6810 from Orange-OpenSource/link_state

Lib: Add Link State Database

4 years agoMerge pull request #7722 from AnuradhaKaruppiah/mh-fixes
Patrick Ruddy [Tue, 5 Jan 2021 09:26:17 +0000 (09:26 +0000)]
Merge pull request #7722 from AnuradhaKaruppiah/mh-fixes

bgpd, zebra: evpn mh fixes

4 years agoMerge pull request #7809 from donaldsharp/m_coverity
Jafar Al-Gharaibeh [Mon, 4 Jan 2021 22:13:21 +0000 (16:13 -0600)]
Merge pull request #7809 from donaldsharp/m_coverity

some coverity fixes

4 years agolib: Add Link State Database 6810/head
Olivier Dugeon [Tue, 26 May 2020 12:51:02 +0000 (14:51 +0200)]
lib: Add Link State Database

Define new models for Link State Database a.k.a TED
and functions to manipulate the new database as well as exchange Link State
information through ZAPI Opaque message.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
4 years agobgpd: Prevent null deref 7809/head
Donald Sharp [Mon, 4 Jan 2021 12:56:47 +0000 (07:56 -0500)]
bgpd: Prevent null deref

There exists a path where we could possibly have a NULL deref
of a pointer.  Prevent this from happening.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopathd: Fix unlock of non-locked mutex
Donald Sharp [Mon, 4 Jan 2021 12:54:06 +0000 (07:54 -0500)]
pathd: Fix unlock of non-locked mutex

We have several instances of a non-locked mutex being unlocked
in path_zebra_router_id_update.  Clean this up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agovrrpd.yang bug fix: modify augment path to comply with rfc 7950 7807/head
Bo Zhang [Sun, 3 Jan 2021 01:31:16 +0000 (17:31 -0800)]
vrrpd.yang bug fix: modify augment path to comply with rfc 7950

Signed-off-by: Bo Zhang <logbob0401@gmail.com>
4 years agoMerge pull request #7791 from mjstapp/fix_pbr_nht_goto
Quentin Young [Tue, 29 Dec 2020 20:54:46 +0000 (15:54 -0500)]
Merge pull request #7791 from mjstapp/fix_pbr_nht_goto

pbrd: clean up possible checkpatch issue

4 years agoMerge pull request #7795 from louis-oui/show-database-vrf
Quentin Young [Tue, 29 Dec 2020 20:53:28 +0000 (15:53 -0500)]
Merge pull request #7795 from louis-oui/show-database-vrf

ospfd: fix no show database output when selecting vrf

4 years agoMerge pull request #7777 from volta-networks/fix_zebra_rib_c++
Quentin Young [Tue, 29 Dec 2020 16:07:12 +0000 (11:07 -0500)]
Merge pull request #7777 from volta-networks/fix_zebra_rib_c++

zebra: avoid c++ reserved keyword

4 years agotests: topotests/lib/lutil.py: add timestamp to log of test start 7772/head
G. Paul Ziemba [Sat, 19 Dec 2020 19:41:05 +0000 (11:41 -0800)]
tests: topotests/lib/lutil.py: add timestamp to log of test start

    Timestamps in test logs are needed for correlation with messages in
    routing protocol log files. Vox populi indicates preference for
    timestamp at beginning of line.

    OLD:
    (#55) scripts/rip-show.py:61 COMMAND:r1:vtysh -c "show ip rip status": 00:0.* 00:0:wait:RIP Peers:

    NEW:
    Sat Dec 19 08:26:45 2020 (#55) scripts/rip-show.py:61 COMMAND:r1:vtysh -c "show ip rip status": 00:0.* 00:0:wait:RIP Peers:

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
4 years agoMerge pull request #7788 from deastoe/zebra2proto-kernel-connect
Stephen Worley [Mon, 28 Dec 2020 19:57:41 +0000 (14:57 -0500)]
Merge pull request #7788 from deastoe/zebra2proto-kernel-connect

zebra: zebra2proto() handle kernel/connect type

4 years agoMerge pull request #7761 from bisdhdh/local_1
Donatas Abraitis [Mon, 28 Dec 2020 15:09:36 +0000 (17:09 +0200)]
Merge pull request #7761 from bisdhdh/local_1

doc: Add BGP GR command for preserving forwarding state.

4 years agoMerge pull request #7776 from mjstapp/fix_pathd_build
Olivier Dugeon [Mon, 28 Dec 2020 09:45:38 +0000 (10:45 +0100)]
Merge pull request #7776 from mjstapp/fix_pathd_build

pathd: fix compile warning in path_cli

4 years agoospfd: fix no show database output when selecting vrf 7795/head
Louis Scalbert [Thu, 24 Dec 2020 13:41:31 +0000 (14:41 +0100)]
ospfd: fix no show database output when selecting vrf

No output when selecting a vrf
frr# show ip ospf vrf default database router adv-router 10.125.0.1
VRF Name: default

       OSPF Router with ID (10.125.0.1)

In comparison with:
frr# show ip ospf database router adv-router 10.125.0.1

       OSPF Router with ID (10.125.0.1)

                Router Link States (Area 0.0.0.0)

  LS age: 155
  Options: 0x2  : *|-|-|-|-|-|E|-
(...)

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
4 years agopbrd: clean up possible checkpatch issue 7791/head
Mark Stapp [Wed, 23 Dec 2020 19:03:06 +0000 (14:03 -0500)]
pbrd: clean up possible checkpatch issue

PR 7724 triggered a minor style warning (at least in the CI
context). Clean that up.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7724 from donaldsharp/pbr_zebra_was_wrong 7797/head
Mark Stapp [Wed, 23 Dec 2020 18:34:18 +0000 (13:34 -0500)]
Merge pull request #7724 from donaldsharp/pbr_zebra_was_wrong

Pbr zebra was wrong

4 years agoMerge pull request #7759 from qlyoung/reformat-tests-again
Mark Stapp [Wed, 23 Dec 2020 13:11:00 +0000 (08:11 -0500)]
Merge pull request #7759 from qlyoung/reformat-tests-again

Reformat tests again

4 years agodoc: Add BGP GR command for preserving forwarding state. 7761/head
bisdhdh [Thu, 17 Dec 2020 21:57:45 +0000 (03:27 +0530)]
doc: Add BGP GR command for preserving forwarding state.

BGP GR command for preserving forwarding state command is
Added to the docs.

Signed-off-by: Biswajit Sadhu <biswajit.sadhu@gmail.com>
4 years agoMerge pull request #6212 from gpnaveen/static_routes
Martin Winter [Tue, 22 Dec 2020 22:11:37 +0000 (14:11 -0800)]
Merge pull request #6212 from gpnaveen/static_routes

tests: Adding static routing topojson automation suites.

4 years agozebra: zebra2proto() handle kernel/connect type 7788/head
Duncan Eastoe [Tue, 22 Dec 2020 21:23:43 +0000 (21:23 +0000)]
zebra: zebra2proto() handle kernel/connect type

When dplane_fpm_nl is used the "Please add this protocol(n) to proper
rt_netlink.c handling" debug message is emitted for any route of type
kernel or connected.

This severely reduces performance of dplane_fpm_nl when large numbers
of these routes are present in the RIB.

The messages are not observed when using the original fpm module since
this uses a custom function, netlink_proto_from_route_type().

zebra2proto() now returns RTPROT_KERNEL for ZEBRA_ROUTE_CONNECT and
ZEBRA_ROUTE_KERNEL. This should only impact dplane_fpm_nl's use of
the common netlink routines since these routes generally ignored via
checking of RSYSTEM_ROUTE().

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
4 years agoMerge pull request #7767 from mjstapp/fix_dplane_extra_info
Rafael Zalamena [Tue, 22 Dec 2020 18:08:35 +0000 (15:08 -0300)]
Merge pull request #7767 from mjstapp/fix_dplane_extra_info

zebra: fix loop logic in dplane for extra intf info

4 years agoMerge pull request #7472 from opensourcerouting/fpm-fixes
Mark Stapp [Tue, 22 Dec 2020 16:37:58 +0000 (11:37 -0500)]
Merge pull request #7472 from opensourcerouting/fpm-fixes

fpm: frr-reload, IPv6 and an improvement

4 years agoMerge pull request #7758 from donaldsharp/tests_dict_values
Mark Stapp [Tue, 22 Dec 2020 15:48:29 +0000 (10:48 -0500)]
Merge pull request #7758 from donaldsharp/tests_dict_values

tests: dict_values are not lists in version 3

4 years agoMerge pull request #7779 from pjdruddy/pr-bgp-doc-warn
Donatas Abraitis [Tue, 22 Dec 2020 07:27:59 +0000 (09:27 +0200)]
Merge pull request #7779 from pjdruddy/pr-bgp-doc-warn

doc: fix warning in bgp.rst

4 years agodoc: fix warning in bgp.rst 7779/head
Pat Ruddy [Mon, 21 Dec 2020 17:35:39 +0000 (17:35 +0000)]
doc: fix warning in bgp.rst

remove indent to fix
make[1]: Entering directory '/home/pat/git/frr'
  SPHINX   doc/user/_build/.doctrees/environment.pickle
/home/pat/git/frr/doc/user/bgp.rst:3477: WARNING: Explicit markup ends
without a blank line; unexpected unindent.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agozebra: skip EVI setup if an ES is applied to a pseudo interface 7722/head
Anuradha Karuppiah [Wed, 7 Oct 2020 18:33:13 +0000 (11:33 -0700)]
zebra: skip EVI setup if an ES is applied to a pseudo interface

zebra maintains pseudo interface for hanging off user config after
the interface is deleted in the kernel. If an user tried to config
an ES against such an interface zebra would crash with the following
call stack -
    at zebra/zebra_evpn_mh.c:2095
    sysmac=sysmac@entry=0x55cfbadd3160) at zebra/zebra_evpn_mh.c:2258
    at zebra/zebra_evpn_mh.c:3222
    argv=<optimized out>, es_lid_str=<optimized out>, es_lid=1, no=0x0, vty=0x55cfbaf4c7b0)
    at zebra/zebra_evpn_mh.c:3222
    argv=<optimized out>) at ./zebra/zebra_evpn_mh_clippy.c:202
    vty=vty@entry=0x55cfbaf4c7b0, cmd=cmd@entry=0x0, filter=FILTER_RELAXED)
    at lib/command.c:1073

Ticket: CM-31702

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: accept bgp remote mac-ip update if the higher-seq-local mac is not bgp-ready
Anuradha Karuppiah [Thu, 1 Oct 2020 21:19:52 +0000 (14:19 -0700)]
zebra: accept bgp remote mac-ip update if the higher-seq-local mac is not bgp-ready

If a local-MAC or local-neigh is not active locally it is not sent to BGP.
At this point if BGP rxes a remote route it accepts it and installs in
zebra. Zebra was rejecting BGP's update if it had a higher seq local (inactive)
entry. This would result in bgp and zebra falling out of sync.

In some cases zebra would delete the local-inactive entries in sometime (as
a part of the dplane/kernel garbage collection). This would leave zebra
with missing remote entries (which were still present in bgpd).

This change allows lower-seq BGP updates to overwrite zebra's local entry if
that entry happens to be local-inactive.

Note: This logic was already in use for sync-mac-ip updates. Extended the
same logic to remote-mac-ip updates.

Ticket: CM-31626

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: add missing type-1 and type-4 route descriptions to the legend
Anuradha Karuppiah [Thu, 3 Sep 2020 20:35:19 +0000 (13:35 -0700)]
bgpd: add missing type-1 and type-4 route descriptions to the legend

Sample output -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@torm-11:mgmt:~# net show bgp l2vpn evpn route rd 27.0.0.16:3
EVPN type-1 prefix: [1]:[ESI]:[EthTag]:[IPlen]:[VTEP-IP]
EVPN type-2 prefix: [2]:[EthTag]:[MAClen]:[MAC]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-4 prefix: [4]:[ESI]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[EthTag]:[IPlen]:[IP]

BGP routing table entry for 27.0.0.16:3:[1]:[0]:[03:44:38:39:ff:ff:01:00:00:01]:[32]:[0.0.0.0]
Paths: (4 available, best #2)
  Advertised to non peer-group peers:
  spine-1(swp1) spine-1(swp2) spine-2(swp3) spine-2(swp4)
  4435 5551
    27.0.0.16 from spine-1(swp2) (27.0.0.13)
      Origin IGP, valid, external
      Extended Community: RT:5551:1009 ET:8
      Last update: Thu Sep  3 21:01:53 2020
  4435 5551
    27.0.0.16 from spine-1(swp1) (27.0.0.13)
      Origin IGP, valid, external, bestpath-from-AS 4435, best (Router ID)
      Extended Community: RT:5551:1009 ET:8
      Last update: Thu Sep  3 21:01:53 2020
  4435 5551
    27.0.0.16 from spine-2(swp3) (27.0.0.14)
      Origin IGP, valid, external
      Extended Community: RT:5551:1009 ET:8
      Last update: Thu Sep  3 21:01:53 2020
  4435 5551
    27.0.0.16 from spine-2(swp4) (27.0.0.14)
      Origin IGP, valid, external
      Extended Community: RT:5551:1009 ET:8
      Last update: Thu Sep  3 21:01:53 2020

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

4 years agozebra: clean zevpn references in the access bd database when the VNI is deleted
Anuradha Karuppiah [Thu, 3 Sep 2020 13:50:26 +0000 (06:50 -0700)]
zebra: clean zevpn references in the access bd database when the VNI is deleted

When an VNI was deleted as a part of FRR/zebra shutdown the zevpn entry
was being freed without removing its reference in the access vlan
entry (i.e. without clearing the VLAN->VNI mapping) used by MH.

Ticket: CM-31197

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: reinstall missing peer-sync flag
Anuradha Karuppiah [Sat, 8 Aug 2020 01:32:52 +0000 (18:32 -0700)]
zebra: reinstall missing peer-sync flag

If a netlink/dp notification is rxed for a neigh without the peer-sync
flag FRR re-installs the entry with the right flags. This change is
needed to handle cases where the dataplane and FRR may fall out of
sync because of neigh learning on the network ports (i.e. via
the VxLAN).

Ticket: CM-30693
The problem was found during VM mobility "torture" tests where 100s
of extended VM moves were done.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: fix typo "show bgp l2vpn evpn es-evi [vni] <> json" display
Anuradha Karuppiah [Fri, 7 Aug 2020 19:41:10 +0000 (12:41 -0700)]
bgpd: fix typo "show bgp l2vpn evpn es-evi [vni] <> json" display

The ead-per-evi flag was being displayed as ed-per-evi.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: changes to log ext_flags in neigh nl add
Anuradha Karuppiah [Thu, 30 Jul 2020 12:59:35 +0000 (05:59 -0700)]
zebra: changes to log ext_flags in neigh nl add

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: fix a problem with local MAC pointing to a remote ES
Anuradha Karuppiah [Wed, 29 Jul 2020 18:55:19 +0000 (11:55 -0700)]
zebra: fix a problem with local MAC pointing to a remote ES

If a remote MAC update is rxed from BGP with a lower sequence number than
the local one zebra ignores the MAC update. This typically happens if
there is a race condition (where updates are in flight from zebra to BGP).

There was a bug in zebra because of which the dest ES was being updated
before this check. This left the local MAC pointing to a remote ES.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Relevant Dumps:
===============
root@leaf21:mgmt:~# net show evpn mac vni 101101 mac 00:93:00:00:00:01
MAC: 00:93:00:00:00:01
 ESI: 03:00:00:00:77:01:03:00:00:0d
 Intf: - VLAN: 101
 Sync-info: neigh#: 1 peer-proxy
 Local Seq: 3 Remote Seq: 0
 Neighbors:
    21.1.13.1 Active
root@leaf21:mgmt:~# net sho evpn es
Type: L local, R remote, N non-DF
ESI                            Type ES-IF                 VTEPs
03:00:00:00:77:01:02:00:00:0c  R    -                     6.0.0.10,6.0.0.11
03:00:00:00:77:01:03:00:00:0d  R    -                     6.0.0.10,6.0.0.11,6.0.0.12
03:00:00:00:77:01:04:00:00:0e  R    -                     6.0.0.10,6.0.0.11,6.0.0.12,6.0.0.13
03:00:00:00:77:02:02:00:00:16  LR   bondP2-H2             6.0.0.15
03:00:00:00:77:02:03:00:00:17  LR   bondP2-H3             6.0.0.15,6.0.0.16
03:00:00:00:77:02:04:00:00:18  LR   bondP2-H4             6.0.0.15,6.0.0.16,6.0.0.17
root@leaf21:mgmt:~#

Relevant logs:
===============
2020/07/29 15:41:27.110846 ZEBRA: Recv MACIP ADD VNI 101101 MAC 00:93:00:00:00:01 IP 21.1.13.1 flags 0x0 seq 2 VTEP 0.0.0.0 ESI 03:00:00:00:77:01:03:00:00:0d from bgp
2020/07/29 15:41:27.110867 ZEBRA: Ignore remote MACIP ADD VNI 101101 MAC 00:93:00:00:00:01 IP 21.1.13.1 as existing MAC has higher seq 3 flags 0x401
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Ticket: CM-30273

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: advertise stale neighs if EVPN-MH is not enabled
Anuradha Karuppiah [Tue, 7 Jul 2020 01:01:41 +0000 (18:01 -0700)]
zebra: advertise stale neighs if EVPN-MH is not enabled

With EVPN-MH, Type-2 routes are also used for MAC-IP syncing between
ES peers so a change was done to only treat REACHABLE local neigh
entries as local-active and advertise them as Type-2 routes i.e. STALE
neigh entries are no longer advertised as Type-2s.

This however exposed some unexpected problems with MLAG where a
secondary reboot followed by a primary reboot left a lot of neighs
in STALE state (on the primary) resulting in them not being
advertised. And remote routed traffic to those hosts being
blackholed in a sym-IRB setup.

This commit is a workaround to fix the regression (it doesn't fix
the underlying problems with entries not becoming REACHABLE; which
maybe a day-1 problem). The workaround is to continue advertising
STALE neighbors if EVPN-MH is not enabled.

Ticket: CM-30303

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: handle "show evpn es-evi" a non-existent VNI
Anuradha Karuppiah [Tue, 23 Jun 2020 00:01:06 +0000 (17:01 -0700)]
zebra: handle "show evpn es-evi" a non-existent VNI

zebra was crashing when the command was run on a non-existent VNI.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@torm-12:mgmt:~# net show evpn es-evi vni 16777215
VNI 16777215 doesn't exist
root@torm-12:mgmt:~# net show evpn es-evi vni 16777215 detail
VNI 16777215 doesn't exist
root@torm-12:mgmt:~# net show evpn es-evi vni 16777215 json
[
]
root@torm-12:mgmt:~# net show evpn es-evi vni 16777215 detail json
[
]
root@torm-12:mgmt:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Ticket: CM-30232

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agobgpd: rename some MH functions and take care of deffered logs etc.
Anuradha Karuppiah [Thu, 28 May 2020 18:55:55 +0000 (11:55 -0700)]
bgpd: rename some MH functions and take care of deffered logs etc.

Rename VTEP change functions for better readability, improve comments
and add missing logs.

No functional change.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: avoid c++ reserved keyword 7777/head
Emanuele Di Pascale [Mon, 21 Dec 2020 12:17:09 +0000 (13:17 +0100)]
zebra: avoid c++ reserved keyword

in rib_handle_nhg_replace, do not use new as a parameter name to
allow compilation of c++ code including zebra headers.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agopathd: fix compile warning in path_cli 7776/head
Mark Stapp [Mon, 21 Dec 2020 13:06:32 +0000 (08:06 -0500)]
pathd: fix compile warning in path_cli

Use a big-enough buffer in path_cli.c to avoid a compiler
warning (with gcc 9, at least)

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7773 from GalaxyGorilla/clippy_clappy
Mark Stapp [Mon, 21 Dec 2020 13:13:50 +0000 (08:13 -0500)]
Merge pull request #7773 from GalaxyGorilla/clippy_clappy

pathd: un-guard clippy files

4 years agopathd: un-guard clippy files 7773/head
GalaxyGorilla [Sat, 19 Dec 2020 21:06:24 +0000 (21:06 +0000)]
pathd: un-guard clippy files

The relevant clippy machinery in python/makevars.py assumes to get
'raw' Makefile text containing all `clippy_scan` variables. If those
files in the `clippy_scan` variable are later on used in the
compilation process does not matter.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
4 years agoMerge pull request #7768 from donaldsharp/route_map_opt
Donatas Abraitis [Sat, 19 Dec 2020 13:02:15 +0000 (15:02 +0200)]
Merge pull request #7768 from donaldsharp/route_map_opt

Route map dependency fix

4 years agotests: dict_values are not lists in version 3 7758/head
Donald Sharp [Thu, 17 Dec 2020 19:04:21 +0000 (14:04 -0500)]
tests: dict_values are not lists in version 3

While accidently running the topotests with version 3
I keep getting:

TypeError: `dict_values` object does not support indexing..

version 2 of python dict.values() returns a list.
version 3 does not

Write some code to allow both to be handled.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7766 from deastoe/dplane-fpm-nl_optimisations
Donald Sharp [Fri, 18 Dec 2020 23:47:35 +0000 (18:47 -0500)]
Merge pull request #7766 from deastoe/dplane-fpm-nl_optimisations

dplane_fpm_nl optimisations

4 years agolib: Add a warning for when we are not operating correctly 7768/head
Donald Sharp [Fri, 18 Dec 2020 19:38:40 +0000 (14:38 -0500)]
lib: Add a warning for when we are not operating correctly

There exists a possibilty that route map dependencies
have gotten wrong.  Prevent the crash and warn the user
that we may be in trouble.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7351 from opensourcerouting/feature/pathd
Olivier Dugeon [Fri, 18 Dec 2020 19:28:22 +0000 (20:28 +0100)]
Merge pull request #7351 from opensourcerouting/feature/pathd

Add a new SR-TE policy management daemon and an optional PCEP module

4 years agolib: Fix dependency of match types in route-map code
Donald Sharp [Fri, 18 Dec 2020 19:22:09 +0000 (14:22 -0500)]
lib: Fix dependency of match types in route-map code

Route-maps contain a hash of hash's that contain the
container type name ( say community or access list or whatever )
and then it has a hash of route-maps that this maps too

Suppose you have this:

!
frr version 7.3.1
frr defaults traditional
hostname eva
log stdout
!
debug route-map
!
router bgp 239
 neighbor 192.168.161.2 remote-as external
 !
 address-family ipv4 unicast
  neighbor 192.168.161.2 route-map foo in
 exit-address-family
!
bgp community-list standard 7000:40002 permit 7000:40002
bgp community-list standard 7000:40002 permit 7000:40003
!
route-map foo deny 20
 match community 7000:40002
!
route-map foo permit 10
!
line vty
!
end

You have a community hash which has an

7000:40002 entry

This entry has a hash of routemaps that are referencing it.  In this above
example it would have `foo` as the single entry.

Given the above config if you do this:

eva# conf
eva(config)# route-map foo deny 20
eva(config-route-map)# match community 7000:4003
eva(config-route-map)#

We would expect the `7000:40002` community hash to no longer have
a reference to the `foo` routemap.  Instead we see the code doing this:

2020/12/18 13:47:12 BGP: bgpd 7.3.1 starting: vty@2605, bgp@<all>:179
2020/12/18 13:47:47 BGP: Add route-map foo
2020/12/18 13:47:47 BGP: Route-map foo add sequence 10, type: permit
2020/12/18 13:47:57 BGP: Route-map foo add sequence 20, type: deny
2020/12/18 13:48:05 BGP: Adding dependency for filter 7000:40002 in route-map foo
2020/12/18 13:48:05 BGP: route_map_print_dependency: Dependency for 7000:40002: foo
2020/12/18 13:48:41 BGP: bgp_update_receive: rcvd End-of-RIB for IPv4 Unicast from 192.168.161.2 in vrf default
2020/12/18 13:49:19 BGP: Deleting dependency for filter 7000:4003 in route-map foo
2020/12/18 13:49:19 BGP: Adding dependency for filter 7000:4003 in route-map foo
2020/12/18 13:49:19 BGP: route_map_print_dependency: Dependency for 7000:4003: foo

Note how the code attempts to remove the dependency for `7000:4003` instead of the
dependency for `7000:40002`.  Then we create a new hash for `7000:4003` and then
install the routemap name in it.

This is wrong.  We should remove the `7000:40002` dependency and then install
a dependency for `7000:4003`.

Fix the code to do the right thing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: Add some useful debugs to understand what is going on
Donald Sharp [Fri, 18 Dec 2020 03:25:27 +0000 (22:25 -0500)]
lib: Add some useful debugs to understand what is going on

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: arg can never be NULL
Donald Sharp [Fri, 18 Dec 2020 03:23:02 +0000 (22:23 -0500)]
lib: arg can never be NULL

Arg can never be null, get rid of an unneeded if statement

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: fix loop logic in dplane for extra intf info 7767/head
Mark Stapp [Fri, 18 Dec 2020 18:49:07 +0000 (13:49 -0500)]
zebra: fix loop logic in dplane for extra intf info

The way a couple of clauses were placed in a loop meant that
some info might not be collected - re-order things just a bit.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: derive rule family from src->dst->ipv4 7762/head
Stephen Worley [Thu, 17 Dec 2020 21:16:26 +0000 (16:16 -0500)]
zebra: derive rule family from src->dst->ipv4

Derive the rule family from src if available, otherwise
dst if available, otherwise assume ipv4. We only support
ipv4/ipv6 currently so it we cant tell from the src/dst
it must be ipv4 and likely a dsfield match.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
4 years agopathd: Add optional support for PCEP to pathd 7351/head
Sebastien Merle [Fri, 16 Oct 2020 14:55:51 +0000 (16:55 +0200)]
pathd: Add optional support for PCEP to pathd

This new dynamic module makes pathd behave as a PCC for dynamic candidate path
using the external library pcpelib https://github.com/volta-networks/pceplib .

The candidate paths defined as dynamic will trigger computation requests to the
configured PCE, and the PCE response will be used to update the policy.

It supports multiple PCE. The one with smaller precedence will be elected
as the master PCE, and only if the connection repeatedly fails, the PCC will
switch to another PCE.

Example of configuration:

segment-routing
 traffic-eng
  pcep
   pce-config CONF
    source-address ip 10.10.10.10
    sr-draft07
   !
   pce PCE1
    config CONF
    address ip 1.1.1.1
   !
   pce PCE2
    config CONF
    address ip 2.2.2.2
   !
   pcc
    peer PCE1 precedence 10
    peer PCE2 precedence 20
   !
  !
 !
!

Co-authored-by: Brady Johnson <brady@voltanet.io>
Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Co-authored-by: Javier Garcia <javier.garcia@voltanet.io>
Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
4 years agozebra: reduce atomic ops in fpm_process_queue() 7766/head
Duncan Eastoe [Fri, 18 Dec 2020 14:35:21 +0000 (14:35 +0000)]
zebra: reduce atomic ops in fpm_process_queue()

Maintain the count of contexts which have been processed in a local
variable, and perform a single atomic update after we have consumed
all queued contexts.

Generally this results in at least one less atomic operation per
context.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
4 years agozebra: local var in fpm_process_queue() sched cond
Duncan Eastoe [Fri, 18 Dec 2020 14:29:36 +0000 (14:29 +0000)]
zebra: local var in fpm_process_queue() sched cond

Don't use an atomic operation to determine whether fpm_process_queue()
needs to be re-scheduled. Instead we can simply use a local variable
to determine if we stopped processing because we ran out of buffers.

In the case where we would have re-scheduled due to new context objects
in the queue (enqueued after we stopped processing), fpm_nl_process()
will schedule us (or will have done already).

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
4 years agozebra: reduce atomic ops in fpm_nl_process()
Duncan Eastoe [Fri, 18 Dec 2020 14:21:18 +0000 (14:21 +0000)]
zebra: reduce atomic ops in fpm_nl_process()

Maintain the peak ctxqueue length in a local variable, and perform
a single atomic update after processing all contexts.

Generally this results in at least one less atomic operation per
context.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
4 years agopathd: New SR-TE policy management daemon
Sebastien Merle [Fri, 31 Jul 2020 16:04:20 +0000 (18:04 +0200)]
pathd: New SR-TE policy management daemon

This new daemon manages Segment-Routing Traffic-Engineering
(SR-TE) Policies and installs them into zebra. It provides
the usual yang support and vtysh commands to define or change
SR-TE Policies.

In a nutshell SR-TE Policies provide the possibility to steer
traffic through a (possibly dynamic) list of Segment Routing
segments to the endpoint of the policy. This list of segments
is part of a Candidate Path which again belongs to the SR-TE
Policy. SR-TE Policies are uniquely identified by their color
and endpoint. The color can be used to e.g. match BGP
communities on incoming traffic.

There can be multiple Candidate Paths for a single
policy, the active Candidate Path is chosen according to
certain conditions of which the most important is its
preference. Candidate Paths can be explicit (fixed list of
segments) or dynamic (list of segment comes from e.g. PCEP, see
below).

Configuration example:

segment-routing
 traffic-eng
  segment-list SL
   index 10 mpls label 1111
   index 20 mpls label 2222
  !
  policy color 4 endpoint 10.10.10.4
   name POL4
   binding-sid 104
   candidate-path preference 100 name exp explicit segment-list SL
   candidate-path preference 200 name dyn dynamic
  !
 !
!

There is an important connection between dynamic Candidate
Paths and the overall topic of Path Computation. Later on for
pathd a dynamic module will be introduced that is capable
of communicating via the PCEP protocol with a PCE (Path
Computation Element) which again is capable of calculating
paths according to its local TED (Traffic Engineering Database).
This dynamic module will be able to inject the mentioned
dynamic Candidate Paths into pathd based on calculated paths
from a PCE.

https://tools.ietf.org/html/draft-ietf-spring-segment-routing-policy-06

Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
4 years agozebra: reduce dplane_fpm_nl ctxqueue_mutex contention
Duncan Eastoe [Fri, 18 Dec 2020 14:04:45 +0000 (14:04 +0000)]
zebra: reduce dplane_fpm_nl ctxqueue_mutex contention

Reduce code in the critical sections of fpm_nl_process() and
fpm_process_queue() to the bare minimum - basically only enqueue
and dequeue operations on the shared ctxqueue.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
4 years agoMerge pull request #7760 from donaldsharp/DIE_IN_A_FIRE
Donatas Abraitis [Fri, 18 Dec 2020 09:26:10 +0000 (11:26 +0200)]
Merge pull request #7760 from donaldsharp/DIE_IN_A_FIRE

Die in a fire

4 years agobgpd: Remove awful test of strmatch + get_afi_safi_str 7760/head
Donald Sharp [Thu, 17 Dec 2020 21:49:20 +0000 (16:49 -0500)]
bgpd: Remove awful test of strmatch + get_afi_safi_str

Remove awful test of a strmatch against a call to get_afi_safi_str.
These are the easy ones as that the real decision point is/was
underneath this test.  This is just duplicate expensive testing.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Use the header
Donald Sharp [Thu, 17 Dec 2020 21:36:22 +0000 (16:36 -0500)]
bgpd: Use the header

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Somewhat optimize string returns
Donald Sharp [Thu, 17 Dec 2020 21:33:11 +0000 (16:33 -0500)]
bgpd: Somewhat optimize string returns

There is no need for a cascading series of if statements
for the afi.  Clean it up slightly

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7757 from donaldsharp/tests_unicode
Mark Stapp [Thu, 17 Dec 2020 21:23:17 +0000 (16:23 -0500)]
Merge pull request #7757 from donaldsharp/tests_unicode

tests: unicode to frr_unicode

4 years agopbrd: disallow ipv4/ipv6 mismatching in match src/dst
Stephen Worley [Thu, 17 Dec 2020 21:14:38 +0000 (16:14 -0500)]
pbrd: disallow ipv4/ipv6 mismatching in match src/dst

Disallow mismatching of ipv4/ipv6 matching in src/dst.
Doesn't make a lot of sense to allow this based on how
IP Headers work. The kernel does not allow it at all
obviously.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
4 years ago.git-blame-ignore-revs: update for tests reformat 7759/head
Quentin Young [Thu, 17 Dec 2020 20:33:21 +0000 (15:33 -0500)]
.git-blame-ignore-revs: update for tests reformat

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agotests: please follow the style guide
whitespace [Thu, 17 Dec 2020 20:32:11 +0000 (15:32 -0500)]
tests: please follow the style guide

thanks

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #7755 from mjstapp/fix_rnh_via_default
Donald Sharp [Thu, 17 Dec 2020 19:07:00 +0000 (14:07 -0500)]
Merge pull request #7755 from mjstapp/fix_rnh_via_default

zebra: nht resolve-via-default doesn't need force

4 years agotests: unicode to frr_unicode 7757/head
Donald Sharp [Thu, 17 Dec 2020 18:19:52 +0000 (13:19 -0500)]
tests: unicode to frr_unicode

Let's standardize on the internal to frr unicode function.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: nht resolve-via-default doesn't need force 7755/head
Mark Stapp [Thu, 17 Dec 2020 16:22:09 +0000 (11:22 -0500)]
zebra: nht resolve-via-default doesn't need force

We don't need to use the 'force' flag when processing the
resolve-via-default clis for ip and ipv6: we can just do normal
nht processing.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7744 from donaldsharp/end_configuration
Mark Stapp [Wed, 16 Dec 2020 18:47:24 +0000 (13:47 -0500)]
Merge pull request #7744 from donaldsharp/end_configuration

End configuration changes

4 years agoMerge pull request #7719 from mkoskar/patch-1
Mark Stapp [Wed, 16 Dec 2020 13:46:24 +0000 (08:46 -0500)]
Merge pull request #7719 from mkoskar/patch-1

doc: Remove duplicate word

4 years agodoc: Remove duplicate word 7719/head
Miroslav Koškár [Fri, 11 Dec 2020 10:53:17 +0000 (11:53 +0100)]
doc: Remove duplicate word

"FRR is currently currently implementing ..."

Signed-off-by: Miroslav Koškár <mk@mkoskar.com>
4 years agoMerge pull request #7739 from mobash-rasool/pim-fixes
Jafar Al-Gharaibeh [Tue, 15 Dec 2020 22:14:32 +0000 (16:14 -0600)]
Merge pull request #7739 from mobash-rasool/pim-fixes

pimd: correcting the  definition for  Mroute flag "R"

4 years agovtysh: When dry-running no need to start/end configuration 7744/head
Donald Sharp [Tue, 15 Dec 2020 19:45:23 +0000 (14:45 -0500)]
vtysh: When dry-running no need to start/end configuration

When doing a dry run don't send start/end configuration
commands.

Ticket: CM-32665
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib, vtysh: Modify start/end configuration commands to be more hidden
Donald Sharp [Tue, 15 Dec 2020 19:21:56 +0000 (14:21 -0500)]
lib, vtysh: Modify start/end configuration commands to be more hidden

There exists a world where some people have put `end` in their
configuration.  Then vtysh will command search for it and find
it and then bad things happen.

Ticket: CM-32665
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7634 from AnuradhaKaruppiah/df-fixes
Patrick Ruddy [Tue, 15 Dec 2020 18:17:51 +0000 (18:17 +0000)]
Merge pull request #7634 from AnuradhaKaruppiah/df-fixes

evpn-mh: DF fixes

4 years agozebra: add support for DF delay timer 7634/head
Anuradha Karuppiah [Sun, 14 Jun 2020 19:13:23 +0000 (12:13 -0700)]
zebra: add support for DF delay timer

When a new ES is created it is held in a non-DF state for 3 seconds
as specified by RFC7432. This allows the switch time to import
the Type-4 routes from the peers. And the peers time to rx the new
Type-4 route.

root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"|grep DF
 DF status: non-df
 DF delay: 00:00:01
 DF preference: 50000
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"|grep DF
 DF status: df
 DF preference: 50000
root@torm-11:mgmt:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: display DF status only for local ESs
Anuradha Karuppiah [Sun, 14 Jun 2020 13:51:58 +0000 (06:51 -0700)]
zebra: display DF status only for local ESs

For remote ESs it is not relevant and confuses the admin.

Local ES sample -
===============
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"
ESI: 03:44:38:39:ff:ff:01:00:00:01
 Type: Local,Remote
 Interface: hostbond1
 State: up
 Bridge port: yes
 Ready for BGP: yes
 VNI Count: 10
 MAC Count: 3
 DF: status: df preference: 50000 >>>>>>>>>>>>>>>
 Nexthop group: 536870913
 VTEPs:
     27.0.0.16 df_alg: preference df_pref: 32767 nh: 268435465
     27.0.0.17 df_alg: preference df_pref: 32767 nh: 268435466

root@torm-11:mgmt:~#

Remote ES sample -
===============
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:02:00:00:01"
ESI: 03:44:38:39:ff:ff:02:00:00:01
 Type: Remote
 Interface: -
 Ready for BGP: no
 VNI Count: 0
 MAC Count: 6
 DF: status: - preference: 0 >>>>>>>>>>>>>>>
 Nexthop group: 536870919
 VTEPs:
     27.0.0.18 nh: 268435464
     27.0.0.19 nh: 268435467
     27.0.0.20 nh: 268435461

root@torm-11:mgmt:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agoMerge pull request #7637 from AnuradhaKaruppiah/evpn-pim-fixes
Patrick Ruddy [Tue, 15 Dec 2020 17:36:24 +0000 (17:36 +0000)]
Merge pull request #7637 from AnuradhaKaruppiah/evpn-pim-fixes

evpn-pim: cleanup and display fixes

4 years agoMerge pull request #7636 from AnuradhaKaruppiah/type-0-esi
Patrick Ruddy [Tue, 15 Dec 2020 17:33:46 +0000 (17:33 +0000)]
Merge pull request #7636 from AnuradhaKaruppiah/type-0-esi

zebra: support for type-0 ESI

4 years agoMerge pull request #7633 from AnuradhaKaruppiah/protodown-fixes
Patrick Ruddy [Tue, 15 Dec 2020 17:23:32 +0000 (17:23 +0000)]
Merge pull request #7633 from AnuradhaKaruppiah/protodown-fixes

evpn-mh: protodown handling fixes

4 years agopimd: correcting the definition for Mroute flag "R" 7739/head
Mobashshera Rasool [Tue, 15 Dec 2020 12:36:34 +0000 (12:36 +0000)]
pimd: correcting the  definition for  Mroute flag "R"

The flag "R" in below display description denotes the
SGRpt Pruned but the description shows something else
hence correcting the definition.

R2(config)# do show ip mroute
IP Multicast Routing Table
Flags: S- Sparse, C - Connected, P - Pruned
R - RP-bit set, F - Register flag

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
4 years agoMerge pull request #7717 from ranjanyash54/2368
Russ White [Tue, 15 Dec 2020 12:29:10 +0000 (07:29 -0500)]
Merge pull request #7717 from ranjanyash54/2368

ospf6d: ospfv3 disable on the interface, but interface prefix still s…

4 years agoMerge pull request #7728 from mobash-rasool/pim-fixes
Russ White [Tue, 15 Dec 2020 12:22:06 +0000 (07:22 -0500)]
Merge pull request #7728 from mobash-rasool/pim-fixes

ospf6d: Link LSA is not updated when router priority is modified

4 years agoMerge pull request #7735 from ton31337/fix/move_to_options_bgp_master_extra_zebra_data
Russ White [Tue, 15 Dec 2020 12:14:17 +0000 (07:14 -0500)]
Merge pull request #7735 from ton31337/fix/move_to_options_bgp_master_extra_zebra_data

bgpd: Use bgp master flags for send extra data to zebra

4 years agoMerge pull request #7736 from ton31337/fix/s_addr_INADDR_ANY
Russ White [Tue, 15 Dec 2020 12:12:49 +0000 (07:12 -0500)]
Merge pull request #7736 from ton31337/fix/s_addr_INADDR_ANY

*: Replace s_addr check agains 0 with INADDR_ANY

4 years agoMerge pull request #7737 from mjstapp/fix_ospf_vty_ntoa
Russ White [Tue, 15 Dec 2020 12:11:00 +0000 (07:11 -0500)]
Merge pull request #7737 from mjstapp/fix_ospf_vty_ntoa

ospfd: avoid inet_ntoa

4 years agoospfd: avoid inet_ntoa 7737/head
Mark Stapp [Mon, 14 Dec 2020 22:01:18 +0000 (17:01 -0500)]
ospfd: avoid inet_ntoa

some recent commits re-introduced use of inet_ntoa() - fix
them.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years ago*: Replace s_addr check agains 0 with INADDR_ANY 7736/head
Donatas Abraitis [Mon, 14 Dec 2020 19:01:31 +0000 (21:01 +0200)]
*: Replace s_addr check agains 0 with INADDR_ANY

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #7162 from opensourcerouting/zebra-human-netlink
Stephen Worley [Mon, 14 Dec 2020 19:03:35 +0000 (14:03 -0500)]
Merge pull request #7162 from opensourcerouting/zebra-human-netlink

zebra: human readable netlink dumps

4 years agobgpd: Use bgp master flags for send extra data to zebra 7735/head
Donatas Abraitis [Mon, 14 Dec 2020 18:28:44 +0000 (20:28 +0200)]
bgpd: Use bgp master flags for send extra data to zebra

root@exit1-debian-9:~/frr# vtysh -c 'conf' -c 'bgp send-extra-data zebra'
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep send-extra
root@exit1-debian-9:~/frr# vtysh -c 'conf' -c 'no bgp send-extra-data zebra'
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep send-extra
no bgp send-extra-data zebra

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agozebra: restart start-up delay timer when the first uplink comes up 7633/head
Anuradha Karuppiah [Wed, 7 Oct 2020 20:09:50 +0000 (13:09 -0700)]
zebra: restart start-up delay timer when the first uplink comes up

When all the uplinks go down the VTEP is disconnected from the
VxLAN overlay and this was handled by proto-downing the ES bonds. When
the uplinks come up again we need to re-enable the ES bonds but that
needs to be done after a delay to allow the EVPN network to converge.

And that is done by firing off the startup-delay timer on first
uplink-up.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: re-sync protodown state with the dplane on new ES add
Anuradha Karuppiah [Mon, 15 Jun 2020 14:41:47 +0000 (07:41 -0700)]
zebra: re-sync protodown state with the dplane on new ES add

1. When a bond is associated with an ES we may need to re-sync
the dplane protodown state (which maybe stale/set by some other
app).
2. Also change the uplink state display to avoid confusion with
protodown reason code (both used to show uplink-up).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agozebra: update protodown display
Anuradha Karuppiah [Sun, 14 Jun 2020 14:31:45 +0000 (07:31 -0700)]
zebra: update protodown display

protodown state is a combination of the dplane and zebra states.
protodown reason is maintained exclusively by zebra. Display this
information on two separate lines to make that ownership clearer.

Also display n/a for bonds as the dplane doesn't support protodowning
the bond device.

Sample output -
==============
root@torm-11:mgmt:~# vtysh -c "show interface hostbond1"|grep -i protodown
  protodown: off (n/a)
  protodown reasons: (uplinks-down)
root@torm-11:mgmt:~# vtysh -c "show interface swp5"|grep -i protodown
  protodown: on
  protodown reasons: (uplinks-down)
root@torm-11:mgmt:~#

PS: Cosmetic changes only, no functional change.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>