Age | Commit message (Collapse) | Author |
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
By introducing dynamic neighbor feature,
GoBGP can have dynamic neighbors,
and corresponding Config.NeighboAddress can be empty.
This patch sets State.NeighborAddress for all neighbors,
and gets the neighbor's address from them.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
The usage of "github.com/sirupsen/logrus" is recommended.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This patch enables to create peer-groups,
also supports dynamic configuration to peer-groups.
Manually set fields in neighbor configs have priority over its peer-group's config,
except some fields, like "peer-as", or "minimum-advertisement-interval" and so on.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
This patch enables to watch events for monitoring received BGP messages
before the state comparison.
Note: Currently, this event nortifies UPDATE message only, because the
other messages will be handled in FSMHandler and not received at
BgpServer, so BgpServer cannot send event for these messages.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
|
|
when the old best was from iBGP, we don't need to send withdrawals
to iBGP peers.
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
RFC4271 9.1.2 Phase 2: Route Selection
If the AS_PATH attribute of a BGP route contains an AS loop, the BGP
route should be excluded from the Phase 2 decision function. AS loop
detection is done by scanning the full AS path (as specified in the
AS_PATH attribute), and checking that the autonomous system number of
the local system does not appear in the AS path. Operations of a BGP
speaker that is configured to accept routes with its own autonomous
system number in the AS path are outside the scope of this document.
Also this commit adds support for allow-own-as option to relax this.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
established
currently gobgpd continues to handle update messages even if
becomedidle state from establised.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
avoid calculation of the number of adjout that will not be used.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This patch fixes a bug of export policy and implicit withdrawal.
When a path is filtered by export policy, we need to check whether the
old path (implicit withdrawn path) was sent before the new path.
If it has been sent, we need to send a withdrawal message.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
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 <ishida.wataru@lab.ntt.co.jp>
|
|
config.TransportState.LocalAddress may have zone info with ipv6 address
like "fe80::x%eth0".
In this case, net.ParseIP() returns <nil>, which leads to set <nil> to
PeerInfo.LocalAddress.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
fix a bug that GetRib() doesn't return an error even if an error
happens.
|
|
This patch implents dampening for the Nexthop Tracking as Cisco's
routers doing.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
This patch enables server/zclient to update the metric or the reachability
state to the nexthop for implementing the Nexthop Tracking features.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
with two ibgp peers (a and b), when peer a advertizes one route and
then withdraw it, there are two bugs:
- gobgp sends withdrawal to peer a.
- gobgp sends withdrawal to peer b.
this fixes both.
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>
|
|
also, use it for zebra integration
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
|
|
This patch adds "--reason" option support into the disable neighbor command
which can specify "Administrative Shutdown Communication" on the BGP Cease
NOTIFICATION message.
Usage:
$ gobgp neighbor <neighbor address> disable --reason "some messages"
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
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 <iwase.yusuke0@gmail.com>
|
|
- 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)
|
|
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
when using named return for management operations, we need to substitute
the return value of (*BgpServer).mgmtOperation() to a valiable 'err' for
proper error propagation.
close #1215
Signed-off-by: Wataru Ishida <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: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
routes rejected by global import policy was not deleted from RIB
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
cleaning outgoing channel while fsm handler is running may cause crash
Dec 2 06:14:36 g2 gobgpd[6955]: {"Topic":"Peer","level":"info","msg":"Delete a peer configuration for:10.173.176.211","time":"2016-12-02T06:14:36Z"}
Dec 2 06:14:36 g2 gobgpd[6955]: {"Data":"","Key":"10.173.176.211","Topic":"Peer","level":"warning","msg":"sent notification","time":"2016-12-02T06:14:36Z"}
Dec 2 06:14:36 g2 gobgpd[6955]: {"Key":"10.173.176.211","Reason":"notification-sent code 6(cease) subcode 3(peer deconfigured)","State":"BGP_FSM_ESTABLISHED","Topic":"Peer","level":"info","msg":"Peer Down","time":"2016-12-02T06:14:36Z"}
Dec 2 06:14:36 g2 gobgpd[6955]: panic: interface conversion: interface {} is nil, not *server.FsmOutgoingMsg
Dec 2 06:14:36 g2 gobgpd[6955]: goroutine 69 [running]:
Dec 2 06:14:36 g2 gobgpd[6955]: panic(0xd26200, 0xc82030c4c0)
Dec 2 06:14:36 g2 gobgpd[6955]: /usr/local/go/src/runtime/panic.go:481 +0x3e6
Dec 2 06:14:36 g2 gobgpd[6955]: github.com/osrg/gobgp/server.(*FSMHandler).sendMessageloop(0xc8201a66e0, 0x0, 0x0)
Dec 2 06:14:36 g2 gobgpd[6955]: /usr/local/opt/gopath/src/github.com/osrg/gobgp/server/fsm.go:1136 +0x3c3
Dec 2 06:14:36 g2 gobgpd[6955]: github.com/osrg/gobgp/server.(*FSMHandler).(github.com/osrg/gobgp/server.sendMessageloop)-fm(0x0, 0x0)
Dec 2 06:14:36 g2 gobgpd[6955]: /usr/local/opt/gopath/src/github.com/osrg/gobgp/server/fsm.go:1175 +0x2e
Dec 2 06:14:36 g2 gobgpd[6955]: gopkg.in/tomb%2ev2.(*Tomb).run(0xc8201a66e0, 0xc820278140)
Dec 2 06:14:36 g2 gobgpd[6955]: /usr/local/opt/gopath/src/gopkg.in/tomb.v2/tomb.go:163 +0x21
Dec 2 06:14:36 g2 gobgpd[6955]: created by gopkg.in/tomb%2ev2.(*Tomb).Go
Dec 2 06:14:36 g2 gobgpd[6955]: /usr/local/opt/gopath/src/gopkg.in/tomb.v2/tomb.go:159 +0x131
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
infinite channel has internal goroutine which won't stop until all items in
the buffer are dequeued.
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
AdjRibOut isn't in memory so needs to be calculated on the fly.
Doing such for multiple neighbors consumes too much CPU (especially
there are lots of routes).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
move ROA under table package
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
With this change, we could send unncessary messages but it's harmless
(wastefull though).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Preparation for removing in-memory adj-out.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Preparation for removing in-memory adj-out.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
$ gobgp neighbor add 10.0.0.1 route-reflector-client
$ gobgp neighbor add 10.0.0.1 route-reflector-client 1.1.1.1
$ gobgp neighbor add 10.0.0.1 route-server-client
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
$ 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 <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Also don't allocate label for local routes. The label management needs
to work with other components rather than bgp.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
$ gobgp global rib summary -a ipv4
$ gobgp neighbor 10.0.0.1 local summary
$ gobgp neighbor 10.0.0.1 adj-in summary
$ gobgp neighbor 10.0.0.1 adj-out summary
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|