Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168222627
D59018.id184411.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
905 B
Referenced Files
None
Subscribers
None
D59018.id184411.diff
View Options
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -989,6 +989,13 @@
struct socket *so;
int error;
+#ifdef COMPAT_FREEBSD15
+ /* divert(4) historically abuses PF_INET. Use PF_DIVERT instead. */
+ if (__predict_false(dom == PF_INET && type == SOCK_RAW &&
+ proto == 258 /* IPPROTO_DIVERT */))
+ dom = PF_DIVERT;
+#endif
+
prp = pffindproto(dom, type, proto);
if (prp == NULL) {
/* No support for domain. */
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -253,6 +253,8 @@
/* last return value of *_input(), meaning "all job for this pkt is done". */
#define IPPROTO_DONE 257
+/* #define IPPROTO_DIVERT 258 deprecated */
+
/* Only used internally, so can be outside the range of valid IP protocols. */
#define IPPROTO_SEND 259 /* SeND pseudo-protocol */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 28, 12:27 AM (2 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37425337
Default Alt Text
D59018.id184411.diff (905 B)
Attached To
Mode
D59018: socket: Restore handling of IPPROTO_DIVERT
Attached
Detach File
Event Timeline
Log In to Comment