Skip to contentSkip to conversation

netlabel: fix IPv6 unlabeled address add error handling

net-next Applied Chenguang Zhao 3 participants 3 messages May 22 – May 25

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

netlbl_unlhsh_add_addr6() always returned zero after netlbl_af6list_add(), masking failures such as duplicate IPv6 static label entries.

---
 net/netlabel/netlabel_unlabeled.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netlabel/netlabel_unlabeled.c +1 -1
index ca7a9e2a3de7..0ab825d7f637 100644
@@ -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 */
 
Signature · 1 line
2.25.1
maintainer Acked-by
#1 lore raw
Quoted 9 lines · Chenguang Zhao

netlbl_unlhsh_add_addr6() always returned zero after netlbl_af6list_add(), masking failures such as duplicate IPv6 static label entries.

---
 net/netlabel/netlabel_unlabeled.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Nice catch, thanks!

Signature · 1 line
paul-moore.com
#2 lore raw
In reply to Chenguang Zhao
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Fri, 22 May 2026 10:29:10 +0800 you wrote:

netlbl_unlhsh_add_addr6() always returned zero after netlbl_af6list_add(), masking failures such as duplicate IPv6 static label entries.

---
 net/netlabel/netlabel_unlabeled.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [net-next] netlabel: fix IPv6 unlabeled address add error handling

    https://git.kernel.org/netdev/net-next/c/56872b930fee

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html