diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2014-01-20 14:33:47 +0100 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-01-22 13:13:43 +0400 |
commit | dafe0eb3d8fd9bf9487149e9b98170f17f1e046f (patch) | |
tree | 2a6f1ecb9059a3a21869e248e39604579e29da1f /accel-pppd | |
parent | be5e2a0b140394e0600548b87a0fca70106cd74e (diff) | |
download | accel-ppp-dafe0eb3d8fd9bf9487149e9b98170f17f1e046f.tar.gz accel-ppp-dafe0eb3d8fd9bf9487149e9b98170f17f1e046f.zip |
l2tp: reset conf_secret if secret removed from accel-ppp.conf
The "reload" command frees the variable pointed to by conf_secret
in case the "secret" option gets removed from accel-ppp.conf. In
such a case, conf_secret must be reset to NULL to avoid dereferencing
the old pointer.
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ctrl/l2tp/l2tp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/l2tp/l2tp.c b/accel-pppd/ctrl/l2tp/l2tp.c index 531fab23..ee28598c 100644 --- a/accel-pppd/ctrl/l2tp/l2tp.c +++ b/accel-pppd/ctrl/l2tp/l2tp.c @@ -3976,6 +3976,9 @@ static void load_config(void) if (opt) { conf_secret = opt; conf_secret_len = strlen(opt); + } else { + conf_secret = NULL; + conf_secret_len = 0; } opt = conf_get_opt("l2tp", "dir300_quirk"); |