summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2013-07-31 14:56:56 +0400
committerDmitry Kozlov <xeb@mail.ru>2013-07-31 14:56:56 +0400
commita3854c8e4b75ef463f0529545c61e66172e5f1ee (patch)
treeb2fdd0e0f5d640054e504e89c8fc160036a3930c /accel-pppd
parent8b87afdbe8cbc9c0afdd47071071df2603f13edf (diff)
downloadaccel-ppp-a3854c8e4b75ef463f0529545c61e66172e5f1ee.tar.gz
accel-ppp-a3854c8e4b75ef463f0529545c61e66172e5f1ee.zip
ipoe: use router option from upper dhcp reply
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index 7f92501f..94f50fd6 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -1217,6 +1217,10 @@ static void ipoe_ses_recv_dhcpv4_relay(struct ipoe_session *ses)
if (opt)
ses->mask = parse_dhcpv4_mask(ntohl(*(uint32_t *)opt->data));
+ opt = dhcpv4_packet_find_opt(pack, 3);
+ if (opt)
+ ses->router = *(uint32_t *)opt->data;
+
if (pack->msg_type == DHCPOFFER) {
if (ses->ses.state == AP_STATE_STARTING) {
triton_timer_del(&ses->timer);