diff options
Diffstat (limited to 'accel-pppd')
-rw-r--r-- | accel-pppd/ppp/ipcp_opt_wins.c | 12 | ||||
-rw-r--r-- | accel-pppd/radius/radius.c | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/accel-pppd/ppp/ipcp_opt_wins.c b/accel-pppd/ppp/ipcp_opt_wins.c index c9a3bb5c..da4dc9ba 100644 --- a/accel-pppd/ppp/ipcp_opt_wins.c +++ b/accel-pppd/ppp/ipcp_opt_wins.c @@ -151,11 +151,15 @@ static void ev_wins(struct ev_wins_t *ev) ppp = container_of(ev->ses, typeof(*ppp), ses); - wins_opt = container_of(ipcp_find_option(ppp, &wins1_opt_hnd), typeof(*wins_opt), opt); - wins_opt->addr = ev->wins1; + if (ev->wins1) { + wins_opt = container_of(ipcp_find_option(ppp, &wins1_opt_hnd), typeof(*wins_opt), opt); + wins_opt->addr = ev->wins1; + } - wins_opt = container_of(ipcp_find_option(ppp, &wins2_opt_hnd), typeof(*wins_opt), opt); - wins_opt->addr = ev->wins2; + if (ev->wins2) { + wins_opt = container_of(ipcp_find_option(ppp, &wins2_opt_hnd), typeof(*wins_opt), opt); + wins_opt->addr = ev->wins2; + } } static void load_config(void) diff --git a/accel-pppd/radius/radius.c b/accel-pppd/radius/radius.c index 5e8196d5..dd05b83f 100644 --- a/accel-pppd/radius/radius.c +++ b/accel-pppd/radius/radius.c @@ -148,14 +148,13 @@ out_err: int rad_proc_attrs(struct rad_req_t *req) { + struct ev_wins_t wins = {}; struct ev_dns_t dns = {}; struct rad_attr_t *attr; struct ipv6db_addr_t *a; - struct ev_wins_t wins; int res = 0; struct radius_pd_t *rpd = req->rpd; - wins.ses = NULL; req->rpd->acct_interim_interval = conf_acct_interim_interval; list_for_each_entry(attr, &req->reply->attrs, entry) { |