Skip to content
Commit ffa934f1 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

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: default avatarPatrick McHardy <kaber@trash.net>
Acked-by: default avatarVlad Dogaru <ddvlad@rosedu.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d52344a7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment