-/* Code to take an iptables-style command line and do it. */
+/* Code to take an ip6tables-style command line and do it. */
/*
* Author: Paul.Russell@rustcorp.com.au and mneuling@radlogic.com.au
exit_tryhelp(status);
if (status == VERSION_PROBLEM)
fprintf(stderr,
- "Perhaps iptables or your kernel needs to be upgraded.\n");
+ "Perhaps ip6tables or your kernel needs to be upgraded.\n");
exit(status);
}
if (!optarg)
optarg = argv[optind];
- /* iptables -p icmp -h */
+ /* ip6tables -p icmp -h */
if (!matches && protocol)
find_match(protocol, TRY_LOAD, &matches);
target->t = fw_calloc(1, size);
target->t->u.target_size = size;
strcpy(target->t->u.user.name, jumpto);
- target->init(target->t, &fw.nfcache);
+ if (target->init != NULL)
+ target->init(target->t, &fw.nfcache);
opts = merge_options(opts, target->extra_opts, &target->option_offset);
}
break;
m->m = fw_calloc(1, size);
m->m->u.match_size = size;
strcpy(m->m->u.user.name, m->name);
- m->init(m->m, &fw.nfcache);
+ if (m->init != NULL)
+ m->init(m->m, &fw.nfcache);
opts = merge_options(opts, m->extra_opts, &m->option_offset);
}
break;
* - a protocol has been specified
* - the protocol extension has not been
* loaded yet, or is loaded and unused
- * [think of iptables-restore!]
+ * [think of ip6tables-restore!]
* - the protocol extension can be successively
* loaded
*/
m->m = fw_calloc(1, size);
m->m->u.match_size = size;
strcpy(m->m->u.user.name, m->name);
- m->init(m->m, &fw.nfcache);
+ if (m->init != NULL)
+ m->init(m->m, &fw.nfcache);
opts = merge_options(opts,
m->extra_opts, &m->option_offset);
target->t = fw_calloc(1, size);
target->t->u.target_size = size;
strcpy(target->t->u.user.name, jumpto);
- target->init(target->t, &fw.nfcache);
+ if (target->init != NULL)
+ target->init(target->t, &fw.nfcache);
}
if (!target) {