summaryrefslogtreecommitdiffhomepage
path: root/device/sticky_linux.go
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 /device/sticky_linux.go
parent4369db522b3fd7adc28a2a82b89315a6f3edbcc4 (diff)
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>
Diffstat (limited to 'device/sticky_linux.go')
-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 {