ipv6: anycast: Unify two error paths in ipv6_sock_ac_join().
authorKuniyuki Iwashima <kuniyu@google.com>
Wed, 2 Jul 2025 23:01:30 +0000 (16:01 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 9 Jul 2025 01:32:39 +0000 (18:32 -0700)
commit976fa9b2054f5b5f5eb5488bdc1a230f734992c4
tree73448f1cad3fc41d23ed0319a51b69c1e9c68898
parentf7fdf13bf103bbe8885f722d63fd9377d034d35f
ipv6: anycast: Unify two error paths in ipv6_sock_ac_join().

The next patch will replace __dev_get_by_index() and __dev_get_by_flags()
to RCU + refcount version.

Then, we will need to call dev_put() in some error paths.

Let's unify two error paths to make the next patch cleaner.

Note that we add READ_ONCE() for net->ipv6.devconf_all->forwarding
and idev->conf.forwarding as we will drop RTNL that protects them.

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250702230210.3115355-14-kuni1840@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/anycast.c