diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2020-03-04 17:21:54 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-17 23:07:11 -0600 |
commit | b33219c2cfd430215f2230c15fc4c2f888a081c2 (patch) | |
tree | 433a7a694c35270e239d3705140b49c97d862052 /tun | |
parent | 9cbcff10dd3e04671d31ab224526f3d22a7ba665 (diff) |
global: use RTMGRP_* consts from x/sys/unix
Update the golang.org/x/sys/unix dependency and use the newly introduced
RTMGRP_* consts instead of using the corresponding RTNLGRP_* const to
create a mask.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'tun')
-rw-r--r-- | tun/tun_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tun/tun_linux.go b/tun/tun_linux.go index 36b43ea..7ab0623 100644 --- a/tun/tun_linux.go +++ b/tun/tun_linux.go @@ -85,7 +85,7 @@ func createNetlinkSocket() (int, error) { } saddr := &unix.SockaddrNetlink{ Family: unix.AF_NETLINK, - Groups: uint32((1 << (unix.RTNLGRP_LINK - 1)) | (1 << (unix.RTNLGRP_IPV4_IFADDR - 1)) | (1 << (unix.RTNLGRP_IPV6_IFADDR - 1))), + Groups: unix.RTMGRP_LINK | unix.RTMGRP_IPV4_IFADDR | unix.RTMGRP_IPV6_IFADDR, } err = unix.Bind(sock, saddr) if err != nil { |