aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
authorChenguang Zhao <zhaochenguang@kylinos.cn>2026-05-22 10:29:10 +0800
committerJakub Kicinski <kuba@kernel.org>2026-05-25 11:44:09 -0700
commit56872b930feee7ae07b9720ca950dd9fa65596ee (patch)
treef2563e0778b784dc1d38e38a1dcd382540f986b7 /net
parent67636cab273ed0c0b0f2adab6c9369a471cb7966 (diff)
downloadlinux-next-history-56872b930feee7ae07b9720ca950dd9fa65596ee.tar.gz
netlabel: fix IPv6 unlabeled address add error handling
netlbl_unlhsh_add_addr6() always returned zero after netlbl_af6list_add(), masking failures such as duplicate IPv6 static label entries. Signed-off-by: Chenguang Zhao <zhaochenguang@kylinos.cn> Acked-by: Paul Moore <paul@paul-moore.com> Link: https://patch.msgid.link/20260522022910.398416-1-zhaochenguang@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/netlabel/netlabel_unlabeled.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c
index ca7a9e2a3de78..0ab825d7f637a 100644
--- a/net/netlabel/netlabel_unlabeled.c
+++ b/net/netlabel/netlabel_unlabeled.c
@@ -295,7 +295,7 @@ static int netlbl_unlhsh_add_addr6(struct netlbl_unlhsh_iface *iface,
if (ret_val != 0)
kfree(entry);
- return 0;
+ return ret_val;
}
#endif /* IPv6 */