[PATCH 8/9] tests: test MLO rejection for incorrectly configured MLD APs

Jouni Malinen j at w1.fi
Thu Oct 2 02:04:10 PDT 2025


On Tue, Sep 30, 2025 at 03:51:03PM +0200, Benjamin Berg wrote:
> On Tue, 2025-09-30 at 12:08 +0300, Jouni Malinen wrote:
> > On Wed, Jun 18, 2025 at 02:35:30PM +0200, Benjamin Berg wrote:
> > > Add a test that injects various problematic ML elements and verify that
> > > MLO is disabled in that case.
> > 
> > Does this need something special to be done to work correctly or could
> > some other commit in hostap.git have made an impact here? I'm seeing
> > eht_mld_invalid_ml_elem fail in the first test ("2nd link misses ML
> > elem") with
> > 
> > Exception: Unexpected valid links (0x0003 != 0x0001)
> 
> I just rebased these on top of cfc59f26dfb9 ("IKEv2: Add support for
> null encryption") and the test is working fine for me. I also updated
> my Linux tree to current wireless-next/main.
> 
> Now, the test works by replacing the scan results for the second AP
> with something invalid. So it would seem that either that injection
> mechanism failed or there are scan results afterwards and BSS selection
> is seeing the kernel data again.
> 
> Is the above base commit the same that you tested against?

More or less same.. The override mechanism itself seems to work, but
there is a hardcoded assumption for original MLE which does not match
the value used in my setup. I'm not sure how that would be different for
you, but anyway, that hardcoded assumption does not feel correct.

orig_ml_elem = f'ff106bb0010d{ml_addr}010181000100'

The final two octets int hat is the MLD Capabilities field, i.e., value
0x0001 for that. However, I see 0x2001 in the MLE since Link
Reconfiguration Operation Support is enabled.

That orig_ml_elem should likely be parsed from the scan results instead
of being hardcoded in that manner..

If I add that one bit to the hardcoded orig_ml_elem I can pass most of
the cases in this test cases, but the final one ("1st link missing MLD
capa") fails with
assert 'ap_mld_addr' not in wpas.get_bss(hapd0_bss['bssid'])

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list