summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Eshenko <dmitriy.eshenko@accel-ppp.org>2023-06-29 11:25:09 +0300
committerGitHub <noreply@github.com>2023-06-29 11:25:09 +0300
commit313551513dcccc500649e9fe5c3177656500d7d8 (patch)
tree7b9d7a672ddfde4100eb85e856ef5a78b2750ea9
parent3606825c9664f9139c0fb487ec87d9ba4a889229 (diff)
downloadaccel-ppp-313551513dcccc500649e9fe5c3177656500d7d8.tar.gz
accel-ppp-313551513dcccc500649e9fe5c3177656500d7d8.zip
CLI: PPPoE: Use global net variable to prevent SEGFAULT
When accel-ppp has no connected clients, CLI interface add command it try to use net == NULL and crush code.
-rw-r--r--accel-pppd/ctrl/pppoe/pppoe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c
index 44b094b..59d9f4f 100644
--- a/accel-pppd/ctrl/pppoe/pppoe.c
+++ b/accel-pppd/ctrl/pppoe/pppoe.c
@@ -1430,7 +1430,7 @@ static void __pppoe_server_start(const char *ifname, const char *opt, void *cli,
struct pppoe_serv_t *serv;
struct ifreq ifr;
int padi_limit = conf_padi_limit;
- struct ap_net *net = def_net;
+ net = def_net;
if (parse_server(opt, &padi_limit, &net)) {
if (cli)