Thu Aug 27 19:21:14 2020 UTC ()
Summary: let wg interfaces carry multicast traffic

Once a wg interface is up and running, it is useful to be able to run
a routing protocol over it.  Marking the interface multicast capable
enables this.  (One must also use the wgconfig --allowed-ips option to
explicitly permit the group one needs, e.g. 224.0.0.5/32 for OSPF.)


(tih)
diff -r1.30 -r1.31 src/sys/net/if_wg.c

cvs diff -r1.30 -r1.31 src/sys/net/if_wg.c (expand / switch to context diff)
--- src/sys/net/if_wg.c 2020/08/27 13:44:41 1.30
+++ src/sys/net/if_wg.c 2020/08/27 19:21:14 1.31
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wg.c,v 1.30 2020/08/27 13:44:41 riastradh Exp $	*/
+/*	$NetBSD: if_wg.c,v 1.31 2020/08/27 19:21:14 tih Exp $	*/
 
 /*
  * Copyright (C) Ryota Ozaki <ozaki.ryota@gmail.com>
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.30 2020/08/27 13:44:41 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.31 2020/08/27 19:21:14 tih Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -3381,7 +3381,7 @@
 
 	wg->wg_if.if_addrlen = 0;
 	wg->wg_if.if_mtu = WG_MTU;
-	wg->wg_if.if_flags = IFF_POINTOPOINT;
+	wg->wg_if.if_flags = IFF_POINTOPOINT | IFF_MULTICAST;
 	wg->wg_if.if_extflags = IFEF_NO_LINK_STATE_CHANGE;
 	wg->wg_if.if_extflags |= IFEF_MPSAFE;
 	wg->wg_if.if_ioctl = wg_ioctl;