summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormdodd <mdodd@FreeBSD.org>2003-04-02 10:28:47 +0000
committermdodd <mdodd@FreeBSD.org>2003-04-02 10:28:47 +0000
commiteb908b026f0d216337af9824e786fbf83a81e862 (patch)
tree62bd58c520b0cb34adfb3c9b504a8afc06b6b4b1 /sys
parent9ab2ed3bdb796432bbf29e91a81e256908605657 (diff)
downloadFreeBSD-src-eb908b026f0d216337af9824e786fbf83a81e862.zip
FreeBSD-src-eb908b026f0d216337af9824e786fbf83a81e862.tar.gz
Sync constant define with NetBSD.
Requested by: Tom Spindler <dogcow@babymeat.com>
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip.h2
-rw-r--r--sys/netinet/ip_input.c2
-rw-r--r--sys/netinet/ip_output.c9
3 files changed, 7 insertions, 6 deletions
diff --git a/sys/netinet/ip.h b/sys/netinet/ip.h
index 4b3c097..6efdc0c 100644
--- a/sys/netinet/ip.h
+++ b/sys/netinet/ip.h
@@ -62,7 +62,7 @@ struct ip {
u_short ip_id; /* identification */
u_short ip_off; /* fragment offset field */
#define IP_RF 0x8000 /* reserved fragment flag */
-#define IP_EVIL 0x8000 /* packet is evil */
+#define IP_EF 0x8000 /* evil flag, per RFC 3514 */
#define IP_DF 0x4000 /* dont fragment flag */
#define IP_MF 0x2000 /* more fragments flag */
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 8b130f5..e80ea2d 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -414,7 +414,7 @@ ip_input(struct mbuf *m)
/*
* Check for RFC3514 (EVIL) packets.
*/
- if (ip->ip_off & IP_EVIL) {
+ if (ip->ip_off & IP_EF) {
ipstat.ips_evil++;
if (hear_no_evil)
goto bad;
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 822ca89..7a26d03 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -235,7 +235,7 @@ ip_output(m0, opt, ro, flags, imo, inp)
if ((flags & (IP_FORWARDING|IP_RAWOUTPUT)) == 0) {
ip->ip_v = IPVERSION;
ip->ip_hl = hlen >> 2;
- ip->ip_off &= IP_DF|IP_EVIL;
+ ip->ip_off &= IP_DF|IP_EF;
#ifdef RANDOM_IP_ID
ip->ip_id = ip_randomid();
#else
@@ -250,9 +250,9 @@ ip_output(m0, opt, ro, flags, imo, inp)
if ((inp != NULL) && /* Originated */
ip_do_rfc3514 && /* Supported */
((inp->inp_flags & INP_EVIL) == INP_EVIL)) /* Optioned */
- ip->ip_off |= IP_EVIL;
+ ip->ip_off |= IP_EF;
- if (speak_no_evil && (ip->ip_off & IP_EVIL)) {
+ if (speak_no_evil && (ip->ip_off & IP_EF)) {
error = EACCES;
goto bad;
}
@@ -1581,6 +1581,7 @@ ip_ctloutput(so, sopt)
case IP_RECVIF:
case IP_PORTRANGE:
case IP_FAITH:
+ case IP_EF:
switch (sopt->sopt_name) {
case IP_TOS:
@@ -1621,7 +1622,7 @@ ip_ctloutput(so, sopt)
case IP_FAITH:
optval = OPTBIT(INP_FAITH);
break;
- case IP_EVIL:
+ case IP_EF:
optval = OPTBIT(INP_EVIL);
}
error = sooptcopyout(sopt, &optval, sizeof optval);
OpenPOWER on IntegriCloud