Skip to content

Commit

Permalink
rtnl/do_setlink(): set modified when IFLA_TXQLEN is updated
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Dichtel authored and David S. Miller committed Sep 2, 2014
1 parent 219c536 commit 5d1180f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]));
Expand Down

0 comments on commit 5d1180f

Please sign in to comment.