summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2013-04-15 17:02:59 +0400
committerDmitry Kozlov <xeb@mail.ru>2013-04-15 17:02:59 +0400
commit4bbba963b5f02284908df147e3d9f702eb5fe967 (patch)
tree83b11f35a5b08af83c1bdb7c3742de3bc339cdde
parent199bd3556de16e4a92fd4e3d79ec6741c5959336 (diff)
downloadaccel-ppp-4bbba963b5f02284908df147e3d9f702eb5fe967.tar.gz
accel-ppp-4bbba963b5f02284908df147e3d9f702eb5fe967.zip
ipoe: fixed ses->client_id and ses->relay_agent initialization
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index 214f93a9..1ba53ea7 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -816,6 +816,7 @@ static struct ipoe_session *ipoe_session_create_dhcpv4(struct ipoe_serv *serv, s
if (pack->client_id) {
ses->client_id = (struct dhcpv4_option *)ptr;
ses->client_id->len = pack->client_id->len;
+ ses->client_id->data = (uint8_t *)(ses->client_id + 1);
memcpy(ses->client_id->data, pack->client_id->data, pack->client_id->len);
ptr += sizeof(struct dhcpv4_option) + pack->client_id->len;
}
@@ -823,6 +824,7 @@ static struct ipoe_session *ipoe_session_create_dhcpv4(struct ipoe_serv *serv, s
if (pack->relay_agent) {
ses->relay_agent = (struct dhcpv4_option *)ptr;
ses->relay_agent->len = pack->relay_agent->len;
+ ses->relay_agent->data = (uint8_t *)(ses->relay_agent + 1);
memcpy(ses->relay_agent->data, pack->relay_agent->data, pack->relay_agent->len);
ptr += sizeof(struct dhcpv4_option) + pack->relay_agent->len;
if (dhcpv4_parse_opt82(ses->relay_agent, &ses->agent_circuit_id, &ses->agent_remote_id))