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]
Message-ID: <2AD939572F25A448A3AE3CAEA61328C23785704D@BC-MAIL-M28.internal.baidu.com>
Date:   Fri, 13 Jul 2018 09:11:34 +0000
From:   "Li,Rongqing" <lirongqing@...du.com>
To:     Nikolay Aleksandrov <nikolay@...ulusnetworks.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: 答复: [PATCH][net-next] bridge: clean up mtu_set_by_user setting to false and comments



> -----邮件原件-----
> 发件人: Nikolay Aleksandrov [mailto:nikolay@...ulusnetworks.com]
> 发送时间: 2018年7月13日 16:01
> 收件人: Li,Rongqing <lirongqing@...du.com>; netdev@...r.kernel.org
> 主题: Re: [PATCH][net-next] bridge: clean up mtu_set_by_user setting to
> false and comments
> 
> On 13/07/18 09:47, Li RongQing wrote:
> > Once mtu_set_by_user is set to true, br_mtu_auto_adjust will not run,
> > and no chance to clear mtu_set_by_user.
> >
> ^^
> This was by design, there is no error here and no "cleanup" is needed.
> If you read the ndo_change_mtu() call you'll see the comment:
> /* this flag will be cleared if the MTU was automatically adjusted */
>
But after this comment, mtu_set_by_user is set to true, and br_mtu_auto_adjust
 will not truly be run, how to set mtu_set_by_user to false?

230     /* this flag will be cleared if the MTU was automatically adjusted */
231     br->mtu_set_by_user = true;

And the line 457  is useless, since it run only if it is false?

445 void br_mtu_auto_adjust(struct net_bridge *br)
446 {
447     ASSERT_RTNL();
448 
449     /* if the bridge MTU was manually configured don't mess with it */
450     if (br->mtu_set_by_user)
451         return;
452 
453     /* change to the minimum MTU and clear the flag which was set by
454      * the bridge ndo_change_mtu callback
455      */
456     dev_set_mtu(br->dev, br_mtu_min(br));
457     br->mtu_set_by_user = false;
458 }


-R

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ