Commit Graph

22 Commits

Author SHA1 Message Date
Rastislav Szabo d3a46b8e1f Fix SRv6 prefix SID unmarshalling
During SRv6 prefix SID unmarshalling, wrong Path Attribute
length was applied (4B instead of 3B). This was causing
a 1 byte difference in PA length after marshalling & unmarshalling.

Signed-off-by: Rastislav Szabo <rastislav.szabo@isovalent.com>
2023-08-03 11:27:58 +09:00
menetelk0 7109696696 Updating support of L2VPN VPLS address family (AFI 25, SAFI 65) 2023-04-25 01:21:40 +03:00
Yuya Kusakabe 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
Donatas Abraitis 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 <donatas@opensourcerouting.org>
2023-01-31 23:09:24 +09:00
yas-nyan 033cfdb4be add Extract for LsBgpPeerSegmentSID
Co-authored-by: watal <watal.i27e@gmail.com>
2023-01-10 21:19:50 +09:00
yas-nyan 18b04d20e6 Marshal and Unmarshal BgpPeerSegmentSID 2023-01-10 21:19:50 +09:00
watal 7651e60a41 Add NewLsAttributeTLVs functions
Co-authored-by: yas-nyan <yas-nyan@sfc.wide.ad.jp>
Co-authored-by: kanaya516 <abcs516tk1@gmail.com>
2023-01-10 14:59:17 +09:00
watal 5b9a306809 Add BGP-LS gRPC
Co-authored-by: yas-nyan <yas-nyan@sfc.wide.ad.jp>
Co-authored-by: kanaya516 <abcs516tk1@gmail.com>
2023-01-09 19:46:05 +09:00
kanaya516 d1cd6b300a BGP-Confederation for BGP-LS EPE 2023-01-08 06:19:19 +00:00
kanaya516 70f4e8a566 add BGP-LS EPE 2022-12-28 15:22:45 +00:00
cpmarvin b2be005d39 Correct value of bsid in grpc list path 2022-11-23 09:12:53 +09:00
Yuya Kusakabe bb6fd19889 mup: fix decode/serialize prefix in Interwork Segment Discovery Route 2022-10-29 07:31:30 +09:00
Yuya Kusakabe 30b95991ad pkg/packet/bgp: refactor Prefix-SID
- Add TLVType contant values.
- Add NewPathAttributePrefixSID().
- Add SRv6ServiceTLV to support SRv6 L2 Service TLV.
- Move reserved field handling to each type of TLV,
  because header and reserved field size are different for each type.
  For more details, see https://www.rfc-editor.org/rfc/rfc8669.html
  and https://www.rfc-editor.org/rfc/rfc9252.html.
2022-10-16 16:42:59 +09:00
Yuya Kusakabe 0a18fce70d Fix typo in SRv6 SID Structure Sub-Sub-TLV
See https://www.rfc-editor.org/rfc/rfc9252.html#section-3.2.1
2022-10-16 16:42:59 +09:00
Yuya Kusakabe 975db96b86 mup: handle Type 1 ST Route Prefix as Prefix instead of single address
See https://www.ietf.org/archive/id/draft-mpmz-bess-mup-safi-01.html#name-bgp-type-1-session-transfor for details.
2022-09-28 11:38:26 +09:00
Yuya Kusakabe 438f2460b3 cli: initial support for BGP-MUP SAFI and Extended Community 2022-08-31 12:26:42 +09:00
FUJITA Tomonori 229d11635e clean up FQDNCapability message
- we don't need hostlen and domainlen.
- use camel case.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2022-01-16 23:45:44 +00:00
night 030274eb86 Fix spelling of LinkBandwidth 2021-12-12 04:59:26 +00:00
FUJITA Tomonori 6fc43b1114 proto: avoid global enum definitions when possible
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2021-12-11 10:13:12 +00:00
FUJITA Tomonori 6eeabdf01b proto: replace 'as' with 'asn'
For consistency, always use 'asn' instead of 'as', 'as_number', etc.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2021-12-11 01:36:20 +00:00
FUJITA Tomonori 24ae33b208 proto: define AsSegment Type enum
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2021-12-10 13:26:22 +00:00
Jakub Chábek 42117d3909 Make iternal/pkg/apiutil public under pkg/apiutil 2021-12-08 17:51:24 +01:00