Development discussion of WireGuard
 help / color / mirror / Atom feed
* [PATCH] device: use RTMGRP_IPV4_ROUTE to specify multicast groups mask
@ 2020-07-07 11:15 Tobias Klauser
  2020-07-13 23:58 ` Jason A. Donenfeld
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Klauser @ 2020-07-07 11:15 UTC (permalink / raw)
  To: wireguard

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-13 23:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 11:15 [PATCH] device: use RTMGRP_IPV4_ROUTE to specify multicast groups mask Tobias Klauser
2020-07-13 23:58 ` Jason A. Donenfeld

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).