From 56872b930feee7ae07b9720ca950dd9fa65596ee Mon Sep 17 00:00:00 2001 From: Chenguang Zhao Date: Fri, 22 May 2026 10:29:10 +0800 Subject: [PATCH] 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 Acked-by: Paul Moore Link: https://patch.msgid.link/20260522022910.398416-1-zhaochenguang@kylinos.cn Signed-off-by: Jakub Kicinski --- net/netlabel/netlabel_unlabeled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index ca7a9e2a3de7..0ab825d7f637 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 */