git: f70a2e294854 - main - ipfwpcap: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Tue, 30 Aug 2022 23:24:56 UTC
The branch main has been updated by glebius:

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

commit f70a2e2948540f0fdf6afa332b8bf5197eff4255
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2022-08-30 23:22:50 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2022-08-30 23:24:37 +0000

    ipfwpcap: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT
---
 usr.sbin/ipfwpcap/ipfwpcap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/ipfwpcap/ipfwpcap.c b/usr.sbin/ipfwpcap/ipfwpcap.c
index 96ee47e836a6..22a83220855f 100644
--- a/usr.sbin/ipfwpcap/ipfwpcap.c
+++ b/usr.sbin/ipfwpcap/ipfwpcap.c
@@ -202,7 +202,7 @@ main(int ac, char *av[])
 
 if (debug) fprintf(stderr, "bind to %d.\ndump to '%s'.\n", portnum, dumpf);
 
-	if ((r = socket(PF_INET, SOCK_RAW, IPPROTO_DIVERT)) == -1) {
+	if ((r = socket(PF_DIVERT, SOCK_RAW, 0)) == -1) {
 		perror("socket(DIVERT)");
 		exit(2);
 	}