aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/in_pcb.h
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2009-06-01 10:30:00 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2009-06-01 10:30:00 +0000
commitf44270e764dc8b896c138a9d8d19ead6572c3a99 (patch)
treece73855429371a51ef92709203be008be66b6119 /sys/netinet/in_pcb.h
parent2430d824488690380bbb31ee7001eb7125e16f5e (diff)
downloadsrc-f44270e764dc8b896c138a9d8d19ead6572c3a99.tar.gz
src-f44270e764dc8b896c138a9d8d19ead6572c3a99.zip
- Rename IP_NONLOCALOK IP socket option to IP_BINDANY, to be more consistent
with OpenBSD (and BSD/OS originally). We can't easly do it SOL_SOCKET option as there is no more space for more SOL_SOCKET options, but this option also fits better as an IP socket option, it seems. - Implement this functionality also for IPv6 and RAW IP sockets. - Always compile it in (don't use additional kernel options). - Remove sysctl to turn this functionality on and off. - Introduce new privilege - PRIV_NETINET_BINDANY, which allows to use this functionality (currently only unjail root can use it). Discussed with: julian, adrian, jhb, rwatson, kmacy
Notes
Notes: svn path=/head/; revision=193217
Diffstat (limited to 'sys/netinet/in_pcb.h')
-rw-r--r--sys/netinet/in_pcb.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
index aa30e43d7460..da1e80db5447 100644
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -410,8 +410,7 @@ void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp,
#define INP_FAITH 0x00000200 /* accept FAITH'ed connections */
#define INP_RECVTTL 0x00000400 /* receive incoming IP TTL */
#define INP_DONTFRAG 0x00000800 /* don't fragment packet */
-#define INP_NONLOCALOK 0x00001000 /* Allow bind to spoof any address */
- /* - requires options IP_NONLOCALBIND */
+#define INP_BINDANY 0x00001000 /* allow bind to any address */
#define INP_INHASHLIST 0x00002000 /* in_pcbinshash() has been called */
#define IN6P_IPV6_V6ONLY 0x00008000 /* restrict AF_INET6 socket for v6 */
#define IN6P_PKTINFO 0x00010000 /* receive IP6 dst and I/F */