abisip-find: Improve use information output
Interestingly, SO_BINDTODEVICE used to bind to a specific iface
requires root permissions. However, the same target can be accomplished
by binding to a local IP addr set on the target interface, which doesn't
require root permissions in this case.
Change-Id: Ie123c45005d68b186cb06538f7bd31f3b2513007
diff --git a/src/ipaccess/abisip-find.c b/src/ipaccess/abisip-find.c
index 03f579b..21ed50e 100644
--- a/src/ipaccess/abisip-find.c
+++ b/src/ipaccess/abisip-find.c
@@ -436,9 +436,11 @@
handle_options(argc, argv);
- if (!cmdline_opts.ifname)
- fprintf(stdout, "- You might need to specify the outgoing\n"
- " network interface, e.g. ``%s eth0''\n", argv[0]);
+ if (!cmdline_opts.ifname && !cmdline_opts.bind_ip)
+ fprintf(stdout, "- You might need to specify the outgoing network interface,\n"
+ " e.g. ``%s eth0'' (requires root permissions),\n"
+ " or alternatively use -b to bind to the source address\n"
+ " assigned to that interface\n", argv[0]);
if (!cmdline_opts.list_view)
fprintf(stdout, "- You may find the --list-view option convenient.\n");
else if (cmdline_opts.send_interval >= cmdline_opts.list_view_timeout)