Age | Commit message (Collapse) | Author |
|
https://github.com/golang-standards/project-layout
Now you can see clearly what are private and public library code.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
move grpc_server.go to server/
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This is a part of work removing table/ usage in api/. api/ will depend
on only protobuf stuff and packet/.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
|
|
In case that GoBGP is used as Go native library, calling os.Exit() can
cause unexpected termination including application which uses GoBGP.
This patch removes calls of os.Exit() derived from BgpServer.Shutdown().
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
|
|
|
|
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
fix a bug that doesn't return validation results at all.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
|
|
We should do stricter validation. Probably, we should use
packet/bgp/validate.go.
close #1660
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
The dampening feature was implemented to delay the update of nexthop
states in order to avoid the states are "extremely" frequent updated.
But with this implementation, if a path is withdrawn by peer or via API
which the dampening feature delaying the update of that path, the
withdrawn path can be restored unexpectedly again.
And currently Quagga and FRRouting does not support the dampening, this
path drops the dampening feature to avoid this problem.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
update accepted number in adj-in rib after AllowOwnAs has changed.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
fix accepted number in adj-in rib when it has an as-looped path.
adding another member to Path struct is pain. Should be fixed later.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
The outgoing Route Target Constraint filter should be applied to eBGP
session, but currently applied to only iBGP session.
This patch fixes to apply rtfilter on eBGP session.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
In case that a Route Reflector(RR) and a non RR client peering, peering
of different RR clusters for example, the RR should send the RTC route
from its client even if the RTC route from non RR client is better path
based on the best path algorithm in order to notify that some RR clients
are interested in the given Route Target.
Currently, only source peer address is concerned, the RTC route from RR
client can have lower priority than non RR client and it can not be
advertised.
This patch fixes to prefer the route from RR client when selecting the
candidate to be advertised.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
To include the PeerDownReason and data in BMP messages,
this commit adds some field to WatchEventPeerState.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
If capabilities are added or removed by updating peer configs,
it is needed to resend Open Message contains the new capabilities.
But currently, GoBGP does not resend Open Message for
Add-Path and Graceful Restart capabilities.
This commit fixes it to resend Open Message for them.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Because the RTM is removed from adj-RIB-in before collecting the
candidate routes to be withdrawn, the candidates are unexpectedly
filtered before sending withdraw messages. Then on the peers, the VPN
routes are left on.
This patch fixes to selects candidates from the filtered paths and send
withdraw messages as expected. Also resolves the TODO in
"test/scenario_test/rtc_test.py".
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Needs withdrawn paths that includes attributes. The attributes are
necessary because they are used with rtc table to check if the paths
were sent.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Currently, GoBGP sends the ROUTE_DELETE messages to Zebra for the paths
whose nexthop was determined as unreachable by IGP, but when Zebra
received the ROUTE_DELETE messages for the unreachable nexthop, Zebra
will send the NEXTHOP_UPDATE message with the given nexthop is
reachable via the default interface. This message unexpectedly causes
updates of the unreachable path to be reachable (not true though). Then
GoBGP will send ROUTE_ADD messages to Zebra, but those paths soon will
be invalidated via the NEXTHOP_UPDATE message, GoBGP will send the
ROUTE_DELETE messages and ... (infinite loop).
This patch fixes to avoid sending the ROUTE_DELETE messages for the
unreachable paths because those paths are inactivated on Zebra and not
installed to FIB.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
This fixes an issue where GoBGP would incorrectly defer sending routes to a peer on a graceful restart.
RFC4724 states:
> Once the session between the Restarting Speaker and the Receiving
> Speaker is re-established, the Restarting Speaker will receive and
> process BGP messages from its peers. However, it MUST defer route
> selection for an address family until it either (a) receives the
> End-of-RIB marker from all its peers (excluding the ones with the
> "Restart State" bit set in the received capability and excluding the
> ones that do not advertise the graceful restart capability) or (b)
> the Selection_Deferral_Timer referred to below has expired.
The scenario that this fixes is where you have 3 (or more) peers, and 2 of the peers ("A" and "B") perform a graceful restart at the same time, but the 3rd ("C") does not. If after restart peer C sends EOR to peer A before peer B reaches BGP_FSM_ESTABLISHED with peer A, it defers the route selection. However once peer B does reach BGP_FSM_ESTABLISHED, peer A still wouldn't send any updates to peer C until the deferral expired.
This commit changes the behavior so that upon restart, once the peer receives EOR from all non-restarting peers and reaches BGP_FSM_ESTABLISHED for all restarting peers, the routes are sent to all peers.
|
|
close #1661
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
For reloading locally generated routes by using MRT dump file, this
patch enables to include locally generated routes into TABLE_DUMPv2
records.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
We had to serialize all the paths once because the paths could be
modified later. Now they are immutable so we don't need.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Now you can read Path objects in rib safely. Nobody modifies
them. GetRib() API doesn't need to clone the objects. With full
routes, this avoid allocating temporary huge memory.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
save about 100MB memory.
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>
|
|
A path object in the adj-in is also in the master rib. We can't update
such.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Shrink memory usage.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
https://github.com/osrg/gobgp/issues/1249
The IN policy was removed. The modification by the IMPORT policy are
visible to all route server peers.
This saves some dozens bytes memory per a path.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
|
|
RFC4724(Graceful Restart) says that if "Restart State" bit is set
in the Open message, its peer must not wait for the EoR marker
from the speaker before advertising routing information to the speaker.
But currently, GoBGP waits EoR even if "Restart State" bit is set
in graceful restart process.
This commit fixes it to skipping syncing process for the
restarting peers.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
Currently, the result of Route Target Constraint filter is unexpectedly
ignored when Route Reflector reflecting the VPN routes because "ignore"
flag can be overwritten without evaluated.
This patch fixes to return "nil" before "ignore" flag overwritten and
enable to filter outgoing VPN routes based on RTC.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
When GoBGP dropped adj-Rib-out per Peer, we fixed to send the same Route
Target Membership (RTM) NLRI even if it is already sent. This can cause
the infinite UPDATE loop when Route Reflector(RR) reflects RTM NLRI to
its clients.
For example, the following situation causes the infinite UPDATE loop.
Topology:
+----- RR -----+
| |
Client1 Client2
When Client1 has VRF with RT 65000:1 and sends a RTM NLRI to RR, then RR
reflects the NLRI to Client2. If a new VRF with the same RT 65000:1 on
Client2 is created, Client2 will notify it to RR, then RR calculates the
best, but RR will send the NLRI from Client2 to Client1 even if it is
not the best. Client1 receives the NLRI again, calculates the best and
re-sends the best. Then, RR reflects the received NLRI ... (infinite
loop).
This patch fixes to compare the candidate path to be sent with the old
path and assume the given candidate path was already sent before if the
candidate path and the old path is the same path. Then avoids the
infinite UPDATE loop.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
The typo in function Less() was causing logical error during comparison
and the comparison would always return whether AS number was less or not
regardless of Maxlen.
fixes #1633
|
|
This patch adds getter functions for the segment type and AS list of
each segment without using type assertion.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
|
|
Currently, globalRib is always set to dynamic neighbors
even if they are route server clients.
This patch fixes to set rsRib when the neighbor is
a route server client.
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
|
|
When neighbor had AddPath capability, then disable AddPath after that. Old marshallingOptions remains. So once neighbor enabled AddPath it can't be disabled with no AddPath capability option in Open Message.
|