Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minimum Go version #201

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
// netlink traffic inside the kernel. Be aware that this might be overwhelming on a system
// with a lot of netlink traffic.
//
// # modprobe nlmon
// # ip link add type nlmon
// # ip link set nlmon0 up
// # modprobe nlmon
// # ip link add type nlmon
// # ip link set nlmon0 up
//
// At this point use wireshark or tcpdump on the nlmon0 interface to view all netlink traffic.
//
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/jsimonetti/rtnetlink

go 1.18
go 1.20

require (
github.com/cilium/ebpf v0.12.3
Expand Down
8 changes: 4 additions & 4 deletions link.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ func (l *LinkService) Get(index uint32) (LinkMessage, error) {
// ref: https://lwn.net/Articles/236919/
// We explicitly use RTM_NEWLINK to set link attributes instead of
// RTM_SETLINK because:
// - using RTM_SETLINK is actually an old rtnetlink API, not supporting most
// attributes common today
// - using RTM_NEWLINK is the prefered way to create AND update links
// - RTM_NEWLINK is backward compatible to RTM_SETLINK
// - using RTM_SETLINK is actually an old rtnetlink API, not supporting most
// attributes common today
// - using RTM_NEWLINK is the prefered way to create AND update links
// - RTM_NEWLINK is backward compatible to RTM_SETLINK
func (l *LinkService) Set(req *LinkMessage) error {
flags := netlink.Request | netlink.Acknowledge
_, err := l.c.Execute(req, unix.RTM_NEWLINK, flags)
Expand Down