summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/ipoe
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/ctrl/ipoe')
-rw-r--r--accel-pppd/ctrl/ipoe/dhcpv4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/ipoe/dhcpv4.c b/accel-pppd/ctrl/ipoe/dhcpv4.c
index bc2ecad..167f9fd 100644
--- a/accel-pppd/ctrl/ipoe/dhcpv4.c
+++ b/accel-pppd/ctrl/ipoe/dhcpv4.c
@@ -822,6 +822,7 @@ int dhcpv4_send_nak(struct dhcpv4_serv *serv, struct dhcpv4_packet *req, const c
{
struct dhcpv4_packet *pack;
int val, r;
+ uint32_t server_id = req->server_id ? req->server_id : req->hdr->siaddr;
pack = dhcpv4_packet_alloc();
if (!pack) {
@@ -841,6 +842,9 @@ int dhcpv4_send_nak(struct dhcpv4_serv *serv, struct dhcpv4_packet *req, const c
if (dhcpv4_packet_add_opt(pack, 53, &val, 1))
goto out_err;
+ if (server_id && dhcpv4_packet_add_opt(pack, 54, &server_id, 4))
+ goto out_err;
+
if (req->relay_agent && dhcpv4_packet_add_opt(pack, 82, req->relay_agent->data, req->relay_agent->len))
goto out_err;