summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2020-07-07 13:15:13 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-07-13 17:58:10 -0600
commit3c41141fb47781f5c7526662ef057c2aa3d71757 (patch)
tree842ba5af9d1254f25d5bd5a76bdad727249360f0
parentdevice: wait for routines to stop before removing peers (diff)
downloadwireguard-go-3c41141fb47781f5c7526662ef057c2aa3d71757.tar.xz
wireguard-go-3c41141fb47781f5c7526662ef057c2aa3d71757.zip
device: use RTMGRP_IPV4_ROUTE to specify multicast groups mask
Use the RTMGRP_IPV4_ROUTE const from x/sys/unix instead of using the corresponding RTNLGRP_IPV4_ROUTE const to create the multicast groups mask. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--device/sticky_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/device/sticky_linux.go b/device/sticky_linux.go
index e3efc86..f1c7069 100644
--- a/device/sticky_linux.go
+++ b/device/sticky_linux.go
@@ -206,7 +206,7 @@ func createNetlinkRouteSocket() (int, error) {
}
saddr := &unix.SockaddrNetlink{
Family: unix.AF_NETLINK,
- Groups: uint32(1 << (unix.RTNLGRP_IPV4_ROUTE - 1)),
+ Groups: unix.RTMGRP_IPV4_ROUTE,
}
err = unix.Bind(sock, saddr)
if err != nil {