Age | Commit message (Collapse) | Author |
|
"cli-command-syntax.md" describes "rib del all" command should delete
all locally generated paths, but currently this command deletes all paths
including received path from neighbors unexpectedly.
This patch fixes the DeletePath API to delete only locally generated
paths and solves this problem.
Current:
$ gobgp global rib -a ipv4
Network Next Hop AS_PATH Age Attrs
*> 10.12.1.0/24 0.0.0.0 00:00:00 [{Origin: ?}]
* 10.12.1.0/24 10.0.0.1 65001 00:00:00 [{Origin: ?}]
$ gobgp global rib -a ipv4 del all
$ gobgp global rib -a ipv4
Network not in table
With this patch:
$ gobgp global rib -a ipv4
Network Next Hop AS_PATH Age Attrs
*> 10.12.1.0/24 0.0.0.0 00:00:00 [{Origin: ?}]
* 10.12.1.0/24 10.0.0.1 65001 00:00:00 [{Origin: ?}]
$ gobgp global rib -a ipv4 del all
$ gobgp global rib -a ipv4
Network Next Hop AS_PATH Age Attrs
*> 10.12.1.0/24 10.0.0.1 65001 00:00:10 [{Origin: ?}]
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
|
|
For the 32-bit platform compatibility.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Currently, MonitorRib API with ADJ_IN type and "current" flag returns
the initial response with an empty path list when gRPC client connecting
to GoBGP daemon.
This causes the client can not receive the current paths which GoBGP
daemon already has.
This patch fixes to compose the initial MonitorRib response with the
current paths.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
For code readability, this commit make some arguments
to receivers.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Needs to set set A flag in Per-Peer Header if the peer use the legacy
2-byte AS_PATH format.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This fixes the ae7e572550df919c1b9990da8787fc1e860bc20d commit
regression. gobgp neighbor command takes a bogus neighbor name like
the following:
fujita@ubuntu:~/go/src/github.com/osrg/gobgp/gobgp$ ./gobgp n 1
BGP neighbor is 172.17.0.2, remote AS 65001
BGP version 4, remote router ID unknown
BGP state = active, up for 17496d 14:21:50
BGP OutQ = 0, Flops = 0
Hold time is 0, keepalive interval is 0 seconds
Configured hold time is 60, keepalive interval is 20 seconds
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
V4 NLRI needs more 4 bytes with addpath enabled.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
According to RFC7432, the ES-Import RT can be derived automatically
when using the ESI Types 1, 2 and 3.
This patch enables to derive automatically the ES-Import RT for the
given path from BgpServer's API.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Currently, the config of PeerGroup members are not set properly.
For example, if LocalAs of the neighbor is not set in the config file,
LocalAs will be set to Global.As as a default value.
After this, however, if the neighbor is a member of a peer group,
LocalAs will be unexpectedly overwritten by the peer group config.
This commit fixes this by setting default values after
applying the peer group config.
Adding to this, this commit avoids unnecessary applying
the peer group config.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
RFC 5065 says that:
"It is a error for a BGP speaker to receive an update message from a
confederation peer that is not in the same Member-AS that does not
have AS_CONFED_SEQUENCE as the first segment."
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
In neighbor config, there are some parameters whose
default value can be changed depending on the global config.
This commit modifies the argument of config.SetDefaultNeighborConfigValues()
to pass the global config. It enables to change the default
settings of neighbor depending on the global config.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Currently, with iBGP peering, the CLI injected path will not be withdrawn
when the deletion if any other path exists on RIB, then the CLI injected
path will be left on iBGP peers even if the route is deleted on the
originator router.
This problem can cause routing loops in some case.
This patch fixes to withdraw the old best path when it was the CLI (or
gRPC) injected path.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Currently, zclient registers only nexthops which bound for the best
path, this patch enables to register all nexthops which contained in
RIBs in order to detect nexthops down faster.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
This patch enables to unregister nexthop when received NEXTHOP_UPDATE
message and there is no path bound for the updated nexthop.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
The function for notifying WATCH_EVENT_TYPE_PRE_UPDATE event hasn't been
defined yet, this patch defines a function for it.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
|
|
After Shutdown() is called, the main goroutine waits for peers'
goroutines to stop then dies. But if no peer is configured, the main
goroutines never dies.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Currently, UpdatePath() of BgpServer will apply policy multiply, and
this causes the unexpected result of policy configurations.
This patch avoids this multiple policy application.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
This patch enables to dump updates and table in MRT format with Path
Identifier.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
This patch adds a field of config.Neighbor into WatchEventUpdate in
order to get config/state info of the neighbor which sent the UPDATE
message.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
The variable "m" in mrtWriter.loop() collides its receiver "m *mrtWriter".
This patch renames this variable name.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
This patch enables mrtWriter to directly access config.MrtConfig values
in case that some new options will be introduced.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
This patch introduce "add-paths" structure per AFI-SAFI in order to
enable to store add-paths feature config/state per AFI-SAFI.
Also, this patch renames a few variables to avoid the name collisions.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
|
|
This patch enables GoBGP to keep the session established
even if the received BGPUpdate message contains some errors,
and to handle these errors according to what defined in RFC7606.
This feature is enabled when 'treat-as-withdraw' in
'neighbors.error-handling.config' is specified to true
in the GoBGP config file.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
To reduce the translations of "AfiSafiName" into "bgp.RouteFamily", this
patch introduces "Family" field into "AfiSafiState" and stores the
translated value.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
|
|
A new socket was created so we must close it before this function
returns _either_ on failure or success. On success, net.FileConn() in
newTCPConn() increases the refcount of the socket so this fi.Close()
doesn't destroy the socket; the caller can use it (and needs to close
it later).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Seems that zebra could send a route message without nexthop (makes
sense for withdraw).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
https://github.com/osrg/gobgp/issues/1391
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
RS peers and non RS peers uses different tables so no need to filter
paths from rs clients for non rs clients.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
|