Anchor name (PF) is now configurable through the config file with anchor=
This commit is contained in:
parent
73ef11624a
commit
874283b36f
|
@ -1,4 +1,7 @@
|
||||||
$Id: Changelog.txt,v 1.249 2012/02/01 11:13:29 nanard Exp $
|
$Id: Changelog.txt,v 1.250 2012/02/03 11:59:13 nanard Exp $
|
||||||
|
|
||||||
|
2012/02/03:
|
||||||
|
Anchor name (PF) is now configurable through the config file with anchor=
|
||||||
|
|
||||||
2012/02/01:
|
2012/02/01:
|
||||||
always handle EAGAIN, EWOULDBLOCK and EINTR after recv()/recvfrom() calls
|
always handle EAGAIN, EWOULDBLOCK and EINTR after recv()/recvfrom() calls
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: miniupnpd.c,v 1.138 2011/05/27 21:58:12 nanard Exp $ */
|
/* $Id: miniupnpd.c,v 1.139 2012/02/03 11:59:15 nanard Exp $ */
|
||||||
/* MiniUPnP project
|
/* MiniUPnP project
|
||||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||||
* (c) 2006-2011 Thomas Bernard
|
* (c) 2006-2011 Thomas Bernard
|
||||||
|
@ -700,6 +700,9 @@ init(int argc, char * * argv, struct runtime_vars * v)
|
||||||
v->clean_ruleset_interval = atoi(ary_options[i].value);
|
v->clean_ruleset_interval = atoi(ary_options[i].value);
|
||||||
break;
|
break;
|
||||||
#ifdef USE_PF
|
#ifdef USE_PF
|
||||||
|
case UPNPANCHOR:
|
||||||
|
anchor_name = ary_options[i].value;
|
||||||
|
break;
|
||||||
case UPNPQUEUE:
|
case UPNPQUEUE:
|
||||||
queue = ary_options[i].value;
|
queue = ary_options[i].value;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -67,9 +67,12 @@ notify_interval=60
|
||||||
# a 600 seconds (10 minutes) interval makes sense
|
# a 600 seconds (10 minutes) interval makes sense
|
||||||
clean_ruleset_interval=600
|
clean_ruleset_interval=600
|
||||||
|
|
||||||
# log packets in pf
|
# log packets in pf (default is no)
|
||||||
#packet_log=no
|
#packet_log=no
|
||||||
|
|
||||||
|
# anchor name in pf (default is miniupnpd)
|
||||||
|
#anchor=miniupnpd
|
||||||
|
|
||||||
# ALTQ queue in pf
|
# ALTQ queue in pf
|
||||||
# filter rules must be used for this to be used.
|
# filter rules must be used for this to be used.
|
||||||
# compile with PF_ENABLE_FILTER_RULES (see config.h file)
|
# compile with PF_ENABLE_FILTER_RULES (see config.h file)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: options.c,v 1.20 2008/10/06 13:22:02 nanard Exp $ */
|
/* $Id: options.c,v 1.21 2012/02/03 11:59:16 nanard Exp $ */
|
||||||
/* MiniUPnP project
|
/* MiniUPnP project
|
||||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||||
* author: Ryan Wagoner
|
* author: Ryan Wagoner
|
||||||
|
@ -46,6 +46,7 @@ static const struct {
|
||||||
#endif
|
#endif
|
||||||
{ UPNPENABLE, "enable_upnp"},
|
{ UPNPENABLE, "enable_upnp"},
|
||||||
#ifdef USE_PF
|
#ifdef USE_PF
|
||||||
|
{ UPNPANCHOR, "anchor"},
|
||||||
{ UPNPQUEUE, "queue"},
|
{ UPNPQUEUE, "queue"},
|
||||||
{ UPNPTAG, "tag"},
|
{ UPNPTAG, "tag"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: options.h,v 1.15 2008/10/06 13:22:02 nanard Exp $ */
|
/* $Id: options.h,v 1.16 2012/02/03 11:59:16 nanard Exp $ */
|
||||||
/* MiniUPnP project
|
/* MiniUPnP project
|
||||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||||
* author: Ryan Wagoner
|
* author: Ryan Wagoner
|
||||||
|
@ -35,6 +35,7 @@ enum upnpconfigoptions {
|
||||||
UPNPNATCHAIN,
|
UPNPNATCHAIN,
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_PF
|
#ifdef USE_PF
|
||||||
|
UPNPANCHOR, /* anchor */
|
||||||
UPNPQUEUE, /* queue */
|
UPNPQUEUE, /* queue */
|
||||||
UPNPTAG, /* tag */
|
UPNPTAG, /* tag */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: obsdrdr.c,v 1.67 2011/06/22 21:20:27 nanard Exp $ */
|
/* $Id: obsdrdr.c,v 1.69 2012/02/03 11:59:16 nanard Exp $ */
|
||||||
/* MiniUPnP project
|
/* MiniUPnP project
|
||||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||||
* (c) 2006-2010 Thomas Bernard
|
* (c) 2006-2010 Thomas Bernard
|
||||||
|
@ -101,9 +101,6 @@ remove_timestamp_entry(unsigned short eport, int proto)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* anchor name */
|
|
||||||
static const char anchor_name[] = "miniupnpd";
|
|
||||||
|
|
||||||
/* /dev/pf when opened */
|
/* /dev/pf when opened */
|
||||||
static int dev = -1;
|
static int dev = -1;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: upnpglobalvars.c,v 1.25 2011/05/27 21:36:22 nanard Exp $ */
|
/* $Id: upnpglobalvars.c,v 1.26 2012/02/03 11:59:16 nanard Exp $ */
|
||||||
/* MiniUPnP project
|
/* MiniUPnP project
|
||||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||||
* (c) 2006-2010 Thomas Bernard
|
* (c) 2006-2010 Thomas Bernard
|
||||||
|
@ -62,6 +62,7 @@ unsigned short nextnatpmptoclean_proto = 0;
|
||||||
unsigned int nextruletoclean_timestamp = 0;
|
unsigned int nextruletoclean_timestamp = 0;
|
||||||
|
|
||||||
#ifdef USE_PF
|
#ifdef USE_PF
|
||||||
|
const char * anchor_name = "miniupnpd";
|
||||||
const char * queue = 0;
|
const char * queue = 0;
|
||||||
const char * tag = 0;
|
const char * tag = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: upnpglobalvars.h,v 1.29 2011/05/27 21:36:22 nanard Exp $ */
|
/* $Id: upnpglobalvars.h,v 1.30 2012/02/03 11:59:16 nanard Exp $ */
|
||||||
/* MiniUPnP project
|
/* MiniUPnP project
|
||||||
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||||
* (c) 2006-2011 Thomas Bernard
|
* (c) 2006-2011 Thomas Bernard
|
||||||
|
@ -82,6 +82,7 @@ extern unsigned short nextnatpmptoclean_proto;
|
||||||
extern unsigned int nextruletoclean_timestamp;
|
extern unsigned int nextruletoclean_timestamp;
|
||||||
|
|
||||||
#ifdef USE_PF
|
#ifdef USE_PF
|
||||||
|
extern const char * anchor_name;
|
||||||
/* queue and tag for PF rules */
|
/* queue and tag for PF rules */
|
||||||
extern const char * queue;
|
extern const char * queue;
|
||||||
extern const char * tag;
|
extern const char * tag;
|
||||||
|
|
Loading…
Reference in New Issue