244 Commits
Author SHA1 Message Date
FUJITA Tomonori a74149f9ef v3.26.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2024-05-01 07:59:46 +09:00
Maxime PeimandFUJITA Tomonori 9fbc03765a send-max: respect configuration 2024-04-29 17:29:42 +09:00
TuetuopayandFUJITA Tomonori bbde806641 evpn: fix quadratic mac-mobility handling for gRPC routes
The gRPC code paths uses different functions than the BGP code path.
Thus is did not receive the fix for the mac mobility handling.

Fixes: c393f43 ("evpn: fix quadratic evpn mac-mobility handling")
2024-04-29 17:25:29 +09:00
wenovusandFUJITA Tomonori 7ef2f0bb82 Add CommunityCount BGP Policy Condition
This is intended to have the same behaviour as [these OpenConfig paths](https://openconfig.net/projects/models/schemadocs/yangdoc/openconfig-routing-policy.html#routing-policy-policy-definitions-policy-definition-statements-statement-conditions-bgp-conditions-community-count):
* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/bgp-conditions/community-count/config/operator
* /routing-policy/policy-definitions/policy-definition/statements/statement/conditions/bgp-conditions/community-count/config/value
2024-04-11 07:48:16 +09:00
FUJITA Tomonori 7fed268caf v3.25.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2024-04-04 08:26:35 +09:00
Rinat BaygildinandFUJITA Tomonori ed87360952 Add EOR type to Table's filter on Watch method
Signed-off-by: Rinat Baygildin <[email protected]>
2024-03-20 08:45:34 +00:00
FUJITA Tomonori 9d05544d1e Revert "Add EOR type to Table's filter on Watch method"
This reverts commit aff055b44d.

This breaks WatchEvent API:
https://github.com/osrg/gobgp/issues/2777
2024-03-05 07:42:25 +00:00
FUJITA Tomonori d67f568150 v3.24.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2024-03-02 09:49:28 +00:00
Rinat BaygildinandFUJITA Tomonori aff055b44d Add EOR type to Table's filter on Watch method
Signed-off-by: Rinat Baygildin <[email protected]>
2024-03-02 08:35:54 +00:00
Britton PayneandFUJITA Tomonori 34e4845765 Adjust size of packing slice before allocating
- Changes table.(*packerV4).pack.func1 (split) to adjust the max
  parameter before using it to allocate slice size.  Previously the full
  max size was allocated then max was (possibly) truncated before
  further use.
2024-03-02 07:48:16 +00:00
Dawn MinionandFUJITA Tomonori 003745affe logs: Guard frequently called logs behind if check
Moves a number of heavily called debug lines behind if checks to avoid
needless allocations of Fields objects and stringification of fields.
For cases where the server is not set to "debug" log level, these fields
were allocated on the heap and then immediately discarded - as well a
number of these were stringifying state / NLRIs regardless of log level.

In servers with significant amounts of routes and BGP peers, this lead
to a large amount of wasted allocations - in our case looking at Go's
memory profiler, 25% of all allocations were from these lines alone.
2024-03-02 06:12:45 +00:00
FUJITA Tomonori 8fdda5dd2d v3.23.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2024-02-01 08:00:14 +09:00
FUJITA Tomonori 2558b5a069 v3.22.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2024-01-03 22:58:24 +09:00
Tuetuopay c393f4382c evpn: fix quadratic evpn mac-mobility handling
This patch adds a special case in the destination hashmap for EVPN
Type-2 routes, to index them by MAC address. This allows for direct
access to the destination struct, instead of iterating over all
destination and all paths.

In effect, this replaces an iteration over all known paths by a quick
lookup to the MAC, leaving only an iteration to multiple paths to the
same MAC (e.g. multihoming or through multiple VNIs).

The practical effect is a reasonable convergence time for large EVPN
instances.

- before: 6m 7s
- after: 11s

The comparison was performed on a Xeon Silver 4209T, and an EVPN
instance comprising of 13k EVPN type-2 routes. The time is measured
by comparing the timestamp of the first and the last routes logged by
the cli's monitor mode.

Given the extreme difference, no further work was done for a more
accurate measurment.
2023-12-17 01:20:00 +01:00
Yuya Kusakabe 270ee41d9a mup: add Source Address to Type 1 ST Route
This patch adds Source Address to Type 1 ST Route as defined in draft-mpmz-bess-mup-safi-03.
See https://datatracker.ietf.org/doc/html/draft-mpmz-bess-mup-safi-03#section-3.1.3
2023-12-15 15:24:24 +09:00
FUJITA Tomonori 95cf2c10c5 v3.21.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-12-01 14:04:43 +09:00
Jeremiah Millay 16412bfc03 Add replace option to AddDefinedSet rpc 2023-11-10 13:35:24 -05:00
FUJITA Tomonori 66e8f5c592 v3.20.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-11-01 07:48:52 +09:00
wenovusandFUJITA Tomonori 7a77f281c5 Export zebra package to /pkg/zebra 2023-10-31 22:42:13 +09:00
FUJITA Tomonori ed5732bb6e v3.19.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-10-01 07:47:23 +09:00
wenovusandFUJITA Tomonori aa0cf39f37 Export Generated BGP Configuration Code
Move internal/pkg/config -> pkg/config/oc

Background: #2593
2023-09-30 09:53:37 +09:00
Arjun Singh 60bcfc20f2 [Fuzzing] fuzzing support for oss-fuzz
Signed-off-by: Arjun Singh <[email protected]>
2023-09-19 20:39:25 +05:30
Rodrigo Peña b6be999f90 Fix crash on ListPathRequest with malformed prefix
When ListPathRequest is done by a gRPC client including a malformed prefix,
 the server would crash an invalid memory address reference.

This commit fixes the crash by checking whether the parseCIDR method returned
an error.
2023-09-07 10:50:37 -03:00
Kirill PletnevandKirill 'horseinthesky' Pletnev 35bfc9605c CLI VPNv4/VPNv6 filtering
gobgp CLI can filter VPNv4/VPNv6 prefixes with or without rd.
2023-09-06 11:14:47 +03:00
Kirill PletnevandKirill 'horseinthesky' Pletnev 002690b848 ListPath can filter VPNv4/v6 routes
ListPath gRPC endpoint can filter VPNv4/VPNv6 prefixes. All lookup options are supported.
2023-09-06 11:11:35 +03:00
FUJITA Tomonori 2956dd655f v3.18.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-09-02 21:22:08 +09:00
Hitoshi Irino 5f01c74a5b Accommodate FRRouting interfaceNameSize changes 2023-08-16 15:34:21 +09:00
FUJITA Tomonori cc8ee20892 v3.17.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-08-01 14:36:21 +09:00
Maxime PeimandFUJITA Tomonori e7534de3d2 use TCP MSS configuration 2023-07-25 12:46:48 +09:00
FUJITA Tomonori 78e9380375 v3.16.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-07-01 10:41:54 +09:00
Jeremiah Millay 79d301f75b Fix UpdatePathAggregator4ByteAs() ignores 32bit value
Signed-off-by: Jeremiah Millay <[email protected]>
2023-06-12 17:19:09 -04:00
FUJITA Tomonori d8306e9bb3 v3.15.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-06-04 08:37:17 +09:00
Rastislav Szabo 987c1794d5 Allow non-disruptive changes of TTL in UpdatePeer
Signed-off-by: Rastislav Szabo <[email protected]>
2023-05-26 09:59:47 +02:00
harsimran pabla 5719c6d2ed graceful-restart: expose peer graceful restart state via API
Exposing PeerRestartTime and PeerRestarting info in
config.NewPeerFromConfigStruct.

Signed-off-by: harsimran pabla <[email protected]>
2023-05-25 11:56:27 -04:00
Rastislav Szabo 9cff3f4145 Allow EbgpMultihop change in UpdatePeer
Signed-off-by: Rastislav Szabo <[email protected]>
2023-05-22 12:41:26 +02:00
FUJITA Tomonori 2fbfee5f27 v3.14.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-05-01 15:15:38 +09:00
Vladimir KikhtenkoandFUJITA Tomonori bab5b30693 move metrics to internal 2023-04-01 21:55:38 +09:00
FUJITA Tomonori 58d96f3b11 v3.13.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-04-01 12:02:08 +09:00
Pavel Odintsov 22ffdc10a6 Added logic to show local ASN and local BGP peering address for gobgp neighbor command 2023-03-31 15:02:48 +01:00
Yuya Kusakabe b1ed1f1795 cli,mup: fix prefix and route type handling 2023-03-26 12:15:00 +09:00
Yuya KusakabeandFUJITA Tomonori cbd1d66d8b mup: fix TEID processing in Type 1/2 ST Route
Fix TEID processing in Type 2 ST Route:
- TEID can be 0-32 bits value as described in I-D.

Accept hex and IPv4 format for TEID in CLI and show TEID as IPv4 format in CLI.
- TEID is generally represented in hexadecimal format.
- IPv4 format is useful because Type 2 ST Route can be used in the longest match algorithm as described in I-D.
2023-03-23 16:19:33 +09:00
FUJITA Tomonori 98442f6786 v3.12.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-03-01 21:32:03 +09:00
FUJITA Tomonori e53d53191b v3.11.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-02-01 08:10:44 +09:00
Donatas AbraitisandFUJITA Tomonori c556ca4f8d Add SoftwareVersion capability
https://datatracker.ietf.org/doc/html/draft-abraitis-bgp-version-capability

Working example with FRR
```
% ./gobgp neighbor 192.168.10.124
BGP neighbor is 192.168.10.124, remote AS 65001
  BGP version 4, remote router ID 200.200.200.202
  BGP state = ESTABLISHED, up for 00:01:14
  BGP OutQ = 0, Flops = 0
  Hold time is 3, keepalive interval is 1 seconds
  Configured hold time is 90, keepalive interval is 30 seconds

  Neighbor capabilities:
    multiprotocol:
        ipv6-unicast:	advertised
        ipv4-unicast:	advertised and received
    route-refresh:	advertised and received
    extended-nexthop:	advertised
        Local:  nlri: ipv4-unicast, nexthop: ipv6
    UnknownCapability(6):	received
    UnknownCapability(9):	received
    graceful-restart:	advertised and received
        Local: restart time 10 sec
	    ipv6-unicast
	    ipv4-unicast
        Remote: restart time 120 sec, notification flag set
	    ipv4-unicast, forward flag set
    4-octet-as:	advertised and received
    add-path:	received
      Remote:
         ipv4-unicast:	receive
    enhanced-route-refresh:	received
    long-lived-graceful-restart:	advertised and received
        Local:
	    ipv6-unicast, restart time 10 sec
	    ipv4-unicast, restart time 20 sec
        Remote:
	    ipv4-unicast, restart time 0 sec, forward flag set
    fqdn:	advertised and received
      Local:
         name: donatas-pc, domain:
      Remote:
         name: spine1-debian-11, domain:
    software-version:	advertised and received
      Local:
         GoBGP/3.10.0
      Remote:
         FRRouting/8.5-dev-MyOwnFRRVersion-gdc92f44a4
    cisco-route-refresh:	received
  Message statistics:
```

FRR side:

```
root@spine1-debian-11:~# vtysh -c 'show bgp neighbor 192.168.10.17 json' | \
> jq '."192.168.10.17".neighborCapabilities.softwareVersion.receivedSoftwareVersion'
"GoBGP/3.10.0"
root@spine1-debian-11:~#
```

Signed-off-by: Donatas Abraitis <[email protected]>
2023-01-31 23:09:24 +09:00
liangrq 9026872ab3 evpn type2 use in graceful restart crash
Gobgp will crash when use evpn type2 sync in graceful restart and peer(crash or out by kill -9/reboot)
2023-01-04 12:06:26 +08:00
FUJITA Tomonori e32b28f77b v3.10.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2023-01-01 11:52:28 +09:00
FUJITA Tomonori 9b49d2f6c1 v3.9.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2022-12-03 10:55:27 +09:00
Yuya Kusakabe dc328dccf6 cli,mup: add support for filtering MUP routes with route type 2022-11-28 09:02:54 +09:00
FUJITA Tomonori e2161ac8f8 v3.8.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2022-11-02 08:44:56 +09:00
FUJITA Tomonori da00912b2f v3.7.0
Signed-off-by: FUJITA Tomonori <[email protected]>
2022-10-01 12:00:43 +09:00