]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Accept Invitation Response non-success without Channel List
authorJouni Malinen <j@w1.fi>
Sun, 20 Oct 2013 14:22:50 +0000 (17:22 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 20 Oct 2013 18:37:52 +0000 (21:37 +0300)
P2P Invitation Response frame is required to include the Channel List
attribute only in Status=Success case. Skip the debug message claiming
that a mandatory attribute was not included in non-Success case.

Signed-hostap: Jouni Malinen <j@w1.fi>

src/p2p/p2p_invitation.c

index 687b9431bfb9d4ea6817e43fcad6aaffc0f2114d..4e4593e0ac2b3a86d1656f8c98d037a28d9f5fb9 100644 (file)
@@ -407,7 +407,7 @@ void p2p_process_invitation_resp(struct p2p_data *p2p, const u8 *sa,
                return;
        }
 
-       if (!msg.channel_list) {
+       if (!msg.channel_list && *msg.status == P2P_SC_SUCCESS) {
                p2p_dbg(p2p, "Mandatory Channel List attribute missing in Invitation Response from "
                        MACSTR, MAC2STR(sa));
 #ifdef CONFIG_P2P_STRICT
@@ -416,6 +416,9 @@ void p2p_process_invitation_resp(struct p2p_data *p2p, const u8 *sa,
 #endif /* CONFIG_P2P_STRICT */
                /* Try to survive without peer channel list */
                channels = &p2p->channels;
+       } else if (!msg.channel_list) {
+               /* Non-success cases are not required to include Channel List */
+               channels = &p2p->channels;
        } else if (p2p_peer_channels_check(p2p, &p2p->channels, dev,
                                           msg.channel_list,
                                           msg.channel_list_len) < 0) {