ipfwpcap: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT

This commit is contained in:
Gleb Smirnoff 2022-08-30 16:22:50 -07:00
parent 1df08e905a
commit f70a2e2948

View file

@ -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);
}