290 Commits
Author SHA1 Message Date
FUJITA Tomonori 1747a3311c packet: fix addpath capability parser/serializer
Signed-off-by: FUJITA Tomonori <[email protected]>
2017-06-23 15:44:16 +09:00
IWASE Yusuke 6b710bae42 packet/mrt: BGP with Geo-Location Extensions (RFC6397)
This patch enables to decode/encode MRT format with BGP routing
information including the geographical location which described in
RFC6397.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-06-08 09:28:16 +09:00
IWASE YusukeandFUJITA Tomonori 4eb493a84c packet/bmp: Implement Route Mirroring message
Signed-off-by: IWASE Yusuke <[email protected]>
2017-06-03 18:18:23 +09:00
LamannaandFUJITA Tomonori 52a0f71987 Fix RouteDistinguisher parsing and VPNV6 VRF rib parsing 2017-06-01 12:46:40 +09:00
IWASE YusukeandFUJITA Tomonori 99336372ab packet/mrt: BGP Additional Path Extensions (RFC8050)
This patch enables to decode/encode MRT format with BGP Additional Path
Extensions which described in RFC8050.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-06-01 09:31:52 +09:00
IWASE YusukeandFUJITA Tomonori 0ff4c8b20d bmp: Implement Information TLV on Termination messages
Signed-off-by: IWASE Yusuke <[email protected]>
2017-05-23 14:34:55 +09:00
IWASE YusukeandFUJITA Tomonori d936841fb3 bmp: Implement Information TLV on Initiation message
Currently, the TLV fields are implemented as BMPTLV on the Initiation
messages, but not enough decoded and required to be constructed in
binary format.

This patch introduces BMPInfoTLV and makes easy to handle the TLV
fields.

Note: This patch obsoletes BMPTLV structure.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-05-23 14:34:55 +09:00
IWASE YusukeandFUJITA Tomonori 46b6fc2ccd bmp: Remove redundant error value declaration
Signed-off-by: IWASE Yusuke <[email protected]>
2017-05-23 14:34:55 +09:00
Denis ShevchenkoandFUJITA Tomonori b37d9bb56a flowspec: handling of >2 logical elements and fixed test 2017-05-23 14:30:33 +09:00
Denis ShevchenkoandFUJITA Tomonori 579c128555 flowspec: formatting of flowspec ranges in nice order 2017-05-23 14:30:33 +09:00
Denis ShevchenkoandFUJITA Tomonori d3d1f3999d flowspec: correct handling of | bit case in opflags 2017-05-23 14:30:33 +09:00
Denis ShevchenkoandFUJITA Tomonori 2922f6e7f8 flowspec: correct place for & bit in opflags 2017-05-23 14:30:33 +09:00
Satoshi FujimotoandFUJITA Tomonori 87fe4fa604 cli: Add User Interface for Redirect-IPv6 action
Signed-off-by: Satoshi Fujimoto <[email protected]>
2017-05-23 11:11:10 +09:00
Satoshi FujimotoandFUJITA Tomonori 7497ce7eb7 packet/bgp: Redirect-IPv6 Flow Spec Traffic Filtering Action
Signed-off-by: Satoshi Fujimoto <[email protected]>
2017-05-23 11:11:10 +09:00
Satoshi FujimotoandFUJITA Tomonori 4b3163278b packet/bgp: IPv6 Address Specific Extended Community
Signed-off-by: Satoshi Fujimoto <[email protected]>
2017-05-23 11:11:10 +09:00
IWASE Yusuke 5bb0738156 packet/bmp: Implement BMPStatisticsReport serializer
Currently, only parser for BMPStatisticsReport is implemented and does
not support the per-AFI/SAFI stats TLV types.

This patch implements BMPStatisticsReport serializer and re-implements
the stats TLV parser/serializer to support the missing TLV types.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-05-22 13:12:02 +09:00
Wataru IshidaandFUJITA Tomonori 540d77319c mrt: fix bug of general address family rib serialization
allocate a slice with 2 byte length (not 2 byte capacity) for
PutUint16()

fixes #1313

Signed-off-by: Wataru Ishida <[email protected]>
2017-05-10 15:46:04 +09:00
IWASE YusukeandFUJITA Tomonori 7307b1490e bmp: BMP Route Monitoring for Local RIB routes
This patch enable to send BMP Route Monitoring message for Local RIB
routes described in bmp-draft-evens-grow-bmp-local-rib.

Configuration Example: gobgpd.toml
  ...
  [[bmp-servers]]
    [bmp-servers.config]
      address = "127.0.0.1"
      port=11019
      route-monitoring-policy = "local-rib"
  ...

Signed-off-by: IWASE Yusuke <[email protected]>
2017-04-17 21:57:11 +09:00
IWASE YusukeandFUJITA Tomonori 93c955a415 packet/bmp: Obsolete policy argument for BMPPeerHeader
According to "draft-evens-grow-bmp-local-rib", the L flag in the Peer
Flags is NOT used for the locally sourced routes and the F flag is
defined into the same bit.

This patch removes "policy" argument and add "flags" argument for
BMPPeerHeader and NewBMPPeerHeader in order to distinguish which flag
is set (the L flag or the F flag).
Then introduce IsPostPolicy() func to show if the L flag is set or not.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-04-17 21:57:11 +09:00
IWASE YusukeandFUJITA Tomonori 5323187cf1 packet/bmp: Missing Constants for BMP RFC7854
Signed-off-by: IWASE Yusuke <[email protected]>
2017-04-17 21:57:11 +09:00
ISHIDA Wataru 06f2713ec3 don't To4() nexthop address when AFI is not IPv4
support for IPv6 NLRI with IPv4 nexthop

Signed-off-by: ISHIDA Wataru <[email protected]>
2017-04-12 04:41:35 +00:00
ISHIDA WataruandFUJITA Tomonori bba54bdaa1 skip asn negotiation for BGP unnumbered peers
since BGP unnumbered peers are typically trusted, skip asn negotiation
for easy configuration.

from configuration file:

```toml
[[neighbors]]
[[neighbors.config]]
neighbor-interface = "eth0"
```

from cli:

```
$ gobgp neighbor add interface eth0
```

Signed-off-by: ISHIDA Wataru <[email protected]>
2017-04-04 22:07:46 +09:00
ISHIDA WataruandFUJITA Tomonori 00f8406cb6 packet/bgp: add extended-nexthop capability
Signed-off-by: ISHIDA Wataru <[email protected]>
2017-04-04 22:07:46 +09:00
ISHIDA WataruandFUJITA Tomonori e80b6ece00 packet/bgp: fix mp-reach-nlri attribute decoder/encoder
Current mp-reach-nlri attribute decoder/encoder assumes NLRI's address family
and that of nexthop is the same.
However, when extended nexthop capability(RFC5549) is negotiated, this
is not the case. This commit removes the assumption.

Signed-off-by: ISHIDA Wataru <[email protected]>
2017-04-04 22:07:46 +09:00
Matthieu TexierandFUJITA Tomonori 55e9684259 flowspec: comply with new draft RFC5575bis normalized operators 2017-03-02 15:56:02 +09:00
Matthieu TexierandFUJITA Tomonori 6de16dc885 flowspec: comply with RFC 5575 about TCP flags rules
This patch proposes a new way to configure BGP flowspec TCP flags
rules It allows to comply with RFC 5575 by defining flags like this
=SA =A / '!SA' / '=SA&=!U' = means match, ! means not, & means and,
all TCP flags are identified by their first charater S for SYN A for
Ack ...
2017-02-17 21:20:59 +09:00
Emil PalmandFUJITA Tomonori b99a2dc874 Adding support for port number 0 and above instead of only above 0 2017-02-14 00:43:15 -08:00
Eiichiro WatanabeandFUJITA Tomonori 7aff4a6c58 packet: Avoid panic() during decoding BMP messages 2017-02-04 06:28:25 -08:00
IWASE YusukeandFUJITA Tomonori 1063bcab1e cli: Communication on Administrative Shutdown NOTIFICATION
This patch enable to send an arbitrary message on the Cease NOTIFICATION
message with "Administrative Shutdown" and "Administrative Reset" subcodes
with "--reason" option.

Usage:
  $ gobgp neighbor <neighbor address> shutdown --reason "some messages"
  $ gobgp neighbor <neighbor address> reset --reason "some messages"

Reference: https://tools.ietf.org/html/draft-ietf-idr-shutdown-04

Signed-off-by: IWASE Yusuke <[email protected]>
2017-02-03 22:47:34 -08:00
Eiichiro Watanabe 7336d9d54f Fix End of RIB handling
- All of EoR except IPv4 unicast have MP_UNREACH only. (RFC4724)
    - length of the MP_UNREACH attr. should be 3bytes.
    - length of the value should be 0bytes.
  - Should send EoR marker in initial exchange of BMP Route Monitoring. (RFC7854)
2017-01-29 17:38:09 +09:00
IWASE YusukeandFUJITA Tomonori 7babf94567 packet/bgp/bgp_test: UT for PathAttributeMpReachNLRI
Signed-off-by: IWASE Yusuke <[email protected]>
2017-01-16 05:06:03 -08:00
IWASE YusukeandFUJITA Tomonori 309efb3fa4 packet/bgp/bgp_test: UT for IPv6 MpReachNLRI with IPv4 peering
This patch adds a test case for PathAttributeMpReachNLRI with IPv6
prefix and IPv4 peering (IPv4 nexthop address).

Signed-off-by: IWASE Yusuke <[email protected]>
2017-01-16 05:06:03 -08:00
IWASE YusukeandFUJITA Tomonori 9103dda49d packet/bgp: Confirm IPv4/v6 conversion when AFI_IP6
Currently, GoBGP will miss-convert IPv4 nexthop address to IPv6
address when advertising AFI_IP6 routes with IPv4 peering.
For example, if the local address of GoBGP is "172.20.0.1", the
advertised nexthop will be miss-converted into "AC14:1::".
In this case, the nexthop address should be "::ffff:172.20.0.1".
This patch fixes this problem.

According to this change, this patch also fixes "nexthoplen"
calculation to parse and serialize NextHop field, otherwise it
will cause "mpreach nexthop length is incorrect" at GoBGP or
"Invalid NextHop length" at BGP peers.

Signed-off-by: IWASE Yusuke <[email protected]>
2017-01-16 05:06:03 -08:00
IWASE YusukeandFUJITA Tomonori 665b8cc324 packet/bgp: Remove redundant type declaration "AsPathParamFormat"
Signed-off-by: IWASE Yusuke <[email protected]>
2017-01-16 05:06:03 -08:00
IWASE YusukeandFUJITA Tomonori 69caa0d15b packet/bgp: Remove redundant blank argument in range
Signed-off-by: IWASE Yusuke <[email protected]>
2017-01-16 05:06:03 -08:00
IWASE YusukeandFUJITA Tomonori 1affc4c7be packet/bgp: Avoid colliding with module "net"
Signed-off-by: IWASE Yusuke <[email protected]>
2017-01-16 05:06:03 -08:00
IWASE YusukeandFUJITA Tomonori d79ac465c5 packet/bgp: Fix typos
Signed-off-by: IWASE Yusuke <[email protected]>
2017-01-16 05:06:03 -08:00
IWASE YusukeandFUJITA Tomonori 5c3ebc01fa packet/bgp: Fix unused return parameter "err"
Signed-off-by: IWASE Yusuke <[email protected]>
2017-01-16 05:06:03 -08:00
kishiguro 0f5f9078ea Fix Open Message optional parameter length == 1 GoBGP crashes issues. 2016-11-29 01:06:46 -08:00
Wataru Ishida 24e397b0f6 add go vet test
Signed-off-by: Wataru Ishida <[email protected]>
2016-11-17 21:52:20 -05:00
Wataru IshidaandFUJITA Tomonori a17832195c support neighbor belongs to VRF
$ gobgp vrf add red rd 100:100 rt both 100:100
$ gobgp neighbor add 10.0.0.1 as 2 vrf red
$ gobgp vrf red neighbor
Peer     AS  Up/Down State       |#Advertised Received Accepted
10.0.0.1 2   never   Active      |          0        0        0

Signed-off-by: Wataru Ishida <[email protected]>
2016-11-04 13:19:47 +09:00
Wataru IshidaandFUJITA Tomonori f75d45bbc4 bgp: remove duplicate large communities
closes #1143

Signed-off-by: Wataru Ishida <[email protected]>
2016-10-27 14:41:57 -07:00
Pier Carlo ChiodiandGitHub bc0bf8c0fb New Early IANA Allocation 2016-10-26 21:58:55 +02:00
Wataru IshidaandFUJITA Tomonori 6b6f6974fc *: Notification support for BGP GR
implement draft-ietf-idr-bgp-gr-notification-07

Signed-off-by: Wataru Ishida <[email protected]>
2016-10-09 07:15:08 -07:00
Wataru IshidaandFUJITA Tomonori c3d8784efc packet/bgp: BGPCapabilityCode.String() pretty stringing
Signed-off-by: Wataru Ishida <[email protected]>
2016-10-09 07:08:16 -07:00
Wataru IshidaandFUJITA Tomonori e302689c60 packet/bgp: add long-lived graceful restart capability 2016-10-09 07:04:49 -07:00
Shu Sugimoto bd42075ef0 Add BLACKHOLE community support (RFC7999) 2016-10-07 22:53:06 +09:00
Wataru Ishida cda8d873fa packet/bgp: fix handling of IPv4 mapped IPv6 prefixes
closes #1117

Signed-off-by: Wataru Ishida <[email protected]>
2016-10-04 04:03:46 +00:00
Job SnijdersandFUJITA Tomonori c6f5b5d13d Update LARGE_COMMUNITY path attribute codepoint
IANA has assigned value 30 (LARGE_COMMUNITY Attribute) in the "BGP
Path Attributes" sub-registry under the "Border Gateway Protocol
(BGP) Parameters" registry.

http://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#bgp-parameters-2
2016-10-02 14:42:06 -07:00
Wataru IshidaandFUJITA Tomonori 64b0a7a467 packet/bgp: fix bug of CompareFlowSpecNLRI()
Signed-off-by: Wataru Ishida <[email protected]>
2016-10-02 06:20:07 -07:00