netlabel: fix IPv6 unlabeled address add error handling
Subsystems (4)
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 <[email protected]>
--- net/netlabel/netlabel_unlabeled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netlabel/netlabel_unlabeled.c +1 -1
@@ -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
Quoted 9 lines · Chenguang Zhao
netlbl_unlhsh_add_addr6()always returned zero afternetlbl_af6list_add(), masking failures such as duplicate IPv6 static label entries.Signed-off-by Chenguang Zhao <[email protected]>--- net/netlabel/netlabel_unlabeled.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Nice catch, thanks!
Acked-by Paul Moore <[email protected]>
Signature · 1 line
paul-moore.com
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 afternetlbl_af6list_add(), masking failures such as duplicate IPv6 static label entries.Signed-off-by Chenguang Zhao <[email protected]>--- 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