From a3854c8e4b75ef463f0529545c61e66172e5f1ee Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Wed, 31 Jul 2013 14:56:56 +0400 Subject: ipoe: use router option from upper dhcp reply --- accel-pppd/ctrl/ipoe/ipoe.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'accel-pppd') 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); -- cgit v1.2.3