mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Sync constant define with NetBSD.
Requested by: Tom Spindler <dogcow@babymeat.com>
This commit is contained in:
parent
b026ec0eb8
commit
8faf6df9b3
3 changed files with 7 additions and 6 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue