lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 3 Apr 2014 15:37:33 +0400
From:	"Ilya V. Matveychikov" <i.matveychikov@...uritycode.ru>
To:	<netdev@...r.kernel.org>
Subject: question: update_pmtu doesn't update dst mtu

Hello,

Is this a place where I can post questions not the patches? If so, can anybody
explain me what the problem I have when trying to update dst PMTU value.

So, the scheme is the following:

                  skb->dst                   rt(pmtu)
IN_DEV (MTU 1500) -------> TUNNEL (MTU 1440) -------> OUT_DEV (MTU 1500)

I have a simple tunnel_xmit function that handles all the packets that goes
trough the tunnel. So, I have an skb with valid skb->dst value (filled earlier
in ip_input_route_noref).

Next, when encapsulation is done, I needed to get an output route for the packet
(rt at the scheme). At this point I know that the output route may have a PMTU
value that is different from the OUT_DEV->mtu. So, I'm trying to update the
input skb->dst route's PMTU with the update_pmtu function. It seems that all is
OK, but when I trying to get the dst mtu value (using dst_mtu(skb_dst(skb))) I
always get the value of 1440 (TUNNEL's MTU):

tunnel_xmit:
    ...
    pmtu = dst_mtu(&rt->dst) - OVERHEAD; // pmtu = 1300, for example
    skb_dst(skb)->ops->update_pmtu(skb_dst(skb), NULL, skb, pmtu);
    // dst_mtu(skb_dst(skb)) still returns 1440

Looking through the code gives me that rt_pmtu is always 0 for the skb->dst
entry and ipv4_mtu that called via the dst->ops->mtu() uses dev->mtu :(

So, the question is what I missed when trying to dynamically tunning tunnel's
input route path MTU?

Thanks :)

-- 
Ilya V. Matveychikov
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ