From: Tobias Klauser <tklauser@distanz.ch>
To: wireguard@lists.zx2c4.com
Subject: [PATCH] device: use RTMGRP_IPV4_ROUTE to specify multicast groups mask
Date: Tue, 7 Jul 2020 13:15:13 +0200 [thread overview]
Message-ID: <20200707111513.28080-1-tklauser@distanz.ch> (raw)
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>
---
device/sticky_linux.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/device/sticky_linux.go b/device/sticky_linux.go
index e3efc8694090..f1c7069f616a 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 {
--
2.27.0
next reply other threads:[~2020-07-13 23:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 11:15 Tobias Klauser [this message]
2020-07-13 23:58 ` Jason A. Donenfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200707111513.28080-1-tklauser@distanz.ch \
--to=tklauser@distanz.ch \
--cc=wireguard@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).