1
0
mirror of https://github.com/osrg/gobgp.git synced 2024-05-11 05:55:10 +00:00

240 Commits

Author SHA1 Message Date
7a77f281c5 Export zebra package to /pkg/zebra 2023-10-31 22:42:13 +09:00
f4362280c8 Fix systemd service reload command 2023-10-24 18:49:40 +09:00
aa0cf39f37 Export Generated BGP Configuration Code
Move internal/pkg/config -> pkg/config/oc

Background: #2593
2023-09-30 09:53:37 +09:00
d2865042cb pyang_plugins: add MUP SAFI to YANG definition 2023-02-21 13:41:55 +09:00
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
c1ad22fbc7 update protoc-gen-go version 2022-12-28 15:22:50 +00:00
9d89241c47 pkg/packet/bgp: initial support for BGP VPLS
This includes BGP VPLS NLRI and extended community. There is no CLI/API
support yet. Also, VPLS AFI/SAFI is shared with RFC 6074 which says:

> Both BGP-AD and VPLS-BGP [RFC4761] use the same AFI/SAFI.  In order
> for both BGP-AD and VPLS-BGP to co-exist, the NLRI length must be
> used as a demultiplexer.
>
> The BGP-AD NLRI has an NLRI length of 12 bytes, containing only an
> 8-byte RD and a 4-byte VSI-ID.  VPLS-BGP [RFC4761] uses a 17-byte
> NLRI length.  Therefore, implementations of BGP-AD must ignore NLRI
> that are greater than 12 bytes.

This is not handled in this PR.

The generic transitive experimental extended community types are shared
with FlowSpec. The parsing is extended to handle VPLS as well, but not
other L2 encapsulations.

Fix #2590
2022-11-02 17:53:48 +09:00
9d20f2f03f tools/spell-check: add teid to dictionary 2022-08-31 12:38:13 +09:00
b68cebc5aa Add keywords (e.g., blackhole, srte) in ignore.txt 2022-05-04 08:14:44 +00:00
157a7689e1 Support FRRouting 8.2 and introduce zebra.Software structure. 2022-05-04 07:32:58 +00:00
44065abbca Add the possibility to choose the local port in the TCP
connection to a peer.

Signed-off-by: Arthur de Kerhor <arthurdekerhor@gmail.com>
2022-04-07 17:05:04 +02:00
459bcfedf4 documentation : BGP-SR via python grpc example 2022-03-24 08:47:16 +09:00
556d7c7599 update completion
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2021-12-09 12:52:59 +00:00
24c337268e doc: update pyang_plugins
rm GOPATH.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2021-12-09 12:52:36 +00:00
67ffaf519e update v3 suffix
some minor stuff.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2021-12-09 00:12:47 +00:00
dc67485336 .github/ci: Replace staticcheck with golang-ci-lint 2021-12-08 13:40:16 +01:00
c593d7c8b3 switch to Go API v2 for protobuf
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>
2021-12-08 07:22:50 +00:00
dc708d5bed tools: don't use a shebang for bash completion
They are not expected to be executed. This seems a silly path, but
some people bother filing bug reports about it, so if you are OK with
it, it could be "fixed".
2021-03-13 18:12:56 +01:00
b55c32ce65 Support of FRR7.5
This commit works with FRR7.5 when "version = 6" is specified in zebra.config
- Changes Zebra internal API commands to FRR7.5 which is incompatible with older version.
- Changes SendHello() to include AFI
- Changes SendRouteIDAdd() to include AFI
- Changes decodeFromBytes/serialize of IPRouteBody and NexthopUpdateBody, because size of MESSAGE_FALG is changed.
2020-11-29 12:23:28 +09:00
c5dcfb72a8 dependency and spellchecker update
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-11-25 17:29:48 -05:00
48e55b7c38 code changes
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-11-25 17:29:13 -05:00
efeb8c51fb zebra: refactoring and fix bug and add processing messageBackupNexthop (added in frr7.4)
- Move function for checking softwareName from internal/pkg/config/default.go to internal/pkg/zebra/zapi.go.
- Delete support for frr7.1.
- Fix bug by inverse processing MessageMTU and messageTag, and add messageTableId in decodeFromBytes and serialize of IPRouteBody.
- Add processing messageBackupNexthop (which is added in frr7.4) in decodeFromBytes and serialize of IPRouteBody.
- Update document.
2020-07-26 22:37:04 +09:00
cf572bc5fc Refactoring Zebra and supporting frr7.3
- Change const values to camel case from snake case to make zero golint's warnigns
- Introduce convert functions (toEach, toCommon) between the newest version to older versions
- Merge code about decode nexthop to reduce lines of code
- Add frr7.3 statemet in allowable software for config
- Rename and Update generated file by stringer
2020-04-26 07:43:50 +09:00
f11b9c7afb Add BGP-LS SRLG support 2020-04-24 00:25:59 +01:00
05a7e0e993 Supporting FRR7.2 2020-01-13 18:55:51 +09:00
377213886c contrib: simplify instructions for systemd
Using setcap is not used when systemd file contains
AmbientCapabilities=CAP_NET_BIND_SERVICE.
2020-01-05 21:48:16 +09:00
416445b1dc tools: add python grpc ListPeer API example
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-11-07 15:06:26 +09:00
72a0e55287 Use correct import paths for protobuf packages
The packages `any`, `empty`, and `timestamp` ship with protoc so there
is no need to pull them out of the go package. This simplifies the
generation script and also corrects the import paths for the standard
protobuf types.

Fixes: #2095
2019-11-06 17:59:21 +00:00
43a2d404b9 Fix tools test
This changes the test to no longer reference $GOPATH. Instead, it
removes `github.com/osrg/gobgp/` fore calling grep from the package
name before calling grep so that it greps a location relative to
wherever the script was located when it was called. This should work
regardless of $GOPATH.

The problem was that in a Travis CI run, the repository is not cloned
to the correct spot under $GOPATH and the grep fails because it is
looking in the wrong place. The repository is cloned to
`/home/travis/build/osrg/gobgp` and GOPATH is set to
`/home/travis/gopath` during a Travis run which don't match up.
2019-08-20 13:12:09 -06:00
50df0390fa use tha standard comment for machine-generated files
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-07-12 17:37:05 +09:00
2f5a4d59cb BGP connection on a speecified interface (including which is associated VRF) using syscall SO_BINDTODEVICE 2019-07-02 11:40:22 +09:00
25428e881e fix markdownlint warnings
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-05-16 20:59:53 +09:00
2965e8092e add script to generate api/gobgp.pb.go
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-04-06 21:48:21 +09:00
ccdc2e6277 add secondary-route feature for router server
if an export policy rejects a selected route, try the next route in
order until one that is accepted is found or all routes for the peer
are rejected.

the default is disabled. You can enable this feature in the following
way:

[neighbors.route-server.config]
  route-server-client = true
  secondary-route = true

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-04-02 16:01:29 +09:00
80ff3a325c support BMP sysName and sysDescr configuration 2019-03-25 20:11:44 +09:00
6345fdd20a Fixed typos 2019-03-16 19:35:04 +09:00
cb5cf73311 contrib: update the service systemd 2019-03-14 21:51:08 +09:00
3a79ad3fdc Supporting BGP/MPLS L3VPNs with Frrouting Zebra API 6
- This commit aims to solve reported problem on issues #1611, #1648 and #1912
 - Partial changes of this commit duplicate with changes on PR #1587 (not merged) and PR #1766 (not merged and already closed)
 - This commit is tested with only FRRouting version 6.0.2 (which uses Zebra API 6)
 - This commit fixes lack of LABEL_MANAGER_CONNECT_ASYNC for ZAPI6.
   (This bug is introduced on commit 2bdb76f2dcf24b891f2b6327a57c31b26463b2dd "Supporting Zebra API version 6 which is used in FRRouting version 6")
2019-03-14 21:20:31 +09:00
192480fc71 Add experimental BGP-LS feature 2019-01-26 12:40:45 +09:00
1d14b8ecfb silence staticcheck warnings
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-01-09 14:36:48 +09:00
48fa25d06c docs: delete outdated java/nodejs/ruby gRPC API examples
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2018-12-24 23:20:35 +09:00
bb1bbdd197 docs: update C++ gRPC API example
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2018-12-24 23:18:37 +09:00
28d96f985b docs: update python gRPC API example
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2018-12-24 21:41:54 +09:00
oc
5ab45752ce api: fix regression that match set option has no default value
The commit 000589f3c "api: Implement UpdatePolicy()" introduced
a regression: if match-set-options is not defined in config file,
gobgpd starts with error: failed to get policy info: not found...

This fix set match-set-options to default when needed.
2018-11-07 15:29:59 +09:00
70d3ddfd66 pyang_plugins: Fix an import path
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-09-12 21:51:33 +09:00
c33f14282c pyang_plugins: Improve pylint and pycodestyle results
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2018-09-12 21:51:33 +09:00
dec0c7d654 tools: update pyang_plugins/README.rst
Python 2 is necessary.

fixes #1801

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-09-04 22:07:18 +09:00
edbedebf7b ZAPI5 (FRRouting version 5) support 2018-08-18 10:41:20 +09:00
1cf93d5acf fix path to lib directory 2018-07-24 09:48:57 +09:00
26aed14b48 delete tools/route-server
It was used when the project has just started. But I don't think that
it's useful anymore.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-07-07 20:44:41 +09:00