From: Jouni Malinen Date: Wed, 22 Sep 2010 01:26:01 +0000 (-0700) Subject: P2P: Fill in default Config Methods in Invitation Request X-Git-Tag: hostap-1-bp~1039 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=252d7db297043117276fc526992e2a9cfd3f9674;p=thirdparty%2Fhostap.git P2P: Fill in default Config Methods in Invitation Request If the peer is not authorized for GO Negotiation, wps_method is not actually set. In that case, it is better to fill in our default config methods rather than end up leaving the field to be zero. --- diff --git a/src/p2p/p2p_build.c b/src/p2p/p2p_build.c index 984697619..791809e6e 100644 --- a/src/p2p/p2p_build.c +++ b/src/p2p/p2p_build.c @@ -168,7 +168,7 @@ void p2p_buf_add_device_info(struct wpabuf *buf, struct p2p_data *p2p, /* Config Methods */ methods = 0; - if (peer) { + if (peer && peer->wps_method != WPS_NOT_READY) { if (peer->wps_method == WPS_PBC) methods |= WPS_CONFIG_PUSHBUTTON; else if (peer->wps_method == WPS_PIN_LABEL)