Re: [PATCH net-next v3 00/10] net: add and use dev_get_tstats64

2020-11-09 Thread Jakub Kicinski
On Sat, 7 Nov 2020 21:48:13 +0100 Heiner Kallweit wrote: > It's a frequent pattern to use netdev->stats for the less frequently > accessed counters and per-cpu counters for the frequently accessed > counters (rx/tx bytes/packets). Add a default ndo_get_stats64() > implementation for this use case.

[PATCH AUTOSEL 5.9 26/55] wireguard: selftests: check that route_me_harder packets use the right sk

2020-11-09 Thread Sasha Levin
From: "Jason A. Donenfeld" [ Upstream commit af8afcf1fdd5f365f70e2386c2d8c7a1abd853d7 ] If netfilter changes the packet mark, the packet is rerouted. The ip_route_me_harder family of functions fails to use the right sk, opting to instead use skb->sk, resulting in a routing loop when used with

Re: DNS resolution retries and EAI_NONAME

2020-11-09 Thread Lonnie Abelbeck
> On Nov 3, 2020, at 2:57 AM, Zack Elan wrote: > > Short version: if I set WG_ENDPOINT_RESOLUTION_RETRIES=infinity, I would like > wg(8) to actually retry infinitely, rather than exiting the first time it > gets what it assumes to be a permanent failure. > > Long version: > > When

Distributed Computer Lab

2020-11-09 Thread Dashamir Hoxha
Hi, This is another case/example of using WireGuard: https://www.researchgate.net/publication/345485273_Distributed_Computer_Lab "With COVID-19 pandemic, most of the schools and universities around the world have to do the teaching from home. In such conditions, being able to devise a virtual

Re: Using Wireguard for Geo redundancy

2020-11-09 Thread Dashamir Hoxha
On Tue, Nov 3, 2020 at 8:07 PM dx...@xirihosting.com wrote: > > Hi! > > I am looking for information on how to leverage Wireguard in a geo-redundancy > scenario. > > We have a couple management boxes colocated next to each other that provide > HA via a VIP that "jumps" between each of those

Accessing Computer Labs Remotely

2020-11-09 Thread Dashamir Hoxha
Hi, I have just published this article that explains a way for accessing private LANs remotely, using Guacamole and WireGuard: https://www.researchgate.net/publication/345404166_Accessing_Computer_Labs_Remotely Maybe some people will find it interesting or useful. Regards, Dashamir

Re: Using WG to route between two LANs

2020-11-09 Thread Dashamir Hoxha
On Wed, Oct 28, 2020 at 4:22 AM Samuel Holland wrote: > > Hello, > > On 10/22/20 10:43 AM, Dashamir Hoxha wrote: > > I have created a network as shown in this diagram: > > https://cloud.flossk.org/s/ZsLtNLsxmo8rxPD > > > > The red arrows show the WG connections. Only the server has a public IP. >

[PATCH net-next v3 09/10] ipv4/ipv6: switch to dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- net/ipv4/ip_gre.c | 6 +++--- net/ipv4/ipip.c| 2 +- net/ipv6/ip6_gre.c | 6 +++--- net/ipv6/sit.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff

[PATCH net-next v3 05/10] net: switch to dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- drivers/net/bareudp.c | 2 +- drivers/net/geneve.c | 2 +- drivers/net/vxlan.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH net-next v3 07/10] wireguard: switch to dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Reviewed-by: Jason A. Donenfeld Signed-off-by: Heiner Kallweit --- drivers/net/wireguard/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireguard/device.c

[PATCH net-next v3 08/10] vti: switch to dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- net/ipv4/ip_vti.c | 2 +- net/ipv6/ip6_vti.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index

[PATCH net-next v3 10/10] net: remove ip_tunnel_get_stats64

2020-11-09 Thread Heiner Kallweit
After having migrated all users remove ip_tunnel_get_stats64(). Signed-off-by: Heiner Kallweit --- include/net/ip_tunnels.h | 2 -- net/ipv4/ip_tunnel_core.c | 9 - 2 files changed, 11 deletions(-) diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index

[PATCH net-next v3 06/10] gtp: switch to dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core function dev_get_tstats64(). Acked-by: Harald Welte Signed-off-by: Heiner Kallweit --- drivers/net/gtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index

Transient Connection Issue

2020-11-09 Thread Ashish Madeti
Hi All Background: I am using Wireguard VPN to secure intra-server communications among my 5-6 ubuntu servers sitting in different data centers. Today, we had a downtime of around 15 minutes because the server running nginx was not able to connect to the web-application server using the

[PATCH net-next v3 03/10] tun: switch to net core provided statistics counters

2020-11-09 Thread Heiner Kallweit
Switch tun to the standard statistics pattern: - use netdev->stats for the less frequently accessed counters - use netdev->tstats for the frequently accessed per-cpu counters v3: - add atomic_long_t member rx_frame_errors for making counter updates atomic Signed-off-by: Heiner Kallweit ---

[PATCH net-next v3 01/10] net: core: add dev_get_tstats64 as a ndo_get_stats64 implementation

2020-11-09 Thread Heiner Kallweit
It's a frequent pattern to use netdev->stats for the less frequently accessed counters and per-cpu counters for the frequently accessed counters (rx/tx bytes/packets). Add a default ndo_get_stats64() implementation for this use case. Reviewed-by: Florian Fainelli Signed-off-by: Heiner Kallweit

[PATCH net-next v3 02/10] net: dsa: use net core stats64 handling

2020-11-09 Thread Heiner Kallweit
Use netdev->tstats instead of a member of dsa_slave_priv for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Reviewed-by: Florian Fainelli Tested-by: Vladimir Oltean Signed-off-by: Heiner Kallweit --- net/dsa/dsa.c | 7 +--

[PATCH net-next v3 00/10] net: add and use dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
It's a frequent pattern to use netdev->stats for the less frequently accessed counters and per-cpu counters for the frequently accessed counters (rx/tx bytes/packets). Add a default ndo_get_stats64() implementation for this use case. Subsequently switch more drivers to use this pattern. v2: - add

Re: [PATCH net-next v2 03/10] tun: switch to net core provided statistics counters

2020-11-09 Thread Heiner Kallweit
On 06.11.2020 08:48, Heiner Kallweit wrote: > On 06.11.2020 02:14, Jakub Kicinski wrote: >> On Wed, 4 Nov 2020 15:25:24 +0100 Heiner Kallweit wrote: >>> @@ -1066,7 +1054,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, >>> struct net_device *dev) >>> return NETDEV_TX_OK; >>> >>>

Re: [PATCH net-next v2 03/10] tun: switch to net core provided statistics counters

2020-11-09 Thread Heiner Kallweit
On 06.11.2020 02:14, Jakub Kicinski wrote: > On Wed, 4 Nov 2020 15:25:24 +0100 Heiner Kallweit wrote: >> @@ -1066,7 +1054,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, >> struct net_device *dev) >> return NETDEV_TX_OK; >> >> drop: >> -

[PATCH net-next v2 10/10] net: remove ip_tunnel_get_stats64

2020-11-09 Thread Heiner Kallweit
After having migrated all users remove ip_tunnel_get_stats64(). Signed-off-by: Heiner Kallweit --- include/net/ip_tunnels.h | 2 -- net/ipv4/ip_tunnel_core.c | 9 - 2 files changed, 11 deletions(-) diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index

[PATCH net-next v2 09/10] ipv4/ipv6: switch to dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core fucntion dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- net/ipv4/ip_gre.c | 6 +++--- net/ipv4/ipip.c| 2 +- net/ipv6/ip6_gre.c | 6 +++--- net/ipv6/sit.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff

[PATCH net-next v2 07/10] wireguard: switch to dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core fucntion dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- drivers/net/wireguard/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireguard/device.c b/drivers/net/wireguard/device.c index

[PATCH net-next v2 08/10] vti: switch to dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core fucntion dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- net/ipv4/ip_vti.c | 2 +- net/ipv6/ip6_vti.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/ip_vti.c b/net/ipv4/ip_vti.c index

[PATCH net-next v2 06/10] gtp: switch to dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core fucntion dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- drivers/net/gtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index dc668ed28..4c04e271f 100644 ---

Re: [PATCH net-next v2 06/10] gtp: switch to dev_get_tstats64

2020-11-09 Thread Harald Welte
Looks good to me. On Wed, Nov 04, 2020 at 03:27:47PM +0100, Heiner Kallweit wrote: > Replace ip_tunnel_get_stats64() with the new identical core fucntion > dev_get_tstats64(). > > Signed-off-by: Heiner Kallweit Acked-by: Harald Welte -- - Harald Weltehttp://laforge.gnumonks.org/

[PATCH net-next v2 04/10] ip6_tunnel: switch to dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
Switch ip6_tunnel to the standard statistics pattern: - use dev->stats for the less frequently accessed counters - use dev->tstats for the frequently accessed counters An additional benefit is that we now have 64bit statistics also on 32bit systems. Signed-off-by: Heiner Kallweit ---

[PATCH net-next v2 05/10] net: switch to dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
Replace ip_tunnel_get_stats64() with the new identical core fucntion dev_get_tstats64(). Signed-off-by: Heiner Kallweit --- drivers/net/bareudp.c | 2 +- drivers/net/geneve.c | 2 +- drivers/net/vxlan.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH net-next v2 02/10] net: dsa: use net core stats64 handling

2020-11-09 Thread Heiner Kallweit
Use netdev->tstats instead of a member of dsa_slave_priv for storing a pointer to the per-cpu counters. This allows us to use core functionality for statistics handling. Reviewed-by: Florian Fainelli Tested-by: Vladimir Oltean Signed-off-by: Heiner Kallweit --- net/dsa/dsa.c | 7 +--

[PATCH net-next v2 03/10] tun: switch to net core provided statistics counters

2020-11-09 Thread Heiner Kallweit
Switch tun to the standard statistics pattern: - use netdev->stats for the less frequently accessed counters - use netdev->tstats for the frequently accessed per-cpu counters Signed-off-by: Heiner Kallweit --- drivers/net/tun.c | 127 +++--- 1 file

[PATCH net-next v2 01/10] net: core: add dev_get_tstats64 as a ndo_get_stats64 implementation

2020-11-09 Thread Heiner Kallweit
It's a frequent pattern to use netdev->stats for the less frequently accessed counters and per-cpu counters for the frequently accessed counters (rx/tx bytes/packets). Add a default ndo_get_stats64() implementation for this use case. Reviewed-by: Florian Fainelli Signed-off-by: Heiner Kallweit

[PATCH net-next v2 00/10] net: add and use dev_get_tstats64

2020-11-09 Thread Heiner Kallweit
It's a frequent pattern to use netdev->stats for the less frequently accessed counters and per-cpu counters for the frequently accessed counters (rx/tx bytes/packets). Add a default ndo_get_stats64() implementation for this use case. Subsequently switch more drivers to use this pattern. v2: - add

Re: Using Wireguard for Geo redundancy

2020-11-09 Thread Laura Smith
Hello Diego, Wireguard is deliberately "dumb". It doesn't have any fancy things like failover built-in, that is an "exercise left to the reader" as the saying goes. So, in answer to your question, the "best" solution would involve BGP. But from your email it would seem you don't run BGP and

DNS resolution retries and EAI_NONAME

2020-11-09 Thread Zack Elan
Short version: if I set WG_ENDPOINT_RESOLUTION_RETRIES=infinity, I would like wg(8) to actually retry infinitely, rather than exiting the first time it gets what it assumes to be a permanent failure. Long version: When WG_ENDPOINT_RESOLUTION_RETRIES is set, wg will retry endpoint resolution

[EdgeRouter] PtP links using /32 subnet mask

2020-11-09 Thread Skyler Mäntysaari
Hi there list, Does anyone know how can I achieve this configuration in EdgeRouter? Like how do I tell it what the peer address actually is? wg0.conf: --- [Interface]

Add local DNS forwarder to Windows client

2020-11-09 Thread Yves Goergen
Hello, I've already used WireGuard to connect to private networks and it's quite easy once you figure out how to set it up. (Most tutorials are outdated and haven't been updated, new ones haven't been written.) One thing that's really missing however is DNS support. All I can do now is connect to

WireGuard-Android QR code import disappeared from chromebook

2020-11-09 Thread Jay Tuley
We have a whole system for provisioning chromebooks with WireGuard using the QR code. Suddenly we can’t do it anymore. I think it was a wireguard update that checks for a rear camera before providing the QR code import option. Checking instead for FEATURE_CAMERA_ANY would fix this regression for

[ANNOUNCE] Wintun 0.9 Released with Major Usability Improvements

2020-11-09 Thread Jason A. Donenfeld
Hi folks, Simon and I are very excited to announce the release of Wintun 0.9, the release in which Wintun finally becomes easy and enjoyable to use by developers. I consider this the most significant release of Wintun yet. Webpage: https://www.wintun.net/ For background: Wintun is a driver for