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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jan,

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

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 dpp_controller_rx():

	case WLAN_PA_VENDOR_SPECIFIC:
                if (dpp_controller_rx_action(conn, pos + 1,
                                             wpabuf_len(conn->msg) - 1) < 0)
                        dpp_connection_remove(conn);
	        break;

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

Eliot


Attachment: OpenPGP_0x87B66B46D9D27A33.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux