summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in.h
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>2002-10-29 16:46:13 +0000
committerfenner <fenner@FreeBSD.org>2002-10-29 16:46:13 +0000
commit68784e2b89c00e55ec18f52a94e0a73b1e5a63ff (patch)
tree159621e947c8ca45b87c64883d4b7c7bc3405e1d /sys/netinet/in.h
parent40dc9090f37ec561f9d2f488fc3817617cadc360 (diff)
downloadFreeBSD-src-68784e2b89c00e55ec18f52a94e0a73b1e5a63ff.zip
FreeBSD-src-68784e2b89c00e55ec18f52a94e0a73b1e5a63ff.tar.gz
Renumber IPPROTO_DIVERT out of the range of valid IP protocol numbers.
This allows socket() to return an error when the kernel is not built with IPDIVERT, and doesn't prevent future applications from using the "borrowed" IP protocol number. The sysctl net.inet.raw.olddiverterror controls whether opening a socket with the "borrowed" IP protocol fails with an accompanying kernel printf; this code should last only a couple of releases. Approved by: re
Diffstat (limited to 'sys/netinet/in.h')
-rw-r--r--sys/netinet/in.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index 09fd395..c974bc5 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -236,13 +236,16 @@ __END_DECLS
#define IPPROTO_PIM 103 /* Protocol Independent Mcast */
#define IPPROTO_PGM 113 /* PGM */
/* 255: Reserved */
-/* BSD Private, local use, namespace incursion */
-#define IPPROTO_DIVERT 254 /* divert pseudo-protocol */
+/* BSD Private, local use, namespace incursion, no longer used */
+#define IPPROTO_OLD_DIVERT 254 /* OLD divert pseudo-proto */
#define IPPROTO_MAX 256
/* last return value of *_input(), meaning "all job for this pkt is done". */
#define IPPROTO_DONE 257
+/* Only used internally, so can be outside the range of valid IP protocols. */
+#define IPPROTO_DIVERT 258 /* divert pseudo-protocol */
+
/*
* Local port number conventions:
*
OpenPOWER on IntegriCloud