diff options
-rw-r--r-- | accel-pppd/ctrl/ipoe/dhcpv4.c | 4 | ||||
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 2 |
2 files changed, 3 insertions, 3 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; diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 0e59614..765996f 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -3203,7 +3203,7 @@ static void load_config(void) if (opt) conf_agent_remote_id = opt; else - conf_agent_remote_id = "accel-pppd"; + conf_agent_remote_id = NULL; opt = conf_get_opt("ipoe", "ipv6"); if (opt) |