This patch adds an 'identifier %d' option to the route add / del
CLI. This is helpful for testing add-paths capabilities in vpv46
contexts.
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
default-gateway not being declared a reserved keyword led to evpn
macadv commands ending as "encap vxlan default-gateway" to fail parsing.
In that case, default-gateway was bundled with the previous argument.
To fix that, set default-gateway as a reserved keyword of paramFlag type.
While there, change the way we detect its existence later on, given that it now
exists in our reserved map m, if set.
esi-label follows the format:
[esi-label <esi-label> [single-active | all-active]]
extractReserved() splits by spaces, returning a list for esi-label, hence
failing the type check.
Change its parameter value type to paramList to be able to accomodate cases
such as "... esi-label 400 single-active".
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.
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 <donatas@opensourcerouting.org>
gobgp is tightly coupled with logrus and uses the global logrus logger
instance. The uses of gobgp library can't use other logging libraries.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
seems that sticking to Go API v1 for protobuf is headache for projects
using GoBGP.
This breaks the compatibility so bumps up the major version to 3.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>