mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
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:
@@ -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];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user