netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vlad Dogaru <ddvlad@rosedu.org>
To: Patrick McHardy <kaber@trash.net>
Cc: NetDev <netdev@vger.kernel.org>, "David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH] rtnetlink: fix link attribute validation with IFLA_GROUP
Date: Thu, 20 Jan 2011 18:09:10 +0200	[thread overview]
Message-ID: <20110120160909.GC12415@cormyr> (raw)
In-Reply-To: <4D3831FA.2010806@trash.net>

On Thu, Jan 20, 2011 at 02:00:42PM +0100, Patrick McHardy wrote:
> Fix a few semantic problems with the new IFLA_GROUP attribute.
> 
> Vlad, could you please give this is a try to see whether it
> still behaves as expected?

> commit e4b31d565a45e06ed2e51a005f5c00ff1d00725c
> Author: Patrick McHardy <kaber@trash.net>
> Date:   Thu Jan 20 13:55:25 2011 +0100
> 
>     rtnetlink: fix link attribute validation with IFLA_GROUP
>     
>     rtnl_group_changelink() is invoked by rtnl_newlink() before the link
>     attributes have been validated. Additionally the group changes are
>     performed even if NLM_F_CREATE is specified and a new link is
>     created, while more reasonable semantics would be to set the group
>     value on the newly created link.
>     
>     Fix both problems by moving the rtnl_group_changelink() invocation
>     down to the handling of non-existant links without NLM_F_CREATE()
>     and add a dev_set_group() call to rtnl_create_link().
>     
>     Signed-off-by: Patrick McHardy <kaber@trash.net>

Acked-by: Vlad Dogaru <ddvlad@rosedu.org>

This looks OK and behaves as before. Thanks for taking the time to look
through it, the new semantics do seem saner.

There is a slight difference, though: in the (yet unapplied) iproute2
patch, ifi_index is set to -1 and kernel space checks that it is <= 0;
your patch checks for == 0. I will update the iproute2 patches with
setting ifi_index to 0 (and other changes) and resubmit them.

  reply	other threads:[~2011-01-21  7:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 13:00 [PATCH] rtnetlink: fix link attribute validation with IFLA_GROUP Patrick McHardy
2011-01-20 16:09 ` Vlad Dogaru [this message]
2011-01-21  7:29   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110120160909.GC12415@cormyr \
    --to=ddvlad@rosedu.org \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).