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:42:28 +0300 |
commit | d6a798fe417525581677e227d312fd851e511f7e (patch) | |
tree | 96bb0fddfdfe92b44bf52b2651782ad8e3fa5790 /accel-pppd | |
parent | 1f59c6152777e38112b2de5c7f7c60772a9f9115 (diff) | |
download | accel-ppp-d6a798fe417525581677e227d312fd851e511f7e.tar.gz accel-ppp-d6a798fe417525581677e227d312fd851e511f7e.zip |
ipoe: use lua function to generate username for UP sessions too
Diffstat (limited to 'accel-pppd')
-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 b48e1f23..9cbe0080 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -2021,6 +2021,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); |