提交 97ea33f5 编写于 作者: D Dmitry Kozlov

ipoe: do not set session's interface name if shared=1

上级 0227b8ba
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册