diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2015-11-30 13:14:47 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2015-11-30 13:14:47 +0300 |
commit | adcaecd1b4d27ad30d35fd0cff4999029f3acffb (patch) | |
tree | 725234f5a1b7c047972f2a3b7743d95344036238 | |
parent | c402a55c79f57add1bfc02ad594a2b0c0d63fbbd (diff) | |
parent | 97ea33f5e749196d216f49f4dbfe7cbc89fe02b7 (diff) | |
download | accel-ppp-adcaecd1b4d27ad30d35fd0cff4999029f3acffb.tar.gz accel-ppp-adcaecd1b4d27ad30d35fd0cff4999029f3acffb.zip |
Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/code
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 607c7201..7d148b22 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -366,7 +366,7 @@ static char *ipoe_session_get_username(struct ipoe_session *ses) if (!ses->dhcpv4_request) return _strdup(ses->ctrl.calling_station_id); - return _strdup(ses->ses.ifname); + return _strdup(ses->serv->ifname); } static void l4_redirect_list_add(in_addr_t addr) @@ -609,8 +609,6 @@ static void ipoe_session_start(struct ipoe_session *ses) assert(!ses->ses.username); - strncpy(ses->ses.ifname, ses->serv->ifname, AP_IFNAME_LEN); - username = ipoe_session_get_username(ses); if (!username) { @@ -1201,7 +1199,9 @@ static struct ipoe_session *ipoe_session_create_dhcpv4(struct ipoe_serv *serv, s ses->serv = serv; ses->dhcpv4_request = pack; - strncpy(ses->ses.ifname, serv->ifname, AP_IFNAME_LEN); + + if (!serv->opt_shared) + strncpy(ses->ses.ifname, serv->ifname, AP_IFNAME_LEN); ses->xid = pack->hdr->xid; memcpy(ses->hwaddr, pack->hdr->chaddr, 6); |