projects
/
project
/
firewall3.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
track used family for ipsets
[project/firewall3.git]
/
defaults.c
diff --git
a/defaults.c
b/defaults.c
index
886da2f
..
3e8ea40
100644
(file)
--- a/
defaults.c
+++ b/
defaults.c
@@
-87,7
+87,7
@@
static struct fw3_option default_opts[] = {
static bool
print_chains(enum fw3_table table, enum fw3_family family,
static bool
print_chains(enum fw3_table table, enum fw3_family family,
- const char *fmt, uint
8
_t flags,
+ const char *fmt, uint
16
_t flags,
const struct chain *chains, int n)
{
bool rv = false;
const struct chain *chains, int n)
{
bool rv = false;
@@
-101,7
+101,7
@@
print_chains(enum fw3_table table, enum fw3_family family,
if (c->table != table)
continue;
if (c->table != table)
continue;
- if ((c->flag != FW3_DEFAULT_UNSPEC) && !
(flags & (1 << c->flag)
))
+ if ((c->flag != FW3_DEFAULT_UNSPEC) && !
hasbit(flags, c->flag
))
continue;
fw3_pr(fmt, c->name);
continue;
fw3_pr(fmt, c->name);
@@
-142,7
+142,7
@@
fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
defs->tcp_window_scaling = true;
defs->custom_chains = true;
defs->tcp_window_scaling = true;
defs->custom_chains = true;
-
defs->flags = (1 << FW3_DEFAULT_IPV4_LOADED
);
+
setbit(defs->flags, FW3_FAMILY_V4
);
uci_foreach_element(&p->sections, e)
{
uci_foreach_element(&p->sections, e)
{
@@
-165,7
+165,7
@@
fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
check_policy(e, &defs->policy_forward, "forward");
if (!defs->disable_ipv6)
check_policy(e, &defs->policy_forward, "forward");
if (!defs->disable_ipv6)
- setbit(defs->flags, FW3_
DEFAULT_IPV6_LOADED
);
+ setbit(defs->flags, FW3_
FAMILY_V6
);
if (defs->custom_chains)
setbit(defs->flags, FW3_DEFAULT_CUSTOM_CHAINS);
if (defs->custom_chains)
setbit(defs->flags, FW3_DEFAULT_CUSTOM_CHAINS);