diff options
-rw-r--r-- | accel-pppd/ctrl/ipoe/dhcpv4.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/dhcpv4.c b/accel-pppd/ctrl/ipoe/dhcpv4.c index 9427e14..a39463d 100644 --- a/accel-pppd/ctrl/ipoe/dhcpv4.c +++ b/accel-pppd/ctrl/ipoe/dhcpv4.c @@ -741,7 +741,8 @@ int dhcpv4_send_reply(int msg_type, struct dhcpv4_serv *serv, struct dhcpv4_pack if (relay) { list_for_each_entry(opt, &relay->options, entry) { - if (opt->type == 53 || opt->type == 54 || opt->type == 51 || opt->type == 58 || opt->type == 1 || (opt->type == 3 && router)) + if (opt->type == 53 || opt->type == 54 || opt->type == 51 || opt->type == 58 || + opt->type == 1 || (opt->type == 3 && router) || opt->type == 82) continue; else if (opt->type == 6) dns_avail = 1; @@ -770,6 +771,9 @@ int dhcpv4_send_reply(int msg_type, struct dhcpv4_serv *serv, struct dhcpv4_pack goto out_err; } + if (req->relay_agent && dhcpv4_packet_add_opt(pack, 82, req->relay_agent->data, req->relay_agent->len)) + goto out_err; + *pack->ptr++ = 255; if (conf_verbose) { @@ -817,6 +821,9 @@ int dhcpv4_send_nak(struct dhcpv4_serv *serv, struct dhcpv4_packet *req) if (dhcpv4_packet_add_opt(pack, 53, &val, 1)) goto out_err; + if (req->relay_agent && dhcpv4_packet_add_opt(pack, 82, req->relay_agent->data, req->relay_agent->len)) + goto out_err; + *pack->ptr++ = 255; if (conf_verbose) { |