aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/rtnetlink.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 8c971a2efe..1a6c5b9d41 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -689,8 +689,15 @@ static int rtnl_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
689 } 689 }
690 690
691 691
692 if (ifm->ifi_flags) 692 if (ifm->ifi_flags || ifm->ifi_change) {
693 dev_change_flags(dev, ifm->ifi_flags); 693 unsigned int flags = ifm->ifi_flags;
694
695 /* bugwards compatibility: ifi_change == 0 is treated as ~0 */
696 if (ifm->ifi_change)
697 flags = (flags & ifm->ifi_change) |
698 (dev->flags & ~ifm->ifi_change);
699 dev_change_flags(dev, flags);
700 }
694 701
695 if (tb[IFLA_TXQLEN]) 702 if (tb[IFLA_TXQLEN])
696 dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]); 703 dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]);