WPS: Drop subscription if it does not have any valid callback address

This commit is contained in:
Jouni Malinen 2010-10-17 20:11:03 +03:00 committed by Jouni Malinen
parent d0ebf3285f
commit 75779589e8

View file

@ -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)