Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Summary: let wg interfaces carry multicast traffic



details:   https://anonhg.NetBSD.org/src/rev/1196a41d1677
branches:  trunk
changeset: 937837:1196a41d1677
user:      tih <tih%NetBSD.org@localhost>
date:      Thu Aug 27 19:21:14 2020 +0000

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

diffstat:

 sys/net/if_wg.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r c9860ab8951d -r 1196a41d1677 sys/net/if_wg.c
--- a/sys/net/if_wg.c   Thu Aug 27 19:15:35 2020 +0000
+++ b/sys/net/if_wg.c   Thu Aug 27 19:21:14 2020 +0000
@@ -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@localhost>
@@ -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;



Home | Main Index | Thread Index | Old Index