ipaccess: Fix the case of specifying the interface

Pablo pointed out that my previous commit was rubish. If we have
less than two arguments we want ifname to remain NULL and if we
have a second argument (or more) we want to use that as the interface
name to bind to.
This commit is contained in:
Holger Hans Peter Freyther 2011-05-17 20:34:53 +02:00
parent c0370e4399
commit 1e9ae4be66
1 changed files with 1 additions and 0 deletions

View File

@ -175,6 +175,7 @@ int main(int argc, char **argv)
if (argc < 2) {
fprintf(stdout, "you might need to specify the outgoing\n"
" network interface, e.g. ``%s eth0''\n", argv[0]);
} else {
ifname = argv[1];
}