P2P Flush when connecting a peer

Jouni Malinen j
Tue Jul 1 06:21:17 PDT 2014


On Tue, Jul 01, 2014 at 01:24:56PM +0300, Tomasz Bursztyka wrote:
> I noticed that calling p2p_flush when being connected/connecting to
> a peer still
> flushes out this peer from the found list.
> 
> Should it instead:
> - keep it alive (as p2p_expires_peers() does)

No, P2P_FLUSH is supposed to clear all P2P state.

> - stop everything related to this peer (connection, etc...)

Removing all ongoing groups first would sound fine.

> I would go for the first myself, since flush is imho like a forced
> expiration of the peer.

It is supposed to be more than that, i.e., complete flush of all P2P
state and not really an operation that I would use in normal use cases,
i.e., it is aimed at testing purposes.

> Thus: if that one is part of go_neg/part of a group/etc... we should
> keep it alive.

Nope, P2P_FLUSH is supposed to stop any pending GO Negotiation as well.
I don't think it removes any groups today, but it should be fine to do
so, if there is need to clean this up more.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list