[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZFEFzvaRmPL5kLE6@Laptop-X1>
Date: Tue, 2 May 2023 20:45:02 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: Simon Horman <simon.horman@...igine.com>
Cc: netdev@...r.kernel.org, Jay Vosburgh <j.vosburgh@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>,
Liang Li <liali@...hat.com>, Vincent Bernat <vincent@...nat.ch>
Subject: Re: [PATCHv2 net 1/4] bonding: fix send_peer_notif overflow
On Fri, Apr 28, 2023 at 10:04:22PM +0200, Simon Horman wrote:
> On Thu, Apr 27, 2023 at 11:39:06AM +0800, Hangbin Liu wrote:
>
> ...
>
> > diff --git a/drivers/net/bonding/bond_netlink.c b/drivers/net/bonding/bond_netlink.c
> > index c2d080fc4fc4..09a501cdea0c 100644
> > --- a/drivers/net/bonding/bond_netlink.c
> > +++ b/drivers/net/bonding/bond_netlink.c
> > @@ -244,6 +244,12 @@ static int bond_changelink(struct net_device *bond_dev, struct nlattr *tb[],
> > if (data[IFLA_BOND_PEER_NOTIF_DELAY]) {
> > int delay = nla_get_u32(data[IFLA_BOND_PEER_NOTIF_DELAY]);
> >
> > + if (delay > 300000) {
> > + NL_SET_ERR_MSG_ATTR(extack, data[IFLA_BOND_PEER_NOTIF_DELAY],
> > + "peer_notif_delay should be less than 300s");
> > + return -EINVAL;
> > + }
>
> Hi Hangbin,
>
> can this limit be implemented using NLA_POLICY_MAX() in bond_policy ?
Thanks for the comment, I will update the patch after backing from holiday
next week.
Hangbin
Powered by blists - more mailing lists