From b33219c2cfd430215f2230c15fc4c2f888a081c2 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 4 Mar 2020 17:21:54 +0100 Subject: 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 --- tun/tun_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tun/tun_linux.go') 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 { -- cgit v1.2.3