diff options
author | Dmitriy Eshenko <dmitriy.eshenko@accel-ppp.org> | 2023-06-29 11:25:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 11:25:09 +0300 |
commit | 313551513dcccc500649e9fe5c3177656500d7d8 (patch) | |
tree | 7b9d7a672ddfde4100eb85e856ef5a78b2750ea9 | |
parent | 3606825c9664f9139c0fb487ec87d9ba4a889229 (diff) | |
download | accel-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.c | 2 |
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) |