ppp: Fix missing arg argument when using option flag OPT_A2STRVAL
authorJohn Crispin <blogic@openwrt.org>
Fri, 3 Apr 2015 19:06:56 +0000 (19:06 +0000)
committerJohn Crispin <blogic@openwrt.org>
Fri, 3 Apr 2015 19:06:56 +0000 (19:06 +0000)
The arg argument is missing to the printer call in the print_option
utility when the option flag OPT_A2STRVAL is set.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45264 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/network/services/ppp/patches/550-fix-printer-args.patch [new file with mode: 0644]

diff --git a/package/network/services/ppp/patches/550-fix-printer-args.patch b/package/network/services/ppp/patches/550-fix-printer-args.patch
new file mode 100644 (file)
index 0000000..0eed942
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/pppd/options.c
++++ b/pppd/options.c
+@@ -1013,7 +1013,7 @@ print_option(opt, mainopt, printer, arg)
+                       p = (char *) opt->addr2;
+                       if ((opt->flags & OPT_STATIC) == 0)
+                               p = *(char **)p;
+-                      printer("%q", p);
++                      printer(arg, "%q", p);
+               } else if (opt->flags & OPT_A2LIST) {
+                       struct option_value *ovp;