summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp/ipcp_opt_dns.c
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-06-19 19:06:06 +0400
committerKozlov Dmitry <xeb@mail.ru>2012-06-19 19:06:06 +0400
commit02b3fb2b24aacd90d535c2136a055f529d722974 (patch)
tree6243dd815869add07be2bad5846e7817b732ac59 /accel-pppd/ppp/ipcp_opt_dns.c
parentc553a7bbbc96d36ba4d0999bb172c7a926518eb1 (diff)
downloadaccel-ppp-02b3fb2b24aacd90d535c2136a055f529d722974.tar.gz
accel-ppp-02b3fb2b24aacd90d535c2136a055f529d722974.zip
general preparation for IPoE integration
Diffstat (limited to 'accel-pppd/ppp/ipcp_opt_dns.c')
-rw-r--r--accel-pppd/ppp/ipcp_opt_dns.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/accel-pppd/ppp/ipcp_opt_dns.c b/accel-pppd/ppp/ipcp_opt_dns.c
index 19183eb..1ca8723 100644
--- a/accel-pppd/ppp/ipcp_opt_dns.c
+++ b/accel-pppd/ppp/ipcp_opt_dns.c
@@ -143,11 +143,17 @@ static void dns2_print(void (*print)(const char *fmt,...),struct ipcp_option_t *
static void ev_dns(struct ev_dns_t *ev)
{
struct dns_option_t *dns_opt;
+ struct ppp_t *ppp;
- dns_opt = container_of(ipcp_find_option(ev->ppp, &dns1_opt_hnd), typeof(*dns_opt), opt);
+ if (ev->ses->ctrl->type == CTRL_TYPE_IPOE)
+ return;
+
+ ppp = container_of(ev->ses, typeof(*ppp), ses);
+
+ dns_opt = container_of(ipcp_find_option(ppp, &dns1_opt_hnd), typeof(*dns_opt), opt);
dns_opt->addr = ev->dns1;
- dns_opt = container_of(ipcp_find_option(ev->ppp, &dns2_opt_hnd), typeof(*dns_opt), opt);
+ dns_opt = container_of(ipcp_find_option(ppp, &dns2_opt_hnd), typeof(*dns_opt), opt);
dns_opt->addr = ev->dns2;
}