WireGuard Archive on lore.kernel.org
 help / color / Atom feed
* Fwd: Re: wg-quick broken by iproute2 update
       [not found] <eeb61304-6f66-48f9-1418-2a4e502b9289@53c70r.de>
@ 2018-06-28 12:32 ` Silvan Nagl
  2018-06-28 17:28   ` Silvan Nagl
  0 siblings, 1 reply; 2+ messages in thread
From: Silvan Nagl @ 2018-06-28 12:32 UTC (permalink / raw)
  To: wireguard

[-- Attachment #1: Type: text/plain, Size: 3452 bytes --]




-------- Forwarded Message --------
Subject: 	Re: wg-quick broken by iproute2 update
Date: 	Thu, 28 Jun 2018 11:53:59 +0200
From: 	Silvan Nagl <mail@53c70r.de>
To: 	stunnel@attglobal.net



Hi,

since i had to debug this problem already i can tell you it is not
iproute2 causing the problem.
The main problem is that the current standard kernel of CentOS simple
does not support the handling of "suppress_prefixlength".
Iproute2 supports it since it does not return any error while adding so
it had to be the kernel causing problems.
In essence Red Hats official answer was "It isn't a bug, RHEL7 simple
does not support it".
If you sill want to fix your problem just upgrade your kernel to
long-term or mainline.

Regards,
Silvan

On 06/28/2018 04:47 AM, Eddie wrote:
> Hi,
>
> I just updated both a RHEL and a CentOS system from 7 -> 7.5. 
> Following this, when running wg-quick, the routing tables are not 
> updated correctly.  Both systems are running 
> iproute.x86_64-4.11.0-14.el7, but from different repositories and are 
> definitely different builds as they install to different sbin libraries.
>
> Here's what I'm seeing:
>
> [eddieath@oc8361880017 ~]$ sudo ip rule list
> 0:    from all lookup local
> 32766:    from all lookup main
> 32767:    from all lookup default
> [eddieath@oc8361880017 ~]$
> [eddieath@oc8361880017 ~]$ sudo wg-quick up wg0
> [#] ip link add wg0 type wireguard
> [#] wg setconf wg0 /dev/fd/63
> [#] ip address add 192.168.0.11/24 dev wg0
> [#] ip link set mtu 1420 dev wg0
> [#] ip link set wg0 up
> [#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
> [#] ip -4 rule add not fwmark 51820 table 51820
> [#] ip -4 rule add table main suppress_prefixlength 0
> [eddieath@oc8361880017 ~]$
> [eddieath@oc8361880017 ~]$ sudo ip rule list
> 0:    from all lookup local
> 32764:    from all lookup main
> 32765:    not from all fwmark 0xca6c lookup 51820
> 32766:    from all lookup main
> 32767:    from all lookup default
> [eddieath@oc8361880017 ~]$
>
> Note the "suppress_prefixlength 0" has been dropped, which really 
> breaks the routing with a "normal" main ahead of table 51820. 
> Following this, when running the "down", the duplicated table is not 
> removed, as there is no match searching for "suppress_prefixlength 0":
>
> [eddieath@oc8361880017 ~]$ sudo wg-quick down wg0
> [#] wg showconf wg0
> sync: ignoring all arguments
> [#] ip -4 rule delete table 51820
> [#] ip link delete dev wg0
> [eddieath@oc8361880017 ~]$ sudo ip rule list
> 0:    from all lookup local
> 32764:    from all lookup main
> 32766:    from all lookup main
> 32767:    from all lookup default
> [eddieath@oc8361880017 ~]$
>
> I've confirmed this on both systems and also that the behaviour is 
> purely within ip, and not anything that wg-quick is doing:
>
> [eddieath@oc8361880017 ~]$ sudo ip rule list
> 0:    from all lookup local
> 32766:    from all lookup main
> 32767:    from all lookup default
> [eddieath@oc8361880017 ~]$ sudo ip -4 rule add table main 
> suppress_prefixlength 0
> [eddieath@oc8361880017 ~]$ sudo ip rule list
> 0:    from all lookup local
> 32765:    from all lookup main
> 32766:    from all lookup main
> 32767:    from all lookup default
> [eddieath@oc8361880017 ~]$
>
> Cheers.
>
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard


[-- Attachment #2: Type: text/html, Size: 4926 bytes --]

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <div class="moz-forward-container"><br>
      <br>
      -------- Forwarded Message --------
      <table class="moz-email-headers-table" cellspacing="0"
        cellpadding="0" border="0">
        <tbody>
          <tr>
            <th nowrap="nowrap" align="RIGHT" valign="BASELINE">Subject:
            </th>
            <td>Re: wg-quick broken by iproute2 update</td>
          </tr>
          <tr>
            <th nowrap="nowrap" align="RIGHT" valign="BASELINE">Date: </th>
            <td>Thu, 28 Jun 2018 11:53:59 +0200</td>
          </tr>
          <tr>
            <th nowrap="nowrap" align="RIGHT" valign="BASELINE">From: </th>
            <td>Silvan Nagl <a class="moz-txt-link-rfc2396E" href="mailto:mail@53c70r.de">&lt;mail@53c70r.de&gt;</a></td>
          </tr>
          <tr>
            <th nowrap="nowrap" align="RIGHT" valign="BASELINE">To: </th>
            <td><a class="moz-txt-link-abbreviated" href="mailto:stunnel@attglobal.net">stunnel@attglobal.net</a></td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      <pre>Hi,

since i had to debug this problem already i can tell you it is not 
iproute2 causing the problem.
The main problem is that the current standard kernel of CentOS simple 
does not support the handling of "suppress_prefixlength".
Iproute2 supports it since it does not return any error while adding so 
it had to be the kernel causing problems.
In essence Red Hats official answer was "It isn't a bug, RHEL7 simple 
does not support it".
If you sill want to fix your problem just upgrade your kernel to 
long-term or mainline.

Regards,
Silvan

On 06/28/2018 04:47 AM, Eddie wrote:
&gt; Hi,
&gt;
&gt; I just updated both a RHEL and a CentOS system from 7 -&gt; 7.5. 
&gt; Following this, when running wg-quick, the routing tables are not 
&gt; updated correctly.  Both systems are running 
&gt; iproute.x86_64-4.11.0-14.el7, but from different repositories and are 
&gt; definitely different builds as they install to different sbin libraries.
&gt;
&gt; Here's what I'm seeing:
&gt;
&gt; [eddieath@oc8361880017 ~]$ sudo ip rule list
&gt; 0:    from all lookup local
&gt; 32766:    from all lookup main
&gt; 32767:    from all lookup default
&gt; [eddieath@oc8361880017 ~]$
&gt; [eddieath@oc8361880017 ~]$ sudo wg-quick up wg0
&gt; [#] ip link add wg0 type wireguard
&gt; [#] wg setconf wg0 /dev/fd/63
&gt; [#] ip address add 192.168.0.11/24 dev wg0
&gt; [#] ip link set mtu 1420 dev wg0
&gt; [#] ip link set wg0 up
&gt; [#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
&gt; [#] ip -4 rule add not fwmark 51820 table 51820
&gt; [#] ip -4 rule add table main suppress_prefixlength 0
&gt; [eddieath@oc8361880017 ~]$
&gt; [eddieath@oc8361880017 ~]$ sudo ip rule list
&gt; 0:    from all lookup local
&gt; 32764:    from all lookup main
&gt; 32765:    not from all fwmark 0xca6c lookup 51820
&gt; 32766:    from all lookup main
&gt; 32767:    from all lookup default
&gt; [eddieath@oc8361880017 ~]$
&gt;
&gt; Note the "suppress_prefixlength 0" has been dropped, which really 
&gt; breaks the routing with a "normal" main ahead of table 51820. 
&gt; Following this, when running the "down", the duplicated table is not 
&gt; removed, as there is no match searching for "suppress_prefixlength 0":
&gt;
&gt; [eddieath@oc8361880017 ~]$ sudo wg-quick down wg0
&gt; [#] wg showconf wg0
&gt; sync: ignoring all arguments
&gt; [#] ip -4 rule delete table 51820
&gt; [#] ip link delete dev wg0
&gt; [eddieath@oc8361880017 ~]$ sudo ip rule list
&gt; 0:    from all lookup local
&gt; 32764:    from all lookup main
&gt; 32766:    from all lookup main
&gt; 32767:    from all lookup default
&gt; [eddieath@oc8361880017 ~]$
&gt;
&gt; I've confirmed this on both systems and also that the behaviour is 
&gt; purely within ip, and not anything that wg-quick is doing:
&gt;
&gt; [eddieath@oc8361880017 ~]$ sudo ip rule list
&gt; 0:    from all lookup local
&gt; 32766:    from all lookup main
&gt; 32767:    from all lookup default
&gt; [eddieath@oc8361880017 ~]$ sudo ip -4 rule add table main 
&gt; suppress_prefixlength 0
&gt; [eddieath@oc8361880017 ~]$ sudo ip rule list
&gt; 0:    from all lookup local
&gt; 32765:    from all lookup main
&gt; 32766:    from all lookup main
&gt; 32767:    from all lookup default
&gt; [eddieath@oc8361880017 ~]$
&gt;
&gt; Cheers.
&gt;
&gt; _______________________________________________
&gt; WireGuard mailing list
&gt; <a class="moz-txt-link-abbreviated" href="mailto:WireGuard@lists.zx2c4.com">WireGuard@lists.zx2c4.com</a>
&gt; <a class="moz-txt-link-freetext" href="https://lists.zx2c4.com/mailman/listinfo/wireguard">https://lists.zx2c4.com/mailman/listinfo/wireguard</a>

</pre>
    </div>
  </body>
</html>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fwd: Re: wg-quick broken by iproute2 update
  2018-06-28 12:32 ` Fwd: Re: wg-quick broken by iproute2 update Silvan Nagl
@ 2018-06-28 17:28   ` Silvan Nagl
  0 siblings, 0 replies; 2+ messages in thread
From: Silvan Nagl @ 2018-06-28 17:28 UTC (permalink / raw)
  To: wireguard, stunnel

[-- Attachment #1: Type: text/plain, Size: 4511 bytes --]

Hi,

here the last message of redhat:

/The issue has been fixed upstream: -commit 
7c8f4e6dc30996bff806285730a0bb4e714d3d52 Author: Jason A. Donenfeld //<Jason@zx2c4.com>//Date: Tue Jun 26 01:39:32 2018 +0200 fib_rules: match rules based on 
suppress_* properties too Two rules with different values of 
suppress_prefix or suppress_ifgroup are not the same. This fixes an 
-EEXIST when running: $ ip -4 rule add table main suppress_prefixlength 
0 Signed-off-by: Jason A. Donenfeld //<Jason@zx2c4.com>//Fixes: f9d4b0c1e969 ("fib_rules: move common handling of newrule delrule 
msgs into fib_nl2rule")/

problem should be considered as fixed.

Regards,
Silvan

On 06/28/2018 02:32 PM, Silvan Nagl wrote:
>
>
>
>
> -------- Forwarded Message --------
> Subject: 	Re: wg-quick broken by iproute2 update
> Date: 	Thu, 28 Jun 2018 11:53:59 +0200
> From: 	Silvan Nagl <mail@53c70r.de>
> To: 	stunnel@attglobal.net
>
>
>
> Hi,
>
> since i had to debug this problem already i can tell you it is not
> iproute2 causing the problem.
> The main problem is that the current standard kernel of CentOS simple
> does not support the handling of "suppress_prefixlength".
> Iproute2 supports it since it does not return any error while adding so
> it had to be the kernel causing problems.
> In essence Red Hats official answer was "It isn't a bug, RHEL7 simple
> does not support it".
> If you sill want to fix your problem just upgrade your kernel to
> long-term or mainline.
>
> Regards,
> Silvan
>
> On 06/28/2018 04:47 AM, Eddie wrote:
> > Hi,
> >
> > I just updated both a RHEL and a CentOS system from 7 -> 7.5. 
> > Following this, when running wg-quick, the routing tables are not 
> > updated correctly.  Both systems are running 
> > iproute.x86_64-4.11.0-14.el7, but from different repositories and are 
> > definitely different builds as they install to different sbin libraries.
> >
> > Here's what I'm seeing:
> >
> > [eddieath@oc8361880017 ~]$ sudo ip rule list
> > 0:    from all lookup local
> > 32766:    from all lookup main
> > 32767:    from all lookup default
> > [eddieath@oc8361880017 ~]$
> > [eddieath@oc8361880017 ~]$ sudo wg-quick up wg0
> > [#] ip link add wg0 type wireguard
> > [#] wg setconf wg0 /dev/fd/63
> > [#] ip address add 192.168.0.11/24 dev wg0
> > [#] ip link set mtu 1420 dev wg0
> > [#] ip link set wg0 up
> > [#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
> > [#] ip -4 rule add not fwmark 51820 table 51820
> > [#] ip -4 rule add table main suppress_prefixlength 0
> > [eddieath@oc8361880017 ~]$
> > [eddieath@oc8361880017 ~]$ sudo ip rule list
> > 0:    from all lookup local
> > 32764:    from all lookup main
> > 32765:    not from all fwmark 0xca6c lookup 51820
> > 32766:    from all lookup main
> > 32767:    from all lookup default
> > [eddieath@oc8361880017 ~]$
> >
> > Note the "suppress_prefixlength 0" has been dropped, which really 
> > breaks the routing with a "normal" main ahead of table 51820. 
> > Following this, when running the "down", the duplicated table is not 
> > removed, as there is no match searching for "suppress_prefixlength 0":
> >
> > [eddieath@oc8361880017 ~]$ sudo wg-quick down wg0
> > [#] wg showconf wg0
> > sync: ignoring all arguments
> > [#] ip -4 rule delete table 51820
> > [#] ip link delete dev wg0
> > [eddieath@oc8361880017 ~]$ sudo ip rule list
> > 0:    from all lookup local
> > 32764:    from all lookup main
> > 32766:    from all lookup main
> > 32767:    from all lookup default
> > [eddieath@oc8361880017 ~]$
> >
> > I've confirmed this on both systems and also that the behaviour is 
> > purely within ip, and not anything that wg-quick is doing:
> >
> > [eddieath@oc8361880017 ~]$ sudo ip rule list
> > 0:    from all lookup local
> > 32766:    from all lookup main
> > 32767:    from all lookup default
> > [eddieath@oc8361880017 ~]$ sudo ip -4 rule add table main 
> > suppress_prefixlength 0
> > [eddieath@oc8361880017 ~]$ sudo ip rule list
> > 0:    from all lookup local
> > 32765:    from all lookup main
> > 32766:    from all lookup main
> > 32767:    from all lookup default
> > [eddieath@oc8361880017 ~]$
> >
> > Cheers.
> >
> > _______________________________________________
> > WireGuard mailing list
> > WireGuard@lists.zx2c4.com
> > https://lists.zx2c4.com/mailman/listinfo/wireguard
>
>
>
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard


[-- Attachment #2: Type: text/html, Size: 6948 bytes --]

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>
    </p>
    <div class="moz-text-plain" wrap="true" style="font-family:
      -moz-fixed; font-size: 12px;" lang="x-unicode">
      <pre wrap="">Hi,

here the last message of redhat:

<i>The issue has been fixed upstream:

-commit 7c8f4e6dc30996bff806285730a0bb4e714d3d52
 Author: Jason A. Donenfeld </i><i><a class="moz-txt-link-rfc2396E" href="mailto:Jason@zx2c4.com">&lt;Jason@zx2c4.com&gt;</a></i><i>
 Date:   Tue Jun 26 01:39:32 2018 +0200

    fib_rules: match rules based on suppress_* properties too

    Two rules with different values of suppress_prefix or suppress_ifgroup
    are not the same. This fixes an -EEXIST when running:

    $ ip -4 rule add table main suppress_prefixlength 0

    Signed-off-by: Jason A. Donenfeld </i><i><a class="moz-txt-link-rfc2396E" href="mailto:Jason@zx2c4.com">&lt;Jason@zx2c4.com&gt;</a></i><i>
    Fixes: f9d4b0c1e969 ("fib_rules: move common handling of newrule delrule
msgs 
                         into fib_nl2rule")</i>

problem should be considered as fixed.

Regards,
Silvan

</pre>
    </div>
    <div class="moz-cite-prefix">On 06/28/2018 02:32 PM, Silvan Nagl
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:10808a9e-d503-245e-546c-d3ca77d2a1b0@53c70r.de">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <p><br>
      </p>
      <div class="moz-forward-container"><br>
        <br>
        -------- Forwarded Message --------
        <table class="moz-email-headers-table" cellspacing="0"
          cellpadding="0" border="0">
          <tbody>
            <tr>
              <th nowrap="nowrap" align="RIGHT" valign="BASELINE">Subject:
              </th>
              <td>Re: wg-quick broken by iproute2 update</td>
            </tr>
            <tr>
              <th nowrap="nowrap" align="RIGHT" valign="BASELINE">Date:
              </th>
              <td>Thu, 28 Jun 2018 11:53:59 +0200</td>
            </tr>
            <tr>
              <th nowrap="nowrap" align="RIGHT" valign="BASELINE">From:
              </th>
              <td>Silvan Nagl <a class="moz-txt-link-rfc2396E"
                  href="mailto:mail@53c70r.de" moz-do-not-send="true">&lt;mail@53c70r.de&gt;</a></td>
            </tr>
            <tr>
              <th nowrap="nowrap" align="RIGHT" valign="BASELINE">To: </th>
              <td><a class="moz-txt-link-abbreviated"
                  href="mailto:stunnel@attglobal.net"
                  moz-do-not-send="true">stunnel@attglobal.net</a></td>
            </tr>
          </tbody>
        </table>
        <br>
        <br>
        <pre>Hi,

since i had to debug this problem already i can tell you it is not 
iproute2 causing the problem.
The main problem is that the current standard kernel of CentOS simple 
does not support the handling of "suppress_prefixlength".
Iproute2 supports it since it does not return any error while adding so 
it had to be the kernel causing problems.
In essence Red Hats official answer was "It isn't a bug, RHEL7 simple 
does not support it".
If you sill want to fix your problem just upgrade your kernel to 
long-term or mainline.

Regards,
Silvan

On 06/28/2018 04:47 AM, Eddie wrote:
&gt; Hi,
&gt;
&gt; I just updated both a RHEL and a CentOS system from 7 -&gt; 7.5. 
&gt; Following this, when running wg-quick, the routing tables are not 
&gt; updated correctly.  Both systems are running 
&gt; iproute.x86_64-4.11.0-14.el7, but from different repositories and are 
&gt; definitely different builds as they install to different sbin libraries.
&gt;
&gt; Here's what I'm seeing:
&gt;
&gt; [eddieath@oc8361880017 ~]$ sudo ip rule list
&gt; 0:    from all lookup local
&gt; 32766:    from all lookup main
&gt; 32767:    from all lookup default
&gt; [eddieath@oc8361880017 ~]$
&gt; [eddieath@oc8361880017 ~]$ sudo wg-quick up wg0
&gt; [#] ip link add wg0 type wireguard
&gt; [#] wg setconf wg0 /dev/fd/63
&gt; [#] ip address add 192.168.0.11/24 dev wg0
&gt; [#] ip link set mtu 1420 dev wg0
&gt; [#] ip link set wg0 up
&gt; [#] ip -4 route add 0.0.0.0/0 dev wg0 table 51820
&gt; [#] ip -4 rule add not fwmark 51820 table 51820
&gt; [#] ip -4 rule add table main suppress_prefixlength 0
&gt; [eddieath@oc8361880017 ~]$
&gt; [eddieath@oc8361880017 ~]$ sudo ip rule list
&gt; 0:    from all lookup local
&gt; 32764:    from all lookup main
&gt; 32765:    not from all fwmark 0xca6c lookup 51820
&gt; 32766:    from all lookup main
&gt; 32767:    from all lookup default
&gt; [eddieath@oc8361880017 ~]$
&gt;
&gt; Note the "suppress_prefixlength 0" has been dropped, which really 
&gt; breaks the routing with a "normal" main ahead of table 51820. 
&gt; Following this, when running the "down", the duplicated table is not 
&gt; removed, as there is no match searching for "suppress_prefixlength 0":
&gt;
&gt; [eddieath@oc8361880017 ~]$ sudo wg-quick down wg0
&gt; [#] wg showconf wg0
&gt; sync: ignoring all arguments
&gt; [#] ip -4 rule delete table 51820
&gt; [#] ip link delete dev wg0
&gt; [eddieath@oc8361880017 ~]$ sudo ip rule list
&gt; 0:    from all lookup local
&gt; 32764:    from all lookup main
&gt; 32766:    from all lookup main
&gt; 32767:    from all lookup default
&gt; [eddieath@oc8361880017 ~]$
&gt;
&gt; I've confirmed this on both systems and also that the behaviour is 
&gt; purely within ip, and not anything that wg-quick is doing:
&gt;
&gt; [eddieath@oc8361880017 ~]$ sudo ip rule list
&gt; 0:    from all lookup local
&gt; 32766:    from all lookup main
&gt; 32767:    from all lookup default
&gt; [eddieath@oc8361880017 ~]$ sudo ip -4 rule add table main 
&gt; suppress_prefixlength 0
&gt; [eddieath@oc8361880017 ~]$ sudo ip rule list
&gt; 0:    from all lookup local
&gt; 32765:    from all lookup main
&gt; 32766:    from all lookup main
&gt; 32767:    from all lookup default
&gt; [eddieath@oc8361880017 ~]$
&gt;
&gt; Cheers.
&gt;
&gt; _______________________________________________
&gt; WireGuard mailing list
&gt; <a class="moz-txt-link-abbreviated" href="mailto:WireGuard@lists.zx2c4.com" moz-do-not-send="true">WireGuard@lists.zx2c4.com</a>
&gt; <a class="moz-txt-link-freetext" href="https://lists.zx2c4.com/mailman/listinfo/wireguard" moz-do-not-send="true">https://lists.zx2c4.com/mailman/listinfo/wireguard</a>

</pre>
      </div>
      <!--'"--><br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
WireGuard mailing list
<a class="moz-txt-link-abbreviated" href="mailto:WireGuard@lists.zx2c4.com">WireGuard@lists.zx2c4.com</a>
<a class="moz-txt-link-freetext" href="https://lists.zx2c4.com/mailman/listinfo/wireguard">https://lists.zx2c4.com/mailman/listinfo/wireguard</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <eeb61304-6f66-48f9-1418-2a4e502b9289@53c70r.de>
2018-06-28 12:32 ` Fwd: Re: wg-quick broken by iproute2 update Silvan Nagl
2018-06-28 17:28   ` Silvan Nagl

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/ public-inbox