summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2016-06-01server: fix active connection regressionISHIDA Wataru
regression introduced by 4c9cd88c61cb848e36a45657b7cbc63b9c783dc4 also fix test/lib to test configuration without local-address (configure local-address only if neighbor-address is IPv6) Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-01server: support peering with ipv6 link local addressISHIDA Wataru
fix DialTCPTimeoutWithMD5Sig to handle ipv6 scope-id also update ipv6 test to test this feature Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-01server/config: fix md5ed ipv6 active connectionISHIDA Wataru
Local address of md5ed active connection was hard-coded as "0.0.0.0". Let's set appropriate default local address (0.0.0.0 or ::) in SetDefaultConfigValues() and clean up (*FSM).connectLoop() instead of ad-hoc connectLoop() fix. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-01test: test go example embeded in documentISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-06-01docs: another update for lib.mdISHIDA Wataru
fix 9f6b62a5e5abcebde0008b56edcb8f40bd762d52 [skip ci] Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-31server: avoid sending unnecessary udate messages with soft_reset_in for ↵FUJITA Tomonori
route server The current code sets a path to table.POLICY_DIRECTION_NONE, which is still rib's knowPathList. Next time the best path selection happens, the path is moved to oldKnownPathList and wrongly the best path selection code could assume that it was the old best path, and sends an unnecessary update message. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-31test: check (*Path).Equal() is working correctlyISHIDA Wataru
test ebb2c9727a4002ab1b90d43485caf9b30937f372 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-31docs: update lib.mdISHIDA Wataru
[skip ci] Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-31table: fix creation of update message from path with multiple NLRIsFUJITA Tomonori
Fix a bug that gobgp creates a wrong update message from path having MP_REACH with multiple NLRIs. gobgp always allocates a path per NRLI (that is, multiple paths from an update message having MP_REACH with multiple NLRIs). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-31cli: fix converting api.PathFUJITA Tomonori
The current code wrongly converts a single api.Path to multiple local path strcutures if api.Path has MP_REACH with multiple NLRIs. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-29table: use path Equal method in adj rather than homegrown funcitonFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-29table: fix to compare new best path with old best pathFUJITA Tomonori
The current code uses Path.Equal(), which just check out if pathes are idential. However, it doesn't work for two cloned pathes of a path (soft update in case). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-29Revert "table: fix to compare new best path with old best path"FUJITA Tomonori
This reverts commit 74c0527dda13032dabd5dd4b7034115827fd2a46. Fix this in a different way.
2016-05-29table: make clear function to sort pathsFUJITA Tomonori
We want to check out if two pointers are same or different here. Make the code clear. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-29docs: fix typos in cli examplesFUJITA Tomonori
[ci skip] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-29table: fix to compare new best path with old best pathFUJITA Tomonori
The current code uses Path.Equal(), which just check out if pathes are idential. However, it doesn't work for two cloned pathes of a path (soft update in case). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-28config: handle entry's empty nameFUJITA Tomonori
Equal method assumes that an each entry has unique name and uses it as a key for map. However, currently, an entry is allowed to have an empty name. To work around the problem, uses an index in the list as a key for map. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-28config: fix misuse of pointersFUJITA Tomonori
Equal method for map misuses a pointer; all the entry of the map becomes idential. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-26policy: add support setting self ip address as next-hopISHIDA Wataru
from configuration file [policy-definitions.statements.actions.bgp-actions] set-next-hop = "self" from cli $ gobgp policy statement stmt1 add action next-hop self Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-26bgp: check buf length before parsing graceful-restart capabilityISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-26bgp: return NewMessageError instead of fmt.ErrorfISHIDA Wataru
to send a notification to the peer, we must return NewMessageError, not fmt.Errorf Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-26docs: update go versionsFUJITA Tomonori
[ci skip] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-25policy: add local-pref actionISHIDA Wataru
$ gobgp policy statement st01 add action local-pref 110 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23add collector featureFUJITA Tomonori
dump the update messages and the state change of peers into influxdb: [collector.config] url = "http://localhost:8086" db-name = "gobgp" Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-23server/table: fix intra-AS RTC route distributionISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23table: fix UpdatePathAttrs() to obey RFC4684ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23policy: apply export-policy after normal path-attribute updatesISHIDA Wataru
fix incomplete 42ab0376359f1ee378958b7ae37eaf8fbc7a811b Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23vrf: fix rtc withdraw handlingISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23server: improve log messageISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23server: add missing call of processOutgoingPaths()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-23server: handle grpc Serve() errorFUJITA Tomonori
Serve() returns when accept() failed. After that, gobgp stop listening on grpc port (no more grpc request). This patch makes sure that gobgp starts listening on grpc port again. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-21policy: apply export-policy after normal path-attribute updatesISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-21cli: include route-reflector/route-server infomation in Peer messageISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-20server: fix connectLoop() select loop not to blockISHIDA Wataru
connect() blocks MIN_CONNECT_RETRY-1 (= 9sec) at most. If a passive connection comes, establish BGP sessions, then BGP sesions goes down right after that (this can happen when the peer sent invalid update messages etc..) while connect() is blocking, FSM.StateChange(), which writes to fsm.getActiveCh can also block. This leads to block the main goroutine in server.go. This commit fix the issue by invoking a goroutine for connect() each time. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-20server: fix connectLoop() goroutine leakISHIDA Wataru
While Connect() is proceeding, fsm can be stopped administratively. In this case, after success of Connect(), no one is reading fsm.connCh, so connectLoop() goroutine can be leaked. This commit fix this issue. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-20server: make active md5ed socket nonblockingISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-20server: stringify FSM state in log messagesISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-19server: return flowspec routes in rfc compliant mannerISHIDA Wataru
The order of the flowspec routes matters because they will be used as ACL rules and what rule will be applied depends on the order. RFC5575 specifies how flowspec routes should be sorted. This commit implements what it says. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-18packet/bgp: add error handling in flowSpecIpProtoParser()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-18packet: add MarshalJSON method for FlowSpecUnknown structISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-18packet/bgp: refactor flowspec AFI(), SAFI() methodsISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-18packet/bgp: check flowspec nlri type orderingISHIDA Wataru
RFC5575 says, Flow specification components must follow strict type ordering. A given component type may or may not be present in the specification, but if present, it MUST precede any component of higher numeric type value. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-18server: fix socket leak in DialTCPTimeoutWithMD5Sig()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-17server: fix wrong usage of zapiISHIDA Wataru
sending REDISTRIBUTE_DEFAULT_ADD command causes getting every routes zebra has which is not desirable behavior Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-17tools: support loading completion scripts when bash boots upISHIDA Wataru
[ci skip] Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-17zebra: make zebra config consistent with the restsFUJITA Tomonori
- split config and state - move to Bgp structure (aligned with Rpki, Bmp, and Mrt) Also makes zebra configured via GRPC channel. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-16docs: update policy.mdISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-16server: fix a bug in handleGrpcGetPolicyAssignment()ISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-16cli: fix med formatingISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-16docs: add yabgp testing to evpnPeng Xiao
Signed-off-by: Peng Xiao <xiaoquwl@gmail.com>