summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/ipoe/dhcpv4.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2015-04-20 14:08:45 +0300
committerDmitry Kozlov <xeb@mail.ru>2015-04-20 14:08:45 +0300
commitb8b91d8b087312c91a9941dacd11a98692679ec8 (patch)
tree8932a68f23b4f6b4db23078d9d4879138dc51144 /accel-pppd/ctrl/ipoe/dhcpv4.c
parent25da2e7fe4d11f909bc738bee31a14de26bfc21c (diff)
downloadaccel-ppp-xebd-b8b91d8b087312c91a9941dacd11a98692679ec8.tar.gz
accel-ppp-xebd-b8b91d8b087312c91a9941dacd11a98692679ec8.zip
ipoe: changed behavior of agent-remote-id option
Before this patch if agent-remote-id is not specified in config it get default value "accel-pppd". Now if agent-remote-id is not specified then accel-ppp will not insert his Option 82 into relayed DHCP requests
Diffstat (limited to 'accel-pppd/ctrl/ipoe/dhcpv4.c')
-rw-r--r--accel-pppd/ctrl/ipoe/dhcpv4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pppd/ctrl/ipoe/dhcpv4.c b/accel-pppd/ctrl/ipoe/dhcpv4.c
index 330038f..21a62f5 100644
--- a/accel-pppd/ctrl/ipoe/dhcpv4.c
+++ b/accel-pppd/ctrl/ipoe/dhcpv4.c
@@ -957,7 +957,7 @@ int dhcpv4_relay_send(struct dhcpv4_relay *relay, struct dhcpv4_packet *request,
struct dhcpv4_option *opt = NULL;
uint32_t _server_id;
- if (!request->relay_agent && dhcpv4_packet_insert_opt82(request, agent_circuit_id, agent_remote_id))
+ if (!request->relay_agent && agent_remote_id && dhcpv4_packet_insert_opt82(request, agent_circuit_id, agent_remote_id))
return -1;
request->hdr->giaddr = relay->giaddr;
@@ -1022,7 +1022,7 @@ int dhcpv4_relay_send_release(struct dhcpv4_relay *relay, uint8_t *chaddr, uint3
if (relay_agent && dhcpv4_packet_add_opt(pack, 82, relay_agent->data, relay_agent->len))
goto out_err;
- else if (!relay_agent) {
+ else if (!relay_agent && agent_remote_id) {
pack->ptr++;
if (dhcpv4_packet_insert_opt82(pack, agent_circuit_id, agent_remote_id))
goto out_err;