Sync constant define with NetBSD.

Requested by:	 Tom Spindler <dogcow@babymeat.com>
This commit is contained in:
Matthew N. Dodd 2003-04-02 10:28:47 +00:00
parent b026ec0eb8
commit 8faf6df9b3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112973
3 changed files with 7 additions and 6 deletions

View File

@ -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 */

View File

@ -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;

View File

@ -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);