summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg
AgeCommit message (Collapse)Author
2020-04-26Refactoring Zebra and supporting frr7.3Hitoshi Irino
- Change const values to camel case from snake case to make zero golint's warnigns - Introduce convert functions (toEach, toCommon) between the newest version to older versions - Merge code about decode nexthop to reduce lines of code - Add frr7.3 statemet in allowable software for config - Rename and Update generated file by stringer
2020-04-24Add BGP-LS SRLG supportTom Shine
2020-04-01v2.15.0FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2020-03-11fixed style: unnecessary type cast after type switch and some minor issues.Sergey Elantsev
2020-03-02v2.14.0FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2020-02-19add support GetTable method for vrfs #2235Pavel Vorontsov
2020-02-08fix panic in Family == nilSerguei Bezverkhi
Signed-off-by: Serguei Bezverkhi <sbezverk@cisco.com>
2020-02-01v2.13.0FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2020-01-18bug fix in zebra integration for frr7.2Hitoshi Irino
2020-01-13Supporting FRR7.2Hitoshi Irino
2020-01-01v2.12.0FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-12-15tests: fix failing tests when using more recent versions of protobufVincent Bernat
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
2019-12-02v2.11.0FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-11-01v2.10.0FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-11-01config: peer groups support ebgp multihopFaicker Mo
Signed-off-by: Faicker Mo <faicker.mo@ucloud.cn>
2019-10-26table: handle staticcheck's warningsFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-10-26avoid installing routes with originator ID to global when softresetinFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-10-25table: replace radix with crit-bit algo for longer-prefixes searchFUJITA Tomonori
faster and less memory usage. Now go-radix has gone. Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-10-25table: replace radix with crit-bit algo for policyFUJITA Tomonori
faster and less memory usage. Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-10-25table: remove unnecessary code in UpdateAdjRibOut()FUJITA Tomonori
There is no duplication of local id in the rib. Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-10-25table: replace radix with crit-bit algo for roaFUJITA Tomonori
faster and less memory usage. Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-10-23Split Reset into three methodsCarl Baldwin
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.
2019-10-22table: use net.IPNet for roa instead of homegrown IPPrefix structureFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-10-22move roa table code to table/ from server/FUJITA Tomonori
As the name implies, table/ is more appropriate for roa table code. Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-10-21server: speed up session establishmentFUJITA Tomonori
The unittest on pkg/server finishes quicker. Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-10-18need to reset session when gr config is changedFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-10-18Fix adj-out display with add path enabledmageshgv
2019-10-15Avoid locking in cases that return immediatelyCarl Baldwin
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.
2019-10-15Keep Lock and defer Unlock togetherCarl Baldwin
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.
2019-10-02Update adjrib for LLGR and preserve aslooped attrMagesh GV
Fixes LLGR community cleared on softreset. Fixes AS Path looped routes added back to rib on Graceful Restart.
2019-10-01v2.9.0FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-09-26table: add NewSingleAsPathMatch unittestFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-09-23table: fix SingleAsPathMatch pre compiled patternTatsushi Demachi
2019-09-17table: add more tests for adjFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-09-17table: implement adj-in table use routing table structuresFUJITA Tomonori
rib and adj-in use the same data strcutures. Needs more clean up. Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-09-12table: improve table.Info for global ribFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-09-08execute rpki validation for policy only when it's necessaryFUJITA Tomonori
currently, validate is executed even if the result is not necessary. Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-09-01v2.8.0FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-08-28Move ReadConfigFileOnSighup to gobgpd mainCarl Baldwin
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.
2019-08-28Allow simple one-shot reading of the config fileCarl Baldwin
2019-08-27fix duplicated local path id bugFUJITA Tomonori
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>
2019-08-27table: delete unused deleteDestByNlri()FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-08-26table: remove unused validation in originInfo structFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-08-26table: kill GetPathListByPeer()FUJITA Tomonori
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>
2019-08-21Support connecting zebra of cumulus linuxHitoshi Irino
2019-08-01v2.7.0FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-07-26fix PeerGroup AFI handlingFUJITA Tomonori
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>
2019-07-21Avoid panic by receiving vpnv6 prefixes with zebra reported in issue #2113Hitoshi Irino
- Additionally bug fix which avoid panic caused by displaying vpnv6 prefixes using gobgp vrf rib - Supporting FRRouting 7.1.x
2019-07-12use tha standard comment for machine-generated filesFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
2019-07-02BGP connection on a speecified interface (including which is associated VRF) ↵Hitoshi Irino
using syscall SO_BINDTODEVICE