205 Commits

Author SHA1 Message Date
Florian Lehner
a833fb5b68
add netlink/rule (#139)
* add netlink/rule

Signed-off-by: Florian Lehner <dev@der-flo.net>

* Add some fuzzing corpus

Signed-off-by: Jeroen Simonetti <jeroen@simonetti.nl>

Co-authored-by: Jeroen Simonetti <jeroen@simonetti.nl>
v1.2.0
2022-04-12 09:00:30 +02:00
James Tucker
d380b50506
rtnetlink: add address label encoding (#138)
Signed-off-by: James Tucker <jftucker@gmail.com>
2022-04-08 16:16:09 -04:00
Matt Layher
3f746d924b
rtnetlink: support for RTA_PREF (#137)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
v1.1.1
2022-03-13 18:00:51 +01:00
dependabot[bot]
e899fd5417
build(deps): bump github.com/cilium/ebpf from 0.8.0 to 0.8.1 (#136)
Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/cilium/ebpf/releases)
- [Commits](https://github.com/cilium/ebpf/compare/v0.8.0...v0.8.1)

---
updated-dependencies:
- dependency-name: github.com/cilium/ebpf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-15 08:25:45 +01:00
dependabot[bot]
6f5b781fda
build(deps): bump github.com/mdlayher/netlink from 1.5.0 to 1.6.0 (#135)
* build(deps): bump github.com/mdlayher/netlink from 1.5.0 to 1.6.0

Bumps [github.com/mdlayher/netlink](https://github.com/mdlayher/netlink) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/mdlayher/netlink/releases)
- [Changelog](https://github.com/mdlayher/netlink/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mdlayher/netlink/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/mdlayher/netlink
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* drop support for Go 1.12

Signed-off-by: Jeroen Simonetti <jeroen@simonetti.nl>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jeroen Simonetti <jeroen@simonetti.nl>
v1.1.0
2022-01-31 10:55:51 +01:00
dependabot[bot]
bbb52d4485
build(deps): bump github.com/cilium/ebpf from 0.7.0 to 0.8.0 (#133)
Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/cilium/ebpf/releases)
- [Commits](https://github.com/cilium/ebpf/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: github.com/cilium/ebpf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
v1.0.0
2022-01-24 10:06:37 +01:00
dependabot[bot]
7da449da84
build(deps): bump github.com/google/go-cmp from 0.5.6 to 0.5.7 (#132)
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.6...v0.5.7)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-20 12:29:51 +01:00
dependabot[bot]
9dff439f7e
build(deps): bump github.com/mdlayher/netlink from 1.4.2 to 1.5.0 (#130)
Bumps [github.com/mdlayher/netlink](https://github.com/mdlayher/netlink) from 1.4.2 to 1.5.0.
- [Release notes](https://github.com/mdlayher/netlink/releases)
- [Changelog](https://github.com/mdlayher/netlink/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mdlayher/netlink/compare/v1.4.2...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/mdlayher/netlink
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-13 05:16:34 +01:00
dependabot[bot]
fd9a11f422
build(deps): bump github.com/mdlayher/netlink from 1.4.1 to 1.4.2 (#129)
Bumps [github.com/mdlayher/netlink](https://github.com/mdlayher/netlink) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/mdlayher/netlink/releases)
- [Changelog](https://github.com/mdlayher/netlink/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mdlayher/netlink/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: github.com/mdlayher/netlink
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-03 08:41:27 +01:00
Matt Layher
93da338047
rtnetlink: Go 1.17 build tags, fix example build tags (#128)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2021-10-22 21:23:32 +02:00
dependabot[bot]
e34540a94c
build(deps): bump github.com/cilium/ebpf from 0.6.2 to 0.7.0 (#127)
Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.6.2 to 0.7.0.
- [Release notes](https://github.com/cilium/ebpf/releases)
- [Commits](https://github.com/cilium/ebpf/compare/v0.6.2...v0.7.0)

---
updated-dependencies:
- dependency-name: github.com/cilium/ebpf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-11 09:20:24 +02:00
Jeroen Simonetti
435639c8e6
Update go-test.yml 2021-09-22 10:00:37 +02:00
Jeroen Simonetti
a71c5dabed
Update go-test.yml 2021-09-22 10:00:21 +02:00
Matt Layher
4cc3c14895
rtnetlink: tidy IP address encoding/decoding, fix attribute error handling (#125)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2021-07-21 22:56:14 +02:00
Matt Layher
af39de65d6
rtnetlink: make AddressMessage.Attributes optional via pointer (#124)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2021-07-14 15:52:44 +02:00
Matt Layher
5ecc0c63ac
rtnetlink: expose Conn.SetOption from underlying netlink.Conn (#123)
Signed-off-by: Matt Layher <mdlayher@gmail.com>

Co-authored-by: Jeroen Simonetti <jsimonetti@users.noreply.github.com>
2021-07-14 15:25:21 +02:00
Matt Layher
f05e8793e9
rtnetlink: remove outdated Go version warning on Conn.SetReadDeadline (#122)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2021-07-14 15:23:27 +02:00
dependabot[bot]
2bfdf1dbdb
build(deps): bump github.com/cilium/ebpf from 0.6.1 to 0.6.2 (#120)
Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.6.1 to 0.6.2.
- [Release notes](https://github.com/cilium/ebpf/releases)
- [Commits](https://github.com/cilium/ebpf/compare/v0.6.1...v0.6.2)

---
updated-dependencies:
- dependency-name: github.com/cilium/ebpf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-13 14:55:58 +02:00
dependabot[bot]
9c52e516c7
build(deps): bump github.com/cilium/ebpf from 0.6.0 to 0.6.1 (#119)
Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/cilium/ebpf/releases)
- [Commits](https://github.com/cilium/ebpf/compare/v0.6.0...v0.6.1)

---
updated-dependencies:
- dependency-name: github.com/cilium/ebpf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-14 07:38:35 +02:00
dependabot[bot]
b34cb89a10
build(deps): bump github.com/cilium/ebpf from 0.5.0 to 0.6.0 (#118)
Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/cilium/ebpf/releases)
- [Commits](https://github.com/cilium/ebpf/compare/v0.5.0...v0.6.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-31 07:13:04 +02:00
Matt Layher
230f0ae92c
Merge pull request #117 from jsimonetti/dependabot/go_modules/github.com/mdlayher/netlink-1.4.1
build(deps): bump github.com/mdlayher/netlink from 1.4.0 to 1.4.1
2021-05-27 07:01:58 -04:00
dependabot[bot]
adce989a18
build(deps): bump github.com/mdlayher/netlink from 1.4.0 to 1.4.1
Bumps [github.com/mdlayher/netlink](https://github.com/mdlayher/netlink) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/mdlayher/netlink/releases)
- [Changelog](https://github.com/mdlayher/netlink/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mdlayher/netlink/compare/v1.4.0...v1.4.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-27 04:08:02 +00:00
dependabot[bot]
4cc8365781
build(deps): bump github.com/google/go-cmp from 0.5.5 to 0.5.6 (#116)
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.5 to 0.5.6.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.5...v0.5.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-25 07:15:24 +02:00
dependabot[bot]
9561dc9288
build(deps): bump github.com/cilium/ebpf from 0.4.0 to 0.5.0 (#115)
Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/cilium/ebpf/releases)
- [Commits](https://github.com/cilium/ebpf/compare/v0.4.0...v0.5.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-09 08:14:57 +02:00
dependabot[bot]
1a839d530e
build(deps): bump github.com/cilium/ebpf from 0.3.0 to 0.4.0 (#114)
Bumps [github.com/cilium/ebpf](https://github.com/cilium/ebpf) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/cilium/ebpf/releases)
- [Commits](https://github.com/cilium/ebpf/compare/v0.3.0...v0.4.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-19 07:51:42 +01:00
Francis Begyn
97e6deb670
Patch LinkXDP data types and encoding behavior (#113)
LinkXDP was using uint32 datatypes for the file desriptor fields, but this
makes it so you're unable to clear or send correct netlink message. It was also
always encoding all fields, while the rtnetlink API was not expecting this.

don't encode XDP_ATTACHED and XDP_PROG_ID fields: https://elixir.bootlin.com/linux/v5.10.15/source/net/core/rtnetlink.c#L2894
use int32 for FD and EXPECTED_FD fields: https://elixir.bootlin.com/linux/v5.10.15/source/net/core/rtnetlink.c#L1924

The PR patches the fields and encoding behavior to resolve this conflict.

Signed-off-by: Francis Begyn <francis@begyn.be>
2021-03-07 21:38:07 +01:00
Matt Layher
d339008f51
Merge pull request #112 from jsimonetti/dependabot/go_modules/github.com/google/go-cmp-0.5.5
build(deps): bump github.com/google/go-cmp from 0.5.4 to 0.5.5
2021-03-05 00:27:59 -05:00
dependabot[bot]
e8ef8aa995
build(deps): bump github.com/google/go-cmp from 0.5.4 to 0.5.5
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.4...v0.5.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-05 04:24:22 +00:00
Jeroen Simonetti
1b79e63a70
Update go-test.yml (#111) 2021-02-26 13:06:01 +01:00
Matt Layher
8d57088c39
Merge pull request #110 from jsimonetti/ec95dependabot/go_modules/github.com/mdlayher/netlink-1.4.0
build(deps): bump github.com/mdlayher/netlink from 1.3.2 to 1.4.0
2021-02-24 10:21:00 -05:00
dependabot[bot]
1dc8d0571b
build(deps): bump github.com/mdlayher/netlink from 1.3.2 to 1.4.0
Bumps [github.com/mdlayher/netlink](https://github.com/mdlayher/netlink) from 1.3.2 to 1.4.0.
- [Release notes](https://github.com/mdlayher/netlink/releases)
- [Changelog](https://github.com/mdlayher/netlink/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mdlayher/netlink/compare/v1.3.2...v1.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-24 04:21:43 +00:00
Matt Layher
952e2786bf
Merge pull request #109 from jsimonetti/7a22dependabot/go_modules/github.com/mdlayher/netlink-1.3.2
build(deps): bump github.com/mdlayher/netlink from 1.3.1 to 1.3.2
2021-02-23 08:50:33 -05:00
dependabot[bot]
6a300cd349
build(deps): bump github.com/mdlayher/netlink from 1.3.1 to 1.3.2
Bumps [github.com/mdlayher/netlink](https://github.com/mdlayher/netlink) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/mdlayher/netlink/releases)
- [Changelog](https://github.com/mdlayher/netlink/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mdlayher/netlink/compare/v1.3.1...v1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-23 04:22:41 +00:00
Matt Layher
d96e01069e
Merge pull request #108 from jsimonetti/d1badependabot/go_modules/github.com/mdlayher/netlink-1.3.1
build(deps): bump github.com/mdlayher/netlink from 1.3.0 to 1.3.1
2021-02-22 07:38:23 -05:00
dependabot[bot]
f90fe84435
build(deps): bump github.com/mdlayher/netlink from 1.3.0 to 1.3.1
Bumps [github.com/mdlayher/netlink](https://github.com/mdlayher/netlink) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/mdlayher/netlink/releases)
- [Changelog](https://github.com/mdlayher/netlink/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mdlayher/netlink/compare/v1.3.0...v1.3.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-22 04:24:07 +00:00
Jeroen Simonetti
66c871082f
Update dependabot.yml 2021-02-12 08:51:22 +01:00
Jeroen Simonetti
a4fa26e24a
build(deps): use github integrated dependabot (#106)
Signed-off-by: Jeroen Simonetti <jeroen@simonetti.nl>
2021-02-12 08:39:17 +01:00
Matt Layher
7bdbce9dae
Merge pull request #105 from jsimonetti/dependabot/go_modules/github.com/mdlayher/netlink-1.3.0
build(deps): bump github.com/mdlayher/netlink from 1.2.1 to 1.3.0
2021-02-11 06:53:31 -05:00
dependabot-preview[bot]
2dc4abb795
build(deps): bump github.com/mdlayher/netlink from 1.2.1 to 1.3.0
Bumps [github.com/mdlayher/netlink](https://github.com/mdlayher/netlink) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/mdlayher/netlink/releases)
- [Changelog](https://github.com/mdlayher/netlink/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mdlayher/netlink/compare/v1.2.1...v1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-11 04:39:39 +00:00
Matt Layher
8d122574c7
rtnetlink: add RouteMetrics.InitRwnd field (#104)
Signed-off-by: Matt Layher <mlayher@fastly.com>
2021-01-22 17:32:28 +01:00
Matt Layher
c676dcb476
rtnetlink: add encodeIP netlink attribute IP address helper (#98)
Signed-off-by: Matt Layher <mlayher@fastly.com>
2021-01-19 16:41:33 +01:00
Matt Layher
b7bc036d52
Merge pull request #103 from jsimonetti/dependabot/go_modules/github.com/mdlayher/netlink-1.2.1
build(deps): bump github.com/mdlayher/netlink from 1.2.0 to 1.2.1
2021-01-14 23:58:41 -05:00
dependabot-preview[bot]
8e6f7c05f3
build(deps): bump github.com/mdlayher/netlink from 1.2.0 to 1.2.1
Bumps [github.com/mdlayher/netlink](https://github.com/mdlayher/netlink) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/mdlayher/netlink/releases)
- [Changelog](https://github.com/mdlayher/netlink/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mdlayher/netlink/compare/v1.2.0...v1.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-01-15 04:41:53 +00:00
Matt Layher
69540ac939
go.mod: bump github.com/mdlayher/netlink and golang.org/x/sys (#102)
Signed-off-by: Matt Layher <mlayher@fastly.com>
2020-12-20 19:02:45 +01:00
Julian Kornberger
bde56ed163
Cleanup (#94)
* Clean up code and remove code duplication
* Apply gofmt

Signed-off-by: Julian Kornberger <jk+github@digineo.de>
2020-12-16 14:43:43 +01:00
Seán C. McCord
8a8c0ddd67
feat: support multiple matching routes (#100)
* feat: support multiple matching routes

Adds support for returning multiple matching routes for rtnl.

Fixes #99

Signed-off-by: Seán C McCord <ulexus@gmail.com>

* Fixing style errors.

Co-authored-by: stickler-ci <support@stickler-ci.com>
2020-12-06 12:37:23 +01:00
Jeroen Simonetti
8bebea019a
Merge pull request #97 from jsimonetti/dependabot/go_modules/github.com/google/go-cmp-0.5.4
build(deps): bump github.com/google/go-cmp from 0.5.3 to 0.5.4
2020-11-25 09:04:24 +01:00
dependabot-preview[bot]
11d7545317
build(deps): bump github.com/google/go-cmp from 0.5.3 to 0.5.4
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.3 to 0.5.4.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.3...v0.5.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-25 04:47:55 +00:00
Jeroen Simonetti
9af4a03067
Merge pull request #96 from jsimonetti/mdl-mpls
rtnetlink: implement MPLSNextHop encoding and decoding
2020-11-19 10:57:10 +01:00
Matt Layher
beb2a7965b
internal/unix: fix Mac build
Signed-off-by: Matt Layher <mlayher@fastly.com>
2020-11-18 15:30:48 -05:00