Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Apr 2025 22:11:51 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 1408670c90ae - main - in6_control_ioctl: correctly report errors from SIOCAIFADDR_IN6
Message-ID:  <202504072211.537MBpsD093657@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=1408670c90ae38fd51ea6aaabe46757bc880608e

commit 1408670c90ae38fd51ea6aaabe46757bc880608e
Author:     Lexi Winter <lexi@hemlock.eden.le-fay.org>
AuthorDate: 2025-04-07 12:40:07 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-04-07 20:46:03 +0000

    in6_control_ioctl: correctly report errors from SIOCAIFADDR_IN6
    
    we have to use 'goto out' here rather than 'break' because otherwise
    error is set to 0, which means the error is not propagated back to the
    caller.
    
    Reviewed by:    kp
---
 sys/netinet6/in6.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index ffbe64f4de80..00a0b40154d2 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -587,7 +587,7 @@ in6_control_ioctl(u_long cmd, void *data,
 #endif
 		error = in6_addifaddr(ifp, ifra, ia);
 		ia = NULL;
-		break;
+		goto out;
 
 	case SIOCDIFADDR_IN6:
 		in6_purgeifaddr(ia);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504072211.537MBpsD093657>