1 From 7a343f7b79b70a8e7e04b2bd465d344ad0ef4c49 Mon Sep 17 00:00:00 2001
2 From: Yousong Zhou <yszhou4tech@gmail.com>
3 Date: Wed, 29 Apr 2015 16:30:17 +0800
4 Subject: [PATCH 4/7] start_pppd: place opts after "plugin pppol2tp.so".
6 so that plugin options like pppol2tp_debug_mark can be recognized by pppd.
8 xl2tpd.c | 21 ++++++++++-----------
9 1 file changed, 10 insertions(+), 11 deletions(-)
13 @@ -382,7 +382,6 @@ int start_pppd (struct call *c, struct p
19 struct sockaddr_pppol2tp sax;
21 @@ -396,16 +395,7 @@ int start_pppd (struct call *c, struct p
26 stropt[0] = strdup (PPPD);
29 - stropt[pos] = (char *) malloc (strlen (p->option) + 1);
30 - strncpy (stropt[pos], p->option, strlen (p->option) + 1);
37 l2tp_log(LOG_WARNING, "%s: PPP already started on call!\n", __FUNCTION__);
38 @@ -467,7 +457,6 @@ int start_pppd (struct call *c, struct p
39 snprintf (stropt[pos], 10, "%d", c->ourcid);
46 @@ -497,6 +486,16 @@ int start_pppd (struct call *c, struct p
49 stropt[pos++] = strdup(tty);
53 + struct ppp_opts *p = opts;
56 + stropt[pos] = strdup (p->option);