diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2013-01-25 19:59:28 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-01-25 19:59:28 +0400 |
commit | 31e4b6ae1348c6ae6bcc4c3470608d9479ae22e3 (patch) | |
tree | b53d1c5ba18af087f3a9fdd723716f0f17a0d194 /accel-pppd | |
parent | b5f77f6e9bf516030869572f8a11d17860791158 (diff) | |
download | accel-ppp-31e4b6ae1348c6ae6bcc4c3470608d9479ae22e3.tar.gz accel-ppp-31e4b6ae1348c6ae6bcc4c3470608d9479ae22e3.zip |
ipoe: properly insert option 82 before END
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ctrl/ipoe/dhcpv4.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/ipoe/dhcpv4.c b/accel-pppd/ctrl/ipoe/dhcpv4.c index e842f38..0c43b94 100644 --- a/accel-pppd/ctrl/ipoe/dhcpv4.c +++ b/accel-pppd/ctrl/ipoe/dhcpv4.c @@ -442,6 +442,8 @@ int dhcpv4_packet_insert_opt82(struct dhcpv4_packet *pack, const char *agent_cir uint8_t *ptr = data; int r; + pack->ptr--; + *ptr++ = 1; *ptr++ = len1; memcpy(ptr, agent_circuit_id, len1); ptr += len1; @@ -452,6 +454,8 @@ int dhcpv4_packet_insert_opt82(struct dhcpv4_packet *pack, const char *agent_cir r = dhcpv4_packet_add_opt(pack, 82, data, 4 + len1 + len2); _free(data); + + *pack->ptr++ = 255; return r; } |