xebd / accel-ppp

High performance PPTP/L2TP/PPPoE/IPoE server for Linux
GNU General Public License v2.0
296 stars 108 forks source link

ipoe: dhcpv4: echo back opt82 if sent by client/relay per rfc3046 #117

Closed themiron closed 4 years ago

themiron commented 4 years ago

there're some onu in the wild, which insert opt82 in relayed requests and drop any unmatching replies (w/o same opt82). to fix that, need to improve dhcp compliance for following rc3046 parts:

2.1 Agent Operation The Relay Agent Information option echoed by a server MUST be removed by either the relay agent or the trusted downstream network element which added it when forwarding a server-to-client response back to the client.

2.2 Server Operation DHCP servers claiming to support the Relay Agent Information option SHALL echo the entire contents of the Relay Agent Information option in all replies. Servers SHOULD copy the Relay Agent Information option as the last DHCP option in the response.