Skip to content

Commit

Permalink
pppd: fix pppol2tp option printing
Browse files Browse the repository at this point in the history
PPPD crashes (SEGV) when the 'dump' or 'dryrun' options are specified and
the 'pppol2tp' option is specified.  The crash occurs because the
'pppol2tp' option value is not saved when the parameter is processed (in
the pppol2tp plugin), but is then referenced when printed.  This was
encountered using xl2tpd and the l2tp_ppp kernel module.

Modify the 'pppol2tp' plugin to save the option value.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>

---

Note: This patch resolves issue #32 (#32).
  • Loading branch information
nlhintz committed Dec 4, 2016
1 parent e52aee3 commit afc4b13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pppd/plugins/pppol2tp/pppol2tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ static int setdevname_pppol2tp(char **argv)
fatal("PPPoL2TP kernel driver not installed");
}

pppol2tp_fd_str = strdup(*argv);
if (pppol2tp_fd_str == NULL)
novm("PPPoL2TP FD");

/* Setup option defaults. Compression options are disabled! */

modem = 0;
Expand Down

0 comments on commit afc4b13

Please sign in to comment.