rtnl/do_setlink(): set modified when IFLA_TXQLEN is updated
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Mon, 1 Sep 2014 14:07:26 +0000 (16:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Sep 2014 19:57:04 +0000 (12:57 -0700)
The only effect of this patch is to print a warning if IFLA_TXQLEN is updated
and a following change fails.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c

index f0493e3b7471099f0245b0ea0c4b52de4a03034f..5bbaf74bf4571948f537b8fc7902f25265ee6ca3 100644 (file)
@@ -1611,8 +1611,14 @@ static int do_setlink(const struct sk_buff *skb,
                modified = 1;
        }
 
-       if (tb[IFLA_TXQLEN])
-               dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]);
+       if (tb[IFLA_TXQLEN]) {
+               unsigned long value = nla_get_u32(tb[IFLA_TXQLEN]);
+
+               if (dev->tx_queue_len ^ value)
+                       modified = 1;
+
+               dev->tx_queue_len = value;
+       }
 
        if (tb[IFLA_OPERSTATE])
                set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]));