diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2018-05-31 16:42:28 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2018-05-31 16:43:14 +0300 |
commit | d853f52f2ac8987ddc909f3908904d74a54988a2 (patch) | |
tree | 7445be66fe6541f182b4e995cd896f67c82aad14 | |
parent | d569e0099a97dfbfd1a6157e11bc3089992c4695 (diff) | |
download | accel-ppp-d853f52f2ac8987ddc909f3908904d74a54988a2.tar.gz accel-ppp-d853f52f2ac8987ddc909f3908904d74a54988a2.zip |
ipoe: use lua function to generate username for UP sessions too1.11
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 2c9ce3f..86716bb 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -1839,6 +1839,10 @@ static struct ipoe_session *ipoe_session_create_up(struct ipoe_serv *serv, struc if (ses->serv->opt_username == USERNAME_IFNAME) ses->username = _strdup(serv->ifname); +#ifdef USE_LUA + else if (ses->serv->opt_username == USERNAME_LUA) + ses->username = ipoe_lua_get_username(ses, ses->serv->opt_lua_username_func ? : conf_lua_username_func); +#endif else { ses->username = _malloc(17); u_inet_ntoa(saddr, ses->username); |