Age | Commit message (Collapse) | Author |
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
|
|
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
|
|
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
When regenerating the `*.pb.go` file, we get many tests failing
because testify is using `reflect.DeepEqual()` under the hood. There
is no option to have a custom comparison function and currently, the
only way around is to use `proto.Equal()` to compare protobuf
messages. The downside of using `proto.Equal()` is that we loose the
expected/actual display in case of a mismatch.
When comparing family, we compare `Api`/`Sapi` in separate asserts
instead of using `proto.Equal()`.
Fix: #1952
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
Signed-off-by: Faicker Mo <faicker.mo@ucloud.cn>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
faster and less memory usage.
Now go-radix has gone.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
faster and less memory usage.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
There is no duplication of local id in the rib.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
faster and less memory usage.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
The Reset method was difficult to understand. The reason is that it
was called in three different ways and did different things in each
case. It is easier to read when the three different modes are each
their own method.
This came up as I was looking deeper into the threading model around
policies. I think this change makes it easier to understand the code.
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
As the name implies, table/ is more appropriate for roa table code.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
The unittest on pkg/server finishes quicker.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
|
|
This just defers the read lock over some of the code that doesn't
inspect or modify any RoutingPolicy data. It allows the early returns
to happen without ever taking the read lock.
|
|
The best way to ensure that a lock will always get unlocked is to
defer the unlock immediately after locking. Otherwise, adding a return
statement in the middle somewhere *could* result in forgetting to
release the lock. One of these two cases has that.
This technique uses an anonymous function/closure within the larger
method to confine the scope of the lock and ensure that it will be
unlocked in every case.
|
|
Fixes LLGR community cleared on softreset.
Fixes AS Path looped routes added back to rib on Graceful Restart.
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
rib and adj-in use the same data strcutures. Needs more clean up.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
currently, validate is executed even if the result is not necessary.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
Reloading the config file on SIGHUP is behavior specific to gobgpd.
Attempts to expose it through the config API was awkward and could
make the api more confusing to use. This change moves that
functionality up into the gobgpd main and out of the library.
|
|
|
|
Fix a bug that the same path id is assigned to two paths. The bug
happens in the following way:
1. a new path is assigned to a local path id.
2. an import policy dropping the path from the master rib is added and
execute softreset in.
3. the path still exists in the adj but doesn't in the master. the
path id was freed (marked as unused).
5. a new path with the same prefix comes from another peer. The same
id is assigned to the new path.
6 deleted the policy and execute softreset in.
7 there are two paths in the master with the same path id.
This path guarantees that only when a path is removed in the adj, the
id for path is freed.
Note that this doesn't fatten Path strcuture, which should be avoided
for any reason.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
when a peer is down, use paths in its adj table instead of searching
for the global table.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
This fixes a bug that the duplicated AFI is configured with the peer
group. OverwriteNeighborConfigWithPeerGroup() appends the peer group's
AFI configuration to the existing one instead overwriting.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
- Additionally bug fix which avoid panic caused by displaying vpnv6 prefixes using gobgp vrf rib
- Supporting FRRouting 7.1.x
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
using syscall SO_BINDTODEVICE
|
|
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|
|
|
|
|
|
syscall.AF_INET/AF_INET6 are os/architecture specific. On some non
Linux x86 architectures, failures like the following happen:
--- FAIL: Test_NexthopRegisterBody (0.00s)
Error Trace: zapi_test.go:893
Error: Not equal: 0x1e (expected)
!= 0xa (actual)
Error Trace: zapi_test.go:894
Error: Not equal: net.IP{0x20, 0x1, 0xd, 0xb8, 0x0, 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1} (expected)
!= net.IP(nil) (actual)
Diff:
--- Expected
+++ Actual
@@ -1,2 +1,2 @@
-(net.IP) (len=16 cap=16) 2001:db8:1:1::1
+(net.IP) <nil>
looks like that frr uses os/os/architecture specific values in the
zapi message.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
|