Support for OpenBSD 5.0
.onrdomain field was added in ps with OpenBSD 5.0. Add PFRULE_HAS_ONRDOMAIN
This commit is contained in:
parent
c07408ef1f
commit
b30d2f8edc
|
@ -1,7 +1,8 @@
|
|||
$Id: Changelog.txt,v 1.247 2012/01/20 21:45:56 nanard Exp $
|
||||
$Id: Changelog.txt,v 1.248 2012/01/20 21:57:45 nanard Exp $
|
||||
|
||||
2012/01/20:
|
||||
Always #include <netinet/in.h> before #include <arpa/inet.h> (for OpenBSD)
|
||||
.onrdomain field was added in ps with OpenBSD 5.0. Add PFRULE_HAS_ONRDOMAIN
|
||||
|
||||
2012/01/02:
|
||||
Fixing netfilter/iptables_*.sh scripts for new ifconfig output format.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#! /bin/sh
|
||||
# $Id: genconfig.sh,v 1.50 2011/07/25 16:03:46 nanard Exp $
|
||||
# $Id: genconfig.sh,v 1.51 2011/11/18 11:54:00 nanard Exp $
|
||||
# miniupnp daemon
|
||||
# http://miniupnp.free.fr or http://miniupnp.tuxfamily.org/
|
||||
# (c) 2006-2011 Thomas Bernard
|
||||
|
@ -73,6 +73,10 @@ case $OS_NAME in
|
|||
if [ \( $MAJORVER -ge 5 \) -o \( $MAJORVER -eq 4 -a $MINORVER -ge 7 \) ]; then
|
||||
echo "#define PF_NEWSTYLE" >> ${CONFIGFILE}
|
||||
fi
|
||||
# onrdomain was introduced in OpenBSD 5.0
|
||||
if [ $MAJORVER -ge 5 ]; then
|
||||
echo "#define PFRULE_HAS_ONRDOMAIN" >> ${CONFIGFILE}
|
||||
fi
|
||||
echo "#define USE_PF 1" >> ${CONFIGFILE}
|
||||
FW=pf
|
||||
echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE}
|
||||
|
|
|
@ -247,6 +247,9 @@ add_redirect_rule2(const char * ifname,
|
|||
pcr.rule.log = (GETFLAG(LOGPACKETSMASK))?1:0; /*logpackets;*/
|
||||
#ifdef PFRULE_HAS_RTABLEID
|
||||
pcr.rule.rtableid = -1; /* first appeared in OpenBSD 4.0 */
|
||||
#endif
|
||||
#ifdef PFRULE_HAS_ONRDOMAIN
|
||||
pcr.rule.onrdomain = -1; /* first appeared in OpenBSD 5.0 */
|
||||
#endif
|
||||
pcr.rule.quick = 1;
|
||||
pcr.rule.keep_state = PF_STATE_NORMAL;
|
||||
|
@ -377,6 +380,9 @@ add_filter_rule2(const char * ifname,
|
|||
pcr.rule.flagset = (TH_SYN|TH_ACK);
|
||||
#ifdef PFRULE_HAS_RTABLEID
|
||||
pcr.rule.rtableid = -1; /* first appeared in OpenBSD 4.0 */
|
||||
#endif
|
||||
#ifdef PFRULE_HAS_ONRDOMAIN
|
||||
pcr.rule.onrdomain = -1; /* first appeared in OpenBSD 5.0 */
|
||||
#endif
|
||||
pcr.rule.keep_state = 1;
|
||||
strlcpy(pcr.rule.label, desc, PF_RULE_LABEL_SIZE);
|
||||
|
|
Loading…
Reference in New Issue