From: Nicolas Dichtel Date: Mon, 1 Sep 2014 14:07:26 +0000 (+0200) Subject: rtnl/do_setlink(): set modified when IFLA_TXQLEN is updated X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d1180fcacc5ceb7da5494acfe9c5e4ebad4f281;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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, 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]));