Implement Netlink
With this commit i'm introducing the netlink protocol to read routes from the linux kernel routing table to the locRIB. This also adds the functionality to insert new routes to the linux kernel routing stack which where learned by other protocol (like e.g. BGP). This is done by the protocols/netlink/netlink.go object. The netlink.go file acts as an facade around the netlink_reader.go and netlink_writer.go. netlink_reader itself reads in a defined reding interval new routes from the kernel and propagates new routes to all subscribed clients. The netlink reader can also be filtered using the same filter-api as in adjRibIn/adjRibOut for BGP. To read new routes to the locRIB you have to register the locRIB to the netlink_reader using the ClientManager interface, just like you would register the locRIB to the adjRibIn. netlink_writer must be subscribed to the locRIB in order to write the routes from locRIB into the kernel. This useses the ClientManager interface, just like you would register the adjRibOut to the locRIB. netlink_writer itself currently does not support filters, since all routes form the locRIB should be written to the kernel. The filter functionality could be easily added here as well. The netlink_writer currently does not support ecmp. This is subject of an other commit. The current implementation could be considered as work in progress, but the code is mature enough to start a review on it.
Showing
- route/route_test.go 263 additions, 0 deletionsroute/route_test.go
- route/static.go 2 additions, 2 deletionsroute/static.go
- vendor/github.com/golang/dep/.codeclimate.yml 0 additions, 35 deletionsvendor/github.com/golang/dep/.codeclimate.yml
- vendor/github.com/golang/dep/.gitattributes 0 additions, 2 deletionsvendor/github.com/golang/dep/.gitattributes
- vendor/github.com/golang/dep/.github/CODEOWNERS 0 additions, 25 deletionsvendor/github.com/golang/dep/.github/CODEOWNERS
- vendor/github.com/golang/dep/.github/ISSUE_TEMPLATE.md 0 additions, 26 deletionsvendor/github.com/golang/dep/.github/ISSUE_TEMPLATE.md
- vendor/github.com/golang/dep/.github/PULL_REQUEST_TEMPLATE.md 0 additions, 23 deletions...or/github.com/golang/dep/.github/PULL_REQUEST_TEMPLATE.md
- vendor/github.com/golang/dep/.gitignore 0 additions, 10 deletionsvendor/github.com/golang/dep/.gitignore
- vendor/github.com/golang/dep/.travis.yml 0 additions, 87 deletionsvendor/github.com/golang/dep/.travis.yml
- vendor/github.com/golang/dep/AUTHORS 0 additions, 3 deletionsvendor/github.com/golang/dep/AUTHORS
- vendor/github.com/golang/dep/BUILD.bazel 0 additions, 25 deletionsvendor/github.com/golang/dep/BUILD.bazel
- vendor/github.com/golang/dep/CHANGELOG.md 0 additions, 122 deletionsvendor/github.com/golang/dep/CHANGELOG.md
- vendor/github.com/golang/dep/CODE_OF_CONDUCT.md 0 additions, 74 deletionsvendor/github.com/golang/dep/CODE_OF_CONDUCT.md
- vendor/github.com/golang/dep/CONTRIBUTING.md 0 additions, 109 deletionsvendor/github.com/golang/dep/CONTRIBUTING.md
- vendor/github.com/golang/dep/CONTRIBUTORS 0 additions, 3 deletionsvendor/github.com/golang/dep/CONTRIBUTORS
- vendor/github.com/golang/dep/Gopkg.lock 0 additions, 94 deletionsvendor/github.com/golang/dep/Gopkg.lock
- vendor/github.com/golang/dep/Gopkg.toml 0 additions, 37 deletionsvendor/github.com/golang/dep/Gopkg.toml
- vendor/github.com/golang/dep/LICENSE 0 additions, 27 deletionsvendor/github.com/golang/dep/LICENSE
- vendor/github.com/golang/dep/MAINTAINERS.md 0 additions, 17 deletionsvendor/github.com/golang/dep/MAINTAINERS.md
- vendor/github.com/golang/dep/PATENTS 0 additions, 22 deletionsvendor/github.com/golang/dep/PATENTS
Loading
Please register or sign in to comment