]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
device: use RTMGRP_IPV4_ROUTE to specify multicast groups mask
authorTobias Klauser <tklauser@distanz.ch>
Tue, 7 Jul 2020 11:15:13 +0000 (13:15 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 13 Jul 2020 23:58:10 +0000 (17:58 -0600)
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>
device/sticky_linux.go

index e3efc869409045dd074dbe0b209048d56a450af2..f1c7069f616a1c97f658f2f502956d97e9b9f8a3 100644 (file)
@@ -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 {