All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: [bug] No keep-alives sent when private is set via PostUp
Date: Mon, 15 May 2023 14:04:36 -0400	[thread overview]
Message-ID: <87fs7xtqrv.fsf@gmail.com> (raw)

Hello,

I've encountered an edge case where no keep alives would be sent
following recreating a connection with

--8<---------------cut here---------------start------------->8---
wg-quick down my-config-file
wg-quick up my-config-file
--8<---------------cut here---------------end--------------->8---

Where my-config-file contains something like:

--8<---------------cut here---------------start------------->8---
cat /gnu/store/zilv4f0jqa8nz8apqv8y3a6g0ifymxhc-wireguard-config/wg0.conf 
[Interface]
Address = 10.0.0.7/32
Table = auto

PostUp = /gnu/store/4cnl0h79zc599xryr5jh66d7yq643zk4-wireguard-tools-1.0.20210914/bin/wg set %i private-key /etc/wireguard/private.key

ListenPort = 51820

[Peer] #apteryx
PublicKey = JPWIbC9qMlnTkWfqGp0plOxWJ/ewOO/C9BuxIJles28=
AllowedIPs = 10.0.1.1/32
Endpoint = apteryx.duckdns.org:51820
PersistentKeepalive = 25
--8<---------------cut here---------------end--------------->8---

The following command on that machine:
--8<---------------cut here---------------start------------->8---
tcpdump -n -i any port 51820
--8<---------------cut here---------------end--------------->8---

wouldn't show any traffic.

Discussing this on #wireguard (libera.chat IRC), the another| user
thinks the problem could be triggered because of setting the private key
in using a PostUp directive; more specifically it is believed the
problem would happen when "no private key is defined when the interface
comes up".

-- 
Thanks,
Maxim

             reply	other threads:[~2023-05-17 20:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 18:04 Maxim Cournoyer [this message]
2023-05-18  1:17 ` [bug] No keep-alives sent when private is set via PostUp Jason A. Donenfeld
2023-05-18  1:22   ` Jason A. Donenfeld
2023-05-18  2:04     ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fs7xtqrv.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.