git: 9f8c2b37e740 - stable/12 - pf: use ERROUT_IOCTL()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 14 Apr 2022 08:00:28 UTC
The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9f8c2b37e740d5debff577daa97b1b1b5a7827b1 commit 9f8c2b37e740d5debff577daa97b1b1b5a7827b1 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2022-04-06 14:45:18 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2022-04-14 07:50:18 +0000 pf: use ERROUT_IOCTL() Use ERROUT_IOCTL() rather than hand-rolling the macro. This adds DTrace SDTs in the error path, making debugging ioctl errors easier. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit bef7104571f35eeffc27b25d8857a7940dd23ab8) --- sys/netpfil/pf/pf_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 11be26ad9438..e2b5d0704f16 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2651,7 +2651,7 @@ DIOCGETRULENV_error: TAILQ_INIT(&newrule->rpool.list); } -#define ERROUT(x) { error = (x); goto DIOCCHANGERULE_error; } +#define ERROUT(x) ERROUT_IOCTL(DIOCCHANGERULE_error, x) PF_RULES_WLOCK(); #ifdef PF_WANT_32_TO_64_COUNTER