Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Josef Miegl <josef@miegl.cz>
Cc: Sebastian Gottschall <s.gottschall@newmedia-net.de>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: Implementing Mikrotik IE
Date: Thu, 22 Aug 2019 22:08:13 +0200	[thread overview]
Message-ID: <0452a0cbb36bcffa8371a58dfd931864c1f79eef.camel@sipsolutions.net> (raw)
In-Reply-To: <5ee160209eb1f9e70f6224c393389266280d7d80.camel@sipsolutions.net> (sfid-20190822_090033_537095_4B41631C)

On Thu, 2019-08-22 at 09:00 +0200, Johannes Berg wrote:
> 
> Perhaps it expects the 4-way-HS to already be in 4-addr frame format, or
> something else special in the 4-way-HS if you have WDS?

I think this is actually the right guess.

The working capture you sent me has the EAPOL 2/4 in a 4-addr frame:

ToDS=1, FromDS=1
A1/RA = AP
A2/TA = STA
A3/DA = AP
A4/SA = STA

The non-working capture has the EAPOL 2/4 in 3-addr format, as you'd
expect in the Linux 4-addr AP/STA case:

ToDS=1, FromDS=0
A1/RA    = AP
A2/TA,SA = STA
A3/DA    = AP

Since it's basically ignoring the message 2 (it just says "handshake
timed out" later) it's almost certainly expecting *only* the 4-addr
format.

As a hack, you could do

--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2623,8 +2623,7 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,
                        memcpy(hdr.addr2, skb->data + ETH_ALEN, ETH_ALEN);
                        memcpy(hdr.addr3, sdata->u.mgd.bssid, ETH_ALEN);
                        hdrlen = 24;
-               }  else if (sdata->u.mgd.use_4addr &&
-                           cpu_to_be16(ethertype) != sdata->control_port_protocol) {
+               }  else if (sdata->u.mgd.use_4addr) {
                        fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS |
                                          IEEE80211_FCTL_TODS);
                        /* RA TA DA SA */


in mac80211, then it should send 4-addr frames even for EAPOL.

johannes


  reply	other threads:[~2019-08-22 20:08 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 15:28 Implementing Mikrotik IE Josef Miegl
2019-08-16  4:07 ` Sebastian Gottschall
2019-08-16 11:10   ` Josef Miegl
2019-08-16 11:15     ` Sebastian Gottschall
2019-08-16 11:38       ` Josef Miegl
2019-08-19 10:12         ` Johannes Berg
2019-08-19 11:37           ` Josef Miegl
2019-08-19 20:21             ` Johannes Berg
2019-08-21 20:04               ` Josef Miegl
2019-08-21 20:09                 ` Sebastian Gottschall
2019-08-21 20:12                 ` Johannes Berg
2019-08-21 21:17                   ` Josef Miegl
2019-08-22  7:00                     ` Johannes Berg
2019-08-22 20:08                       ` Johannes Berg [this message]
2019-08-22 21:06                         ` Josef Miegl
2019-08-23 10:54                           ` Johannes Berg
2019-08-27 13:08                           ` Sebastian Gottschall
2019-08-27 13:10                             ` Johannes Berg
2019-08-27 13:14                               ` Sebastian Gottschall
2019-08-20 11:53           ` Sebastian Gottschall
2019-08-20 12:22             ` Johannes Berg
2019-08-20 12:46               ` Sebastian Gottschall
2019-08-21 21:19               ` Josef Miegl
     [not found]               ` <8ec8202e-ca07-3594-5873-5b282d553711@newmedia-net.de>
2019-08-21 23:57                 ` Josef Miegl
2019-08-22  6:58                   ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0452a0cbb36bcffa8371a58dfd931864c1f79eef.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=josef@miegl.cz \
    --cc=linux-wireless@vger.kernel.org \
    --cc=s.gottschall@newmedia-net.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox