sit: do not report an error from ipip6_fill_info()

ipip6_fill_info() returns -ENODEV if tunnel->sit_parms is NULL.

This can not happen yet: sit_parms is only cleared from
ipip6_dev_free(), the priv_destructor, which runs long after
RTM_DELLINK has been built.

Returning an error from a fill_info() handler is still a trap,
because rtnl_dump_ifinfo() stops at the first failure and propagates
it, letting one device hide all the remaining ones.

Return 0 instead, there is nothing to report for a device that is
going away.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
Acked-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
Link: https://patch.msgid.link/20260912005442.1795813-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Eric Dumazet 2026-09-12 00:54:42 +00:00 committed by Jakub Kicinski
parent aa5ec571b9
commit f7cd8d2dc7

View File

@ -1853,9 +1853,10 @@ static int ipip6_fill_info(struct sk_buff *skb, const struct net_device *dev)
rcu_read_lock();
parm = rcu_dereference(tunnel->sit_parms);
/* If the device is being dismantled, there is nothing to report. */
if (!parm) {
rcu_read_unlock();
return -ENODEV;
return 0;
}
if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||