Source-Changes-HG archive

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

[src/trunk]: src/sys/net wg: Remove IFF_POINTOPOINT.



details:   https://anonhg.NetBSD.org/src/rev/78fe71c81124
branches:  trunk
changeset: 943341:78fe71c81124
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 31 20:20:22 2020 +0000

description:
wg: Remove IFF_POINTOPOINT.

Unclear why this was set; setting it seems to have required a kludge
in netinet/in.c that broke ipsec tunnels.  Clearing it makes wg work
again after that kludge was reverted.

diffstat:

 share/man/man4/wg.4 |  16 +++++++++-------
 sys/net/if_wg.c     |   6 +++---
 2 files changed, 12 insertions(+), 10 deletions(-)

diffs (71 lines):

diff -r 4de9b9ef6ab0 -r 78fe71c81124 share/man/man4/wg.4
--- a/share/man/man4/wg.4       Mon Aug 31 19:58:21 2020 +0000
+++ b/share/man/man4/wg.4       Mon Aug 31 20:20:22 2020 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: wg.4,v 1.5 2020/08/26 16:03:41 riastradh Exp $
+.\"    $NetBSD: wg.4,v 1.6 2020/08/31 20:20:22 riastradh Exp $
 .\"
 .\" Copyright (c) 2020 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -38,8 +38,8 @@
 .Sh DESCRIPTION
 The
 .Nm
-interface implements a point-to-point roaming-capable virtual private
-network tunnel, configured with
+interface implements a roaming-capable virtual private network tunnel,
+configured with
 .Xr ifconfig 8
 and
 .Xr wgconfig 8 .
@@ -117,8 +117,9 @@
     --allowed-ips=10.0.1.1/32
 A# ifconfig wg0 up
 A# ifconfig wg0
-wg0: flags=0x51<UP,POINTOPOINT,RUNNING> mtu 1420
-        inet 10.0.1.0/24 ->  flags 0
+wg0: flags=0x8041<UP,RUNNING,MULTICAST> mtu 1420
+        inet 10.0.1.0/24 flags 0
+        inet6 fe80::22f7:d6ff:fe3a:1e60%wg0/64 flags 0 scopeid 0x3
 .Ed
 .Pp
 Configure B to connect to A at 1.2.3.4 on port 1234 and the packets can
@@ -132,8 +133,9 @@
     --endpoint=1.2.3.4:1234
 B# ifconfig wg0 up
 B# ifconfig wg0
-wg0: flags=0x51<UP,POINTOPOINT,RUNNING> mtu 1420
-        inet 10.0.1.1/24 ->  flags 0
+wg0: flags=0x8041<UP,RUNNING,MULTICAST> mtu 1420
+        inet 10.0.1.1/24 flags 0
+        inet6 fe80::56eb:59ff:fe3d:d413%wg0/64 flags 0 scopeid 0x3
 B# ping -n 10.0.1.0
 PING 10.0.1.0 (10.0.1.0): 56 data bytes
 64 bytes from 10.0.1.0: icmp_seq=0 ttl=255 time=2.721110 ms
diff -r 4de9b9ef6ab0 -r 78fe71c81124 sys/net/if_wg.c
--- a/sys/net/if_wg.c   Mon Aug 31 19:58:21 2020 +0000
+++ b/sys/net/if_wg.c   Mon Aug 31 20:20:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wg.c,v 1.32 2020/08/28 07:03:08 riastradh Exp $     */
+/*     $NetBSD: if_wg.c,v 1.33 2020/08/31 20:20:22 riastradh 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.32 2020/08/28 07:03:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.33 2020/08/31 20:20:22 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -3382,7 +3382,7 @@
 
        wg->wg_if.if_addrlen = 0;
        wg->wg_if.if_mtu = WG_MTU;
-       wg->wg_if.if_flags = IFF_POINTOPOINT | IFF_MULTICAST;
+       wg->wg_if.if_flags = 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