diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-12-17 01:07:44 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-12-17 01:07:44 +0000 |
commit | 9903178ee7f107dc04a4ecf48eccde12353622f4 (patch) | |
tree | 482e2373e8f21cf03457f42f53c66517a9fd472d /contrib/fwd/src/fwd.c | |
parent | 5abef1380ef5c4271aa1d26339306dccf04c9ab2 (diff) |
contrib/fwd: implement fwd_ipt_delif() and fwd_ipt_clear_ruleset()
Diffstat (limited to 'contrib/fwd/src/fwd.c')
-rw-r--r-- | contrib/fwd/src/fwd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/fwd/src/fwd.c b/contrib/fwd/src/fwd.c index 9d925bc00a..903834b104 100644 --- a/contrib/fwd/src/fwd.c +++ b/contrib/fwd/src/fwd.c @@ -27,7 +27,6 @@ int main(int argc, const char *argv[]) { struct fwd_handle *h; - struct iptc_handle *ipt; if( getuid() > 0 ) fwd_fatal("Need root permissions!"); @@ -49,6 +48,13 @@ int main(int argc, const char *argv[]) fwd_ipt_addif(h, "lan"); fwd_ipt_addif(h, "wan"); + sleep(1); + + fwd_ipt_delif(h, "wan"); + fwd_ipt_delif(h, "lan"); + + fwd_ipt_clear_ruleset(h); + close(h->rtnl_socket); fwd_free_config(h->conf); fwd_free_addrs(h->addrs); |