git: 1df08e905a0b - main - natd: 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:55 UTC
The branch main has been updated by glebius:

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

commit 1df08e905a0b093bd05ac93761bacabc92171629
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2022-08-30 23:21:19 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2022-08-30 23:24:37 +0000

    natd: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT
---
 sbin/natd/natd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c
index 402c430dfdfd..599a5247ac85 100644
--- a/sbin/natd/natd.c
+++ b/sbin/natd/natd.c
@@ -226,7 +226,7 @@ int main (int argc, char** argv)
  */
 		if (mip->inOutPort) {
 
-			mip->divertInOut = socket (PF_INET, SOCK_RAW, IPPROTO_DIVERT);
+			mip->divertInOut = socket(PF_DIVERT, SOCK_RAW, 0);
 			if (mip->divertInOut == -1)
 				Quit ("Unable to create divert socket.");
 			if (mip->divertInOut > fdMax)
@@ -249,14 +249,14 @@ int main (int argc, char** argv)
 		}
 		else {
 
-			mip->divertIn = socket (PF_INET, SOCK_RAW, IPPROTO_DIVERT);
+			mip->divertIn = socket(PF_DIVERT, SOCK_RAW, 0);
 			if (mip->divertIn == -1)
 				Quit ("Unable to create incoming divert socket.");
 			if (mip->divertIn > fdMax)
 				fdMax = mip->divertIn;
 
 
-			mip->divertOut = socket (PF_INET, SOCK_RAW, IPPROTO_DIVERT);
+			mip->divertOut = socket(PF_DIVERT, SOCK_RAW, 0);
 			if (mip->divertOut == -1)
 				Quit ("Unable to create outgoing divert socket.");
 			if (mip->divertOut > fdMax)
@@ -317,7 +317,7 @@ int main (int argc, char** argv)
 	}
 	if (globalPort) {
 
-		divertGlobal = socket (PF_INET, SOCK_RAW, IPPROTO_DIVERT);
+		divertGlobal = socket(PF_DIVERT, SOCK_RAW, 0);
 		if (divertGlobal == -1)
 			Quit ("Unable to create divert socket.");
 		if (divertGlobal > fdMax)