All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Sattler <sattler@med.uni-frankfurt.de>
To: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: unable to set allowed-ips
Date: Thu, 23 Mar 2017 23:39:54 +0100	[thread overview]
Message-ID: <eb21fbc6-206d-68a6-994f-50dce322b534@med.uni-frankfurt.de> (raw)

Hi there ...

I'm unable to set allowed-ips, I get

   "Unable to set device: Invalid argument"

when running

  # wg set wg0 peer 7KoA... allowed-ips 192.168.237.16/32


The last few line in strace are:

stat64("/var/run/wireguard/wg0.sock", 0xffc7a530) = -1 ENOENT (No such file 
or directory)
socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
ioctl(3, _IOC(0, 0x89, 0xf1, 0x00), 0xffc7a61c) = -1 EINVAL (Invalid argument)
dup(2)                                  = 4
fcntl64(4, F_GETFL)                     = 0x2 (flags O_RDWR)
fstat64(4, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0
write(4, "Unable to set device: Invalid ar"..., 39Unable to set device: 
Invalid argument
) = 39
close(4)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++


I'm running a crosscompiled 64bit kernel on 32bit Gentoo
userland. (As I installed it more than 10 years ago.)

Kernel version is 4.10.5, WireGuard is 0.0.20170320.1

I'm neither using a Gentoo kernel nor Gentoo's WireGuard
package but compiled them on my own enabling all Kernel
Requirements mentioned at https://www.wireguard.io/install

Trying to connect an Arch Linux based system (where I can
set allowed-ips) both show that they did a handshake but
as the Gentoo box won't set allowed-ips for the Arch box,
the Gentoo box rejects its packages, complaining about
packets having unallowed src IPs. :-(

I tried several kernels and WireGuard snapshots within the
last weeks and also spend some time searching for "allowed-
ips" and "Invalid argument" but couldn't yet find anything.

Thomas


P.S.: In case it helps, here the output from 'wg' so far:

Gentoo:

   interface: wg0
     public key: 74DO...
     private key: (hidden)
     pre-shared key: (hidden)
     listening port: 22

   peer: 7KoA...
     endpoint: 192.168.2.16:22
     allowed ips: (none)
     latest handshake: 26 minutes, 32 seconds ago
     transfer: 890.99 KiB received, 240 B sent
     persistent keepalive: every 5 minutes, 36 seconds

Arch Linux:


   interface: wg0
     public key: 7KoA...
     private key: (hidden)
     pre-shared key: (hidden)
     listening port: 22

   peer: 74DO...
     endpoint: 192.168.2.17:22
     allowed ips: 192.168.237.17/32
     latest handshake: 29 minutes, 9 seconds ago
     transfer: 14.00 KiB received, 2.21 MiB sent

             reply	other threads:[~2017-03-23 22:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 22:39 Thomas Sattler [this message]
2017-03-24  1:15 ` unable to set allowed-ips Jason A. Donenfeld
2017-03-24 11:37   ` Thomas Sattler

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=eb21fbc6-206d-68a6-994f-50dce322b534@med.uni-frankfurt.de \
    --to=sattler@med.uni-frankfurt.de \
    --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.