------------------------------------------------------------ revno: 5971 committer: David Martin <david.martin.mailbox@xxxxxxxxxxxxxx> branch nick: hipl_startup timestamp: Tue 2011-06-21 17:12:00 +0200 message: Print warning for conflicting firewall options iff latter are set by user. Instead of printing the misleading warning "Warning: timeouts (-t) have no effect with connection tracking disabled (-F)" everytime the firewall is started with -F, print it only when -t _and_ -F are specified by the user. modified: firewall/main.c -- lp:hipl https://code.launchpad.net/~hipl-core/hipl/trunk Your team HIPL core team is subscribed to branch lp:hipl. To unsubscribe from this branch go to https://code.launchpad.net/~hipl-core/hipl/trunk/+edit-subscription
=== modified file 'firewall/main.c' --- firewall/main.c 2011-03-28 10:03:56 +0000 +++ firewall/main.c 2011-06-21 15:12:00 +0000 @@ -97,10 +97,11 @@ */ int main(int argc, char *argv[]) { - bool foreground = true; - bool kill_old = false; - bool limit_capabilities = false; - const char *rule_file = NULL; + bool foreground = true; + bool kill_old = false; + bool limit_capabilities = false; + bool timeout_set_by_user = false; + const char *rule_file = NULL; char *end_of_number; int ch; @@ -171,6 +172,7 @@ /* we must poll at least once per timeout interval */ cleanup_interval = connection_timeout; } + timeout_set_by_user = true; break; case 'u': esp_speedup = 1; @@ -193,7 +195,7 @@ } } - if (connection_timeout > 0 && !filter_traffic) { + if (timeout_set_by_user && !filter_traffic) { puts("Warning: timeouts (-t) have no effect with connection"); puts(" tracking disabled (-F)"); } @@ -231,5 +233,5 @@ } return hipfw_main(rule_file, kill_old, limit_capabilities) == 0 ? EXIT_SUCCESS - : EXIT_FAILURE; + : EXIT_FAILURE; }