Commit Graph

23768 Commits

Author SHA1 Message Date
Donatas Abraitis
65c0fc12b6 doc: Add show [ip] bgp peer-group [json] command
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-03-14 19:25:02 +02:00
Donatas Abraitis
6f4eacf315 bgpd: Add JSON output for show ip bgp peer-group command
```
exit1-debian-9# show bgp peer-group

BGP peer-group test, remote AS 123
  Peer-group type is external
  Configured address-families: IPv4 Unicast; IPv6 Unicast;
  1 IPv4 listen range(s)
    192.168.100.0/24
  2 IPv6 listen range(s)
    2001:db8:1::/64
    2001:db8:2::/64
  Peer-group members:
    192.168.200.1  Active
    2001:db8::1  Active

BGP peer-group test3
  Peer-group type is external
  Configured address-families: IPv4 Unicast;
exit1-debian-9#
exit1-debian-9# show bgp peer-group json
{
  "test":{
    "remoteAs":123,
    "type":"external",
    "addressFamiliesConfigured":[
      "IPv4 Unicast",
      "IPv6 Unicast"
    ],
    "dynamicRanges":{
      "IPv4":{
        "count":1,
        "ranges":[
          "192.168.100.0\/24"
        ]
      },
      "IPv6":{
        "count":2,
        "ranges":[
          "2001:db8:1::\/64",
          "2001:db8:2::\/64"
        ]
      }
    },
    "members":{
      "192.168.200.1":{
        "status":"Active"
      },
      "2001:db8::1":{
        "status":"Active"
      }
    }
  },
  "test3":{
    "type":"external",
    "addressFamiliesConfigured":[
      "IPv4 Unicast"
    ]
  }
}
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-03-14 19:25:02 +02:00
Rafael Zalamena
e12114f2f7 doc: update the FRR format table
Let other developers know that we have `%pIA` to print `struct ipaddr *`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-14 14:07:52 -03:00
Rafael Zalamena
2dd0dde70d bgpd: fix wrong debug format
Use `%pIA` instead of `%pI4` for `struct ipaddr *`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-14 14:07:52 -03:00
Igor Ryzhov
e319ed4c49
Merge pull request #8244 from opensourcerouting/ci-fix-tests
topotests: fix some recent test failures
2021-03-14 20:05:26 +03:00
Rafael Zalamena
5b2906f4b4 topotests: temporary disable test assert
The test has been failing often recently and it is causing some false
positives for unrelated PRs.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-14 10:15:20 -03:00
Rafael Zalamena
296951b598 topotests: remove some interface index check
Don't expect the interface index to be always the same.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-12 17:33:23 -03:00
Rafael Zalamena
0085000b9e topotests: remove some FRR version checks
We version the tests with the source code so we should no longer attempt
to support old versions in development branch.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-03-12 17:32:12 -03:00
Olivier Dugeon
e81f3c69b3
Merge pull request #8085 from volta-networks/isis_label_blocks
isisd: configure SRGB and SRLB together
2021-03-12 18:26:36 +01:00
Olivier Dugeon
7c760bb60d
Merge pull request #7827 from GalaxyGorilla/ospf_sr_topotests
tests: enhance OSPF SR topotests
2021-03-12 17:36:07 +01:00
Igor Ryzhov
c9912e0ceb
Merge pull request #8241 from Jafaral/first_p 2021-03-12 10:21:20 +03:00
Jafar Al-Gharaibeh
d532dd6d6a Revert "zebra: Remove first_p which is never used"
This reverts commit 8617eb7c5f.
2021-03-12 01:02:25 -06:00
Jafar Al-Gharaibeh
c0290e0b62
Merge pull request #8239 from donaldsharp/first_p
zebra: Remove `first_p` which is never used
2021-03-11 23:20:39 -06:00
Donald Sharp
8617eb7c5f zebra: Remove first_p which is never used
Remove dead code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-11 21:22:53 -05:00
Jafar Al-Gharaibeh
b65540e99a
Merge pull request #8223 from mjstapp/fix_pim_nb_sa
pimd: fix coverity SA warning in pim_nb_config.c
2021-03-11 10:27:32 -06:00
Mark Stapp
6ff2514b41
Merge pull request #8124 from pguibert6WIND/ipsec_iptable_dplane
zebra: move netfilter contexts to zebra dplane
2021-03-10 16:43:15 -05:00
Quentin Young
20a92a97c2
Merge pull request #8177 from Jafaral/nhrp-ev-handler 2021-03-10 16:35:55 -05:00
Mark Stapp
48c677ff2c
Merge pull request #8227 from donaldsharp/flex_this
Start work to switch over to using our now built-in printf functionality
2021-03-10 12:49:27 -05:00
Jafar Al-Gharaibeh
fe67f1f929 tools: add explicit licence phrase
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2021-03-10 11:31:25 -06:00
Joe Maimon
f725df0fae tools: example bash script client for the nhrpd event sock
Signed-off-by: Joe Maimon <jmaimon@jmaimon.com>
2021-03-10 11:31:25 -06:00
Joe Maimon
f0a717ce2a nhrp: enables the event system to interpret client results correctly
Signed-off-by: Joe Maimon <jmaimon@jmaimon.com>
2021-03-10 11:31:25 -06:00
Philippe Guibert
ef524230a6 zebra: move ipset and ipset_entry to zebra dplane contexts
like it has been done for iptable contexts, a zebra dplane context is
created for each ipset/ipset entry event. The zebra_dplane_ctx job is
then enqueued and processed by separate thread. Like it has been done
for zebra_pbr_iptable context, the ipset and ipset entry contexts are
encapsulated into an union of structures in zebra_dplane_ctx.

There is a specificity in that when storing ipset_entry structure, there
was a backpointer pointer to the ipset structure that is necessary
to get some complementary information before calling the hook. The
proposal is to use an ipset_entry_info structure next to the ipset_entry,
in the zebra_dplane context. That information is used for ipset_entry
processing. The ipset name and the ipset type are the only fields
 necessary.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-03-10 14:57:32 +01:00
Donald Sharp
b6c4848171 nhrpd: Use our built-in printf functionality
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-10 07:25:49 -05:00
GalaxyGorilla
17128dea27 tests: Replace ospf-sr-topo1 by ospf-sr-topo2
The new ospf-sr-topo2 tests are much broader and detailed,
hence it makes no sense to keep the old ospf-sr-topo1
tests.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-03-10 10:37:58 +00:00
Rafael Zalamena
1b2e093817
Merge pull request #8224 from idryzhov/fix-bfd-detect-to
bfdd: fix detect timeout
2021-03-10 10:27:00 +00:00
GalaxyGorilla
9dd6fc9ded tests: OSPF SR topotests (ospf-sr-topo2)
Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2021-03-10 10:14:38 +00:00
Emanuele Di Pascale
01d431418b isisd, yang, doc: combine config cmd for SRGB+SRLB
when changing both ranges at the same time the order of the commands
matters, as we need to make sure that the intermediate state is valid.
This represents a problem when pushing configuration via frr-reload.
To fix this, the global-block command was extended to optionally
allow setting the local-block range as well. The local-block command
is deprecated with a 1-year notice.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-03-10 11:02:30 +01:00
Donatas Abraitis
5e6f90eec5
Merge pull request #8221 from mjstapp/fix_thread_xref_event
lib: use correct type in add_event xref
2021-03-10 11:04:41 +02:00
Donald Sharp
2e2262fe14 ripd: Convert to using internal printf formatters
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-09 20:07:20 -05:00
Donald Sharp
0490a45f7c ripngd: Convet to using internal printf modifiers
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-09 20:04:26 -05:00
Donald Sharp
957cfa2466 watchfrr: Convert to not use warning in warning messages
We do not need to display: `Warning: ...` in a zlog_warn
message

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-09 20:02:26 -05:00
Donald Sharp
c067e23e54 ospfd: Convert to using proper string formatting
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-09 20:00:45 -05:00
Donald Sharp
c0d72166ee bgpd: Convert remaining string output to our internal types
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-09 19:50:42 -05:00
Ameya Dharkar
acd1d9bc43 bgpd: Reevaluate es_evi_vtep active state on disable-ead-evi-rx config flap
Update es_evi_vtep active state and add/delete es_vtep accordingly to
zebra for remote ES.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2021-03-09 16:37:52 -08:00
Igor Ryzhov
1e9bae0331 bfdd: fix detect timeout
RFC 5880 Section 6.8.4:

In Asynchronous mode, the Detection Time calculated in the local
system is equal to the value of Detect Mult received from the remote
system, multiplied by the agreed transmit interval of the remote
system (the greater of bfd.RequiredMinRxInterval and the last
received Desired Min TX Interval).

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-09 23:08:41 +03:00
Mark Stapp
5bbfea53fc pimd: fix coverity SA warning in pim_nb_config.c
Fix a coverity warning.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-09 14:36:58 -05:00
Mark Stapp
44a5e50763 lib: use correct type in add_event xref
the add_event api xref should use THREAD_EVENT, rather than
THREAD_TIMER.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-09 13:41:58 -05:00
Mark Stapp
b58b399c5b
Merge pull request #8217 from Orange-OpenSource/ospf_sr
ospfd: Correct Segment Routing prefix bugs
2021-03-09 12:23:33 -05:00
Rafael Zalamena
b4551be579
Merge pull request #8219 from mjstapp/fix_babel_doc_dup
doc: remove duplicate entry from babeld doc
2021-03-09 17:20:25 +00:00
Russ White
7c7e4db935
Merge pull request #8123 from gromit1811/fix_topotest_ipv6_linklocal
tests: Fix determination of IPv6 link-local addresses
2021-03-09 11:25:10 -05:00
Mark Stapp
6af96fa383 bgpd: handle socket read errors in the main pthread
Add a handler for socket errors that runs in the main pthread,
rather than the io pthread. When the io pthread encounters a
read error, capture the error and schedule a task for the main
pthread.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-09 11:13:41 -05:00
Russ White
846706b0e1
Merge pull request #8138 from ckishimo/ospfv3_prefix
ospf6d: fix LSA prefix options
2021-03-09 10:56:54 -05:00
Russ White
955ee648f4
Merge pull request #8158 from idryzhov/staticd-fix-blackhole
staticd: forbid blackhole and non-blackhole nexthops in a single route
2021-03-09 09:35:37 -05:00
Mark Stapp
85019e502b doc: remove duplicate entry from babeld doc
Remove a duplicated entry from the babeld doc.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2021-03-09 08:37:47 -05:00
Russ White
da0a277fae
Merge pull request #6807 from opensourcerouting/xref-extract
xrefs extraction tool
2021-03-09 07:58:43 -05:00
David Lamparter
6adedc6fe3
Merge pull request #8176 from LabNConsulting/chopps/fix-locale-fail
tests: Sort expected and actual to avoid locale issues
2021-03-09 12:34:38 +01:00
Olivier Dugeon
270e66a2ce ospfd: Correct Segment Routing prefix bugs
This patch solves 2 Segment Routing prefix bugs:

- If Segment Routing is not enabled in the initial configuration, Extended
  Prefix Opaque LSA is not flood. This is due to a control flag which is
  set only when Segment Routing is enabled at startup and not latter.
- Attempting to modify Segment Routing prefix flag e.g. adding or removing
  no-php or explicit-null flag, doesn't work as expected: Corresponding entry
  in the MPLS table is not updated, Extended Prefix Opaque LSA carry wrong flag
  value, and neighbor set a wrong configuration in the MPLS table for this
  Segment Routing prefix.

The first bug is corrected in ospfd/ospf_ext.c:

- Flag setting is moved from ospf_ext_ism_change() to set_ext_prefix() function

The seconf one is corrected in ospfd/ospf_sr.c:

- For self node, previous MPLS entry is removed if needed and flag reset before
  setting the new Segment Routing prefix configuration
- For neighbor node, srnext field of sr_prefix structure is always set and not
  only for new SR Prefix.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-03-09 11:14:32 +01:00
Chirag Shah
641b032e23 tools: frr-reload capture vtysh msg upon failure
Log vtysh message for a failed command.

Ticket:2556706
Reviewed By:
Testing Done:

frr reload fails to delete default bgp instance in presence of bgp vrf
instance(s), it captures vtysh message and logs in frr-reload.log

logs backend
2021-03-05 05:16:45,623  INFO: Failed to execute no router bgp 5544
2021-03-05 05:16:45,735  INFO: Failed to execute no router bgp
2021-03-05 05:16:45,846  INFO: Failed to execute no router
2021-03-05 05:16:45,846 ERROR: "no router" we failed to remove this
command
2021-03-05 05:16:45,847 ERROR: % Cannot delete default BGP instance.
Dependent VRF instances exist

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-03-08 12:02:08 -08:00
Chirag Shah
f26070fc07 tools: Mark reload failure when no form cli fails
if no form of the cli fails to execute, mark frr-reload
as failure so return code can be nonzero.
The similar approach is done for non no-form (add case) of the cli.

Ticket:CM-33345
Reviewed By:CCR-11287
Testing Done:

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-03-08 11:58:29 -08:00
Donatas Abraitis
f79d311b3e
Merge pull request #8180 from kuldeepkash/topojson_framework
tests: Improve error/assert message logging
2021-03-08 09:32:09 +02:00