Age | Commit message (Collapse) | Author |
|
The serialization of ipv4/v6 nlri should be goroutine-safe but somehow not.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
The other interface types in "packet/bgp" package have "Interface"
suffix.
This patch fixes to follow this naming convention.
Golang's naming convention recommends to use "er" suffix though.
Also, this patch moves the AIGP TLVs definitions to the near of the
PathAttributeAigp structure and defines NewAigpTLVDefault function.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
This patch refactors the structure of TunnelEncapSubTLV sub-types to
have the similar structure of PathAttribute sub-types, and makes easy to
implement MarshalJSON() functions for TunnelEncapSubTLV sub-types.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Itoa() takes an int which will only be 32-bit on i386 and similar
architectures. In tests, some constants are too big. Therefore, switch
all uses of strconv.Itoa() to strconv.FormatInt().
Without this change, we get:
```
src/github.com/osrg/gobgp/packet/bgp/bgp_test.go:1123:41: constant 2864434397 overflows int
```
|
|
MP_REACH_NLRI was already correctly encoded in JSON, while this was
not the case for MP_UNREACH_NLRI.
Before:
```json
"PathAttributes": [
{
"type": 15,
"value": "AAIBQCABDbgAEwAA"
}
]
```
After:
```json
"PathAttributes": [
{
"type": 15,
"afi": 2,
"value": [
{
"prefix": "2001:db8:8::/64"
}
],
"safi": 1
}
]
```
This commit also adds two tests not directly related to JSON encoding
as I was first thinking the problem may be related to incorrect
parsing of the path attribute.
|
|
Currently, the "FlowSpecComponentItem" uses int type for the "Op" and
"Value" fields, but Golang int type has 4 bytes length on the 32-bit
env and 8 bytes length on the 64-bit env.
For example, to support the SNAP (Type 20) rule, which has 5 bytes
value field, int type has not enough length on 32-bit env.
This patch fixes to use the fixed length integer types for the
FlowSpec components and avoid overflows of value range.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Currently, we sort the FlowSpec rules when creating a new path
containing the FlowSpec NLRI and when parsing CLI arguments for
the FlowSpec rules.
This patch moves sorting the rules into the inside of the "packet"
module and sorts them when decoding binary and creating new NLRI.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
This patch introduces a new function to parse EVPN ESI from string slice
which passed via CLI for example.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
add-path support needs two identifiers, remote (rx) and local
(tx). The remote identifiers are assigined by remote peers, the local
ones are assigned by gobgpd itself.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
RFC 5575 suggests using "bitmask operand format" for fragmentation
field, but GoBGP does not have an interface to configure it.
This patch introduce the way to configure bitmask operands for
"fragment" field.
The syntax is similar to TCP flags rules.
For example:
=not-a-fragment
=is-fragment&!last-fragment
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
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 <ishida.wataru@lab.ntt.co.jp>
|
|
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
This patch adds a test case for PathAttributeMpReachNLRI with IPv6
prefix and IPv4 peering (IPv4 nexthop address).
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
closes #1117
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
see draft-ietf-bess-evpn-prefix-advertisement-03
$ gobgp g ri -a evpn add prefix 10.0.0.0/24 etag 20 rd 100:100 rt 100:100 gw 10.10.10.10 label 100
$ gobgp g ri -a evpn add prefix 200::/64 etag 20 rd 100:100 rt 100:100 gw 200::1 label 10000
close #1082
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
close #997
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
move bmp stuff from bgp to bmp package.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Later, we move non-bgp protocol stuff like mrt under their own
direcotries.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|