aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2014-09-01 10:07:26 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-02 15:57:04 -0400
commit5d1180fcacc5ceb7da5494acfe9c5e4ebad4f281 (patch)
tree53b8ef9d0134ede6109146624ae8e679ebccae83 /net
parent219c5361e625186c21f3e1bc7bc67cd7dac50ca9 (diff)
rtnl/do_setlink(): set modified when IFLA_TXQLEN is updated
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>
Diffstat (limited to 'net')
-rw-r--r--net/core/rtnetlink.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index f0493e3b7471..5bbaf74bf457 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1611,8 +1611,14 @@ static int do_setlink(const struct sk_buff *skb,
1611 modified = 1; 1611 modified = 1;
1612 } 1612 }
1613 1613
1614 if (tb[IFLA_TXQLEN]) 1614 if (tb[IFLA_TXQLEN]) {
1615 dev->tx_queue_len = nla_get_u32(tb[IFLA_TXQLEN]); 1615 unsigned long value = nla_get_u32(tb[IFLA_TXQLEN]);
1616
1617 if (dev->tx_queue_len ^ value)
1618 modified = 1;
1619
1620 dev->tx_queue_len = value;
1621 }
1616 1622
1617 if (tb[IFLA_OPERSTATE]) 1623 if (tb[IFLA_OPERSTATE])
1618 set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE])); 1624 set_operstate(dev, nla_get_u8(tb[IFLA_OPERSTATE]));