From 3c41141fb47781f5c7526662ef057c2aa3d71757 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 7 Jul 2020 13:15:13 +0200 Subject: 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 Signed-off-by: Jason A. Donenfeld --- device/sticky_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'device') 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 { -- cgit v1.2.3-59-g8ed1b