From 1e9ae4be66eef151fec5cd08d532f6c1c191efed Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 17 May 2011 20:34:53 +0200 Subject: 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. --- openbsc/src/ipaccess/ipaccess-find.c | 1 + 1 file changed, 1 insertion(+) diff --git a/openbsc/src/ipaccess/ipaccess-find.c b/openbsc/src/ipaccess/ipaccess-find.c index 4b5f6122a..3f9bf4140 100644 --- a/openbsc/src/ipaccess/ipaccess-find.c +++ b/openbsc/src/ipaccess/ipaccess-find.c @@ -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]; } -- cgit v1.2.3