gtphub: complain about excess cmdline args.
Sponsored-by: On-Waves ehi
diff --git a/openbsc/src/gprs/gtphub_main.c b/openbsc/src/gprs/gtphub_main.c
index 06260bf..025a2d1 100644
--- a/openbsc/src/gprs/gtphub_main.c
+++ b/openbsc/src/gprs/gtphub_main.c
@@ -176,8 +176,15 @@
c = getopt_long(argc, argv, "hd:Dc:sTe:",
long_options, &option_index);
- if (c == -1)
+ if (c == -1) {
+ if (optind < argc) {
+ LOGP(DGTPHUB, LOGL_FATAL,
+ "Excess commandline arguments ('%s').\n",
+ argv[optind]);
+ exit(2);
+ }
break;
+ }
switch (c) {
case 'h':