linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ROAM/CONNECT event with PORT_AUTHORIZED
@ 2017-09-14  8:39 Johannes Berg
  2017-09-14 11:21 ` Arend van Spriel
  2017-09-14 18:27 ` Denis Kenzior
  0 siblings, 2 replies; 35+ messages in thread
From: Johannes Berg @ 2017-09-14  8:39 UTC (permalink / raw)
  To: Arend van Spriel, Jouni Malinen; +Cc: Avraham Stern, linux-wireless

Hi Arend, Jouni, all,

Avi and I just discussed another use case for the PORT_AUTHORIZED flag,
which is PMKSA caching.

Assume you have 4-way-HS offloaded, then if you send a PMKID in the new
connection (doesn't matter if it's roaming or not), the AP may chose to
use it and start the 4-way-HS, or it may not be able to and start the
802.1X handshake.

In the supplicant, if you are waiting for the 1X handshake, then in the
case the PMKSA gets used the supplicant would wait forever, and
eventually terminate the connection because the handshake isn't
successful.

Thus, *both* cases need to know about the PORT_AUTHORIZED flag.

I previously didn't apply the patch for the flag in CONNECT
notification, but nobody is using it in ROAM notification so far, so
that we still have a chance of revisiting this.

Throwing a potential EAPOL-over-nl80211 (*) into the mix complicates
the picture further. For example, in that case the OPER_STATE might not
be set to UP until the port is authorized. In the case of roaming, this
might - on first sight - lead to toggling DOWN/UP if a new 1X handshake
needs to be done and the PORT_AUTHORIZED flag doesn't come with the
ROAM event. However, I think this is actually wrong as it would
probably lose IPv6 address assignment etc. - so I think we don't want
to do this even if we do have EAPOL-over-nl80211 and don't need the
oper_state to be up in order to do the 1X handshake. Do you agree with
this assessment?

Assuming this assessment is correct, this opens up another possibility:
tracking the PORT_AUTHORIZED state with a separate event:

 * new connection case - no PMKSA (usage)
   - CONNECT event
     - [if !eapol-over-nl: toggle oper state up]
     - initialize 1X state machines/timeouts
   - 1X handshake
   - send PMK to device for 4-way-HS
   - AUTHORIZED event
     - [if eapol-over-nl: toggle oper state up]

 * new connection case - PMKSA usage
   - CONNECT event
     - [if !eapol-over-nl: toggle oper state up]
     - initialize 1X state machines/timeouts
   - AUTHORIZED event
     - stop 1X state machine/timeouts
     - [if eapol-over-nl: toggle oper state up]

 * roaming case - no PMKSA (usage)
   - ROAM event
     - [no touching oper state]
     - initialize 1X state machines/timeouts
   - 1X handshake
   - AUTHORIZED event
     - [no touching oper state]

 * roaming case - PMKSA usage
   - ROAM event
     - [no touching oper state]
     - initialize 1X state machines/timeouts
   - AUTHORIZED event
     - stop 1X state machine/timeouts
     - [no touching oper state]


Does this seem reasonable? If possible, I prefer this to just having
the attribute, because with the attribute the roaming case will be
difficult, the natural code flow in the driver would probably make it
end up looking like this:

 * roaming case - no PMKSA (usage)
   - ROAM event
     - [no touching
oper state]
     - initialize 1X state machines/timeouts
   - 1X
handshake
   - CONNECT event w/ PORT_AUTHORIZED
     - [no touching oper
state]

which seems awkward.

Any other thoughts?

johannes

(*) is anyone working on that? I'll throw it on my list if not.

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2017-09-15 14:52 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-14  8:39 ROAM/CONNECT event with PORT_AUTHORIZED Johannes Berg
2017-09-14 11:21 ` Arend van Spriel
2017-09-14 11:44   ` Johannes Berg
2017-09-14 18:37     ` Denis Kenzior
2017-09-14 19:17       ` Johannes Berg
2017-09-14 19:34         ` Denis Kenzior
2017-09-14 19:38           ` Ben Greear
2017-09-14 20:05             ` Denis Kenzior
2017-09-14 20:08               ` Ben Greear
2017-09-14 20:26                 ` Denis Kenzior
2017-09-14 20:29                   ` Ben Greear
2017-09-14 20:35                     ` Denis Kenzior
2017-09-14 20:47                       ` Ben Greear
2017-09-14 21:35                         ` Denis Kenzior
2017-09-14 22:15                           ` Ben Greear
2017-09-14 22:42                             ` Denis Kenzior
2017-09-14 22:57                               ` Ben Greear
2017-09-15  7:23                                 ` Johannes Berg
2017-09-15  7:20                         ` Johannes Berg
2017-09-14 19:39           ` Johannes Berg
2017-09-14 18:27 ` Denis Kenzior
2017-09-14 18:36   ` Johannes Berg
2017-09-14 19:08     ` Denis Kenzior
2017-09-14 19:22       ` Johannes Berg
2017-09-14 19:37         ` Denis Kenzior
2017-09-14 19:41           ` Johannes Berg
2017-09-14 19:42             ` Johannes Berg
2017-09-14 19:54             ` Denis Kenzior
2017-09-15  7:19               ` Johannes Berg
2017-09-15 12:50                 ` Denis Kenzior
2017-09-15 13:29                   ` Johannes Berg
2017-09-15 13:50                     ` Denis Kenzior
2017-09-15 14:20                       ` Johannes Berg
2017-09-15 14:27                         ` Denis Kenzior
2017-09-15 14:52                           ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).