From: Jouni Malinen Date: Sun, 17 Oct 2010 17:11:03 +0000 (+0300) Subject: WPS: Drop subscription if it does not have any valid callback address X-Git-Url: http://www.project-moonshot.org/gitweb/?p=libeap.git;a=commitdiff_plain;h=75779589e889712c29c98f0515382be9335466c3 WPS: Drop subscription if it does not have any valid callback address --- diff --git a/src/wps/wps_upnp.c b/src/wps/wps_upnp.c index 29806ec..9108caa 100644 --- a/src/wps/wps_upnp.c +++ b/src/wps/wps_upnp.c @@ -692,6 +692,13 @@ struct subscription * subscription_start(struct upnp_wps_device_sm *sm, s->timeout_time = expire; uuid_make(s->uuid); subscr_addr_list_create(s, callback_urls); + if (dl_list_empty(&s->addr_list)) { + wpa_printf(MSG_DEBUG, "WPS UPnP: No valid callback URLs in " + "'%s' - drop subscription", callback_urls); + subscription_destroy(s); + return NULL; + } + /* Add to end of list, since it has the highest expiration time */ dl_list_add_tail(&sm->subscriptions, &s->list); /* Queue up immediate event message (our last event)