Age | Commit message (Collapse) | Author |
|
also added scenario_test
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
The length of an aspath attribute's value from iBGP peer can be 0.
This patch fixes PrependAsn() to handle such an aspath attribute.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
|
|
|
|
When gobgp originates a route, the generated route had incorrect
as-path. this patch fix this bug.
Scenario test is also added to check this.
[before]
$ gobgp neighbor global rib
Network Next Hop AS_PATH Age Attrs
*> 10.0.1.0/24 192.168.10.3 65001 00:03:20 [{Origin: IGP} {Med: 0}]
*> 10.0.2.0/24 192.168.10.4 65002 00:03:36 [{Origin: IGP} {Med: 200}]
*> 10.10.0.0/24 0.0.0.0 65000 00:03:37 [{Origin: IGP}]
$ gobgp neighbor 192.168.10.5 adj-out
Network Next Hop AS_PATH Attrs
10.0.1.0/24 192.168.10.2 65000 65001 [{Origin: IGP}]
10.0.2.0/24 192.168.10.2 65000 65002 [{Origin: IGP}]
10.10.0.0/24 192.168.10.2 65000 65000 [{Origin: IGP}]
[after]
$ gobgp neighbor global rib
Network Next Hop AS_PATH Age Attrs
*> 10.0.1.0/24 192.168.10.3 65001 00:03:20 [{Origin: IGP} {Med: 0}]
*> 10.0.2.0/24 192.168.10.4 65002 00:03:36 [{Origin: IGP} {Med: 200}]
*> 10.10.0.0/24 0.0.0.0 00:03:37 [{Origin: IGP}]
$ gobgp neighbor 192.168.10.5 adj-out
Network Next Hop AS_PATH Attrs
10.0.1.0/24 192.168.10.2 65000 65001 [{Origin: IGP}]
10.0.2.0/24 192.168.10.2 65000 65002 [{Origin: IGP}]
10.10.0.0/24 192.168.10.2 65000 [{Origin: IGP}]
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
if we add same path multiple times by the following gobgp cli commands,
$ gobgp global rib add 10.0.0.0/24
$ gobgp global rib add 10.0.0.0/24
$ gobgp global rib add 10.0.0.0/24
current implementation sends multiple update messages to peers
even through the content of the path is same.
This is due to the shallow equivalence checking.
This patch checks paths' equivalence deeper by adding Equal() method to Path.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Path/Destination/Table was defined as interface.
Simplify by making them normal struct.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
|
|
|
|
this patch fixes the wrong behavior shown below
$ gobgp global rib add 10.0.0.0/24
$ gobgp global rib del 10.0.0.0/24
$ gobgp global rib
Network Next Hop AS_PATH Age Attrs
*> 10.0.0.0/24 0.0.0.0 65000 00:05:48 [{Origin: IGP}]
since we used to compare path's source by PeerInfo's pointer, locally
originated routes is considered as a different route even if they have
same prefix.
this patch introduce Equal() method to compare PeerInfo's content and
fix this wrong behavior.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
add rtc route
$ gobgp global rib add 65000 77 -a rtc
check it
$ gobgp global rib -a rtc
Network Next Hop AS_PATH Age Attrs
*> 65001:65000:75 0.0.0.0 [65001] 00:15:35 [{Origin: IGP}]
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
add encap end point route(10.0.0.1) with vni 20
$ gobgp global rib add 10.0.0.1 20 -a encap
check it
$ gobgp global rib -a encap
Please specify one command of: add or del
Network Next Hop AS_PATH Age Attrs
*> 10.0.0.1 0.0.0.0 [64512] 00:00:01 [{Origin: IGP} {Encap: < VXLAN | color: 20 >}]
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
|
|
- add ToApiStruct() for convertion of internal structs to protobuf structs
to avoid ugly convertion by json.Marshal() && json.Unmarshal()
- move grpc server code under /server instead of /api
- update proto file to include more detailed path information
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Paths whose route family are other than ipv4 have nexthop information in
a mp_reach_nlri path attribute instead of a nexthop path attribute.
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: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
|
|
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
More appropriate.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
If a new path has the exact same attributes that the existing one
(after RouteRefresh), we don't update the timestamp.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Set timestamp at Path when update message for the path arrived.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Path can be shared in multiple local ribs so having "best" in Path is
wrong. The info "best" path is stored in Destination so CLI uses it.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
must use Prefix (address + mask) as key.
Same as commit 900cb321fb3dc353b102aa1970e652184abc24eb
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Even if a connection with peer is down and up, table code gets
BGPmessages belonging the first connection before the event of the
peer down in order. So we don't need source version stuff inherent
from Ryu BGP code.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
table_manager.go clones withdraw path before passing it to peer.go
clone() doesn't clone pathattributes. This patch adds a helper
funciton to clone PathAttributes to message.go (it is used by
createing BGPUpdate message to withdraw ipv6. later it will be used
for 2 byte AS peer).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
RouteFamily is defined in two files.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|