PATCH: Don't close DPP TCP connection for duplicate Presence Announcements

Eliot Lear lear at
Thu Jun 23 08:25:13 PDT 2022

Hi Jan,

Thanks for the mail.  It's possible I am missing something. Below is my 

On 23.06.22 17:00, Jan Ceuleers wrote:
> Without having read the code you are modifying (beyond the above patch,
> that is), I would just like to point out that the return value is
> different: it was -1 in the hunk that is being removed, and it is 0 in
> the added-one. Just checking that this is intentional.

Yes, this is intentional.  The -1 is what closes the connection, and 0 
keeps it open.

This is in dpp_controller_rx_presence_announcement(), which is the 
return value from dpp_controller_rx_action(), which is called below in 

                 if (dpp_controller_rx_action(conn, pos + 1,
                                              wpabuf_len(conn->msg) - 1) < 0)

So a -1 value leads to dpp_connection_remove(), which in turn blows away 
the state that we need.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x87B66B46D9D27A33.asc
Type: application/pgp-keys
Size: 5052 bytes
Desc: OpenPGP public key
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Hostap mailing list