diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2013-07-31 14:56:56 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2013-07-31 14:56:56 +0400 |
commit | a3854c8e4b75ef463f0529545c61e66172e5f1ee (patch) | |
tree | b2fdd0e0f5d640054e504e89c8fc160036a3930c | |
parent | 8b87afdbe8cbc9c0afdd47071071df2603f13edf (diff) | |
download | accel-ppp-a3854c8e4b75ef463f0529545c61e66172e5f1ee.tar.gz accel-ppp-a3854c8e4b75ef463f0529545c61e66172e5f1ee.zip |
ipoe: use router option from upper dhcp reply
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 4 |
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); |