Skip to content

Commit

Permalink
add configuration option to set netfilter table name
Browse files Browse the repository at this point in the history
  • Loading branch information
prydom committed Sep 25, 2021
1 parent df0fbf0 commit f7acbc4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions miniupnpd/miniupnpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,9 @@ init(int argc, char * * argv, struct runtime_vars * v)
break;
#endif /* ENABLE_MANUFACTURER_INFO_CONFIGURATION */
#ifdef USE_NETFILTER
case UPNPTABLENAME:
set_rdr_name(RDR_TABLE_NAME, ary_options[i].value);
break;
case UPNPFORWARDCHAIN:
set_rdr_name(RDR_FORWARD_CHAIN_NAME, ary_options[i].value);
break;
Expand Down
1 change: 1 addition & 0 deletions miniupnpd/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static const struct {
{ UPNPCLEANTHRESHOLD, "clean_ruleset_threshold"},
{ UPNPCLEANINTERVAL, "clean_ruleset_interval"},
#ifdef USE_NETFILTER
{ UPNPTABLENAME, "upnp_table_name"},
{ UPNPFORWARDCHAIN, "upnp_forward_chain"},
{ UPNPNATCHAIN, "upnp_nat_chain"},
{ UPNPNATPOSTCHAIN, "upnp_nat_postrouting_chain"},
Expand Down
1 change: 1 addition & 0 deletions miniupnpd/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ enum upnpconfigoptions {
UPNPPCPMAXLIFETIME, /* maximum lifetime for PCP mapping */
UPNPPCPALLOWTHIRDPARTY, /* allow third-party requests */
#ifdef USE_NETFILTER
UPNPTABLENAME,
UPNPFORWARDCHAIN,
UPNPNATCHAIN,
UPNPNATPOSTCHAIN,
Expand Down

0 comments on commit f7acbc4

Please sign in to comment.