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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 23 Sep 2020 08:36:50 -0600
From:   David Ahern <dsahern@...il.com>
To:     Eric Dumazet <eric.dumazet@...il.com>,
        Maciej Żenczykowski <zenczykowski@...il.com>,
        Maciej Żenczykowski <maze@...gle.com>,
        "David S . Miller" <davem@...emloft.net>
Cc:     Linux Network Development Mailing List <netdev@...r.kernel.org>,
        Willem de Bruijn <willemb@...gle.com>,
        Lorenzo Colitti <lorenzo@...gle.com>,
        Sunmeet Gill <sgill@...cinc.com>,
        Vinay Paradkar <vparadka@....qualcomm.com>,
        Tyler Wear <twear@...cinc.com>,
        David Ahern <dsahern@...nel.org>
Subject: Re: [PATCH v2] net/ipv4: always honour route mtu during forwarding

On 9/23/20 2:46 AM, Eric Dumazet wrote:
>> diff --git a/include/net/ip.h b/include/net/ip.h
>> index b09c48d862cc..c2188bebbc54 100644
>> --- a/include/net/ip.h
>> +++ b/include/net/ip.h
>> @@ -436,12 +436,17 @@ static inline unsigned int ip_dst_mtu_maybe_forward(const struct dst_entry *dst,
>>  						    bool forwarding)
>>  {
>>  	struct net *net = dev_net(dst->dev);
>> +	unsigned int mtu;
>>  
>>  	if (net->ipv4.sysctl_ip_fwd_use_pmtu ||
>>  	    ip_mtu_locked(dst) ||
>>  	    !forwarding)
>>  		return dst_mtu(dst);
>>  
>> +	/* 'forwarding = true' case should always honour route mtu */
>> +	mtu = dst_metric_raw(dst, RTAX_MTU);
>> +	if (mtu) return mtu;
> 
> 
>         if (mtu)
>                 return mtu;
> 
> Apparently route mtu are capped to 65520, not sure where it is done exactly IP_MAX_MTU being 65535)

ip_metrics_convert seems to be the place"
                if (type == RTAX_MTU && val > 65535 - 15)
                        val = 65535 - 15;

going back through the code moves, and it was added by Dave with
710ab6c03122c

> 
> # ip ro add 1.1.1.4 dev wlp2s0 mtu 100000
> # ip ro get 1.1.1.4
> 1.1.1.4 dev wlp2s0 src 192.168.8.147 uid 0 
>     cache mtu 65520 
> 
> 
> 
> 
>> +
>>  	return min(READ_ONCE(dst->dev->mtu), IP_MAX_MTU);
>>  }
>>  
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ