Skip to content

Commit

Permalink
firewall: Initialize iptables directly from firewall.c
Browse files Browse the repository at this point in the history
The current firewall API implementation is depending on iptables. In order
to support a nftables implementation we move the init call from
main.c to firewall.c.
  • Loading branch information
Daniel Wagner authored and pfl committed Sep 2, 2016
1 parent ba926d0 commit 2c0116a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/firewall.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ int __connman_firewall_init(void)
{
DBG("");

__connman_iptables_init();
flush_all_tables();

return 0;
Expand All @@ -539,4 +540,5 @@ void __connman_firewall_cleanup(void)
DBG("");

g_slist_free_full(managed_tables, cleanup_managed_table);
__connman_iptables_cleanup();
}
2 changes: 0 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,6 @@ int main(int argc, char *argv[])
__connman_device_init(option_device, option_nodevice);

__connman_ippool_init();
__connman_iptables_init();
__connman_firewall_init();
__connman_nat_init();
__connman_tethering_init();
Expand Down Expand Up @@ -732,7 +731,6 @@ int main(int argc, char *argv[])
__connman_tethering_cleanup();
__connman_nat_cleanup();
__connman_firewall_cleanup();
__connman_iptables_cleanup();
__connman_peer_service_cleanup();
__connman_peer_cleanup();
__connman_ippool_cleanup();
Expand Down

0 comments on commit 2c0116a

Please sign in to comment.