Malformed RADIUS packet after upgrade to latest snapshot 53b9cc4

I cannot connect to 801.x (WPA2 Enterprise) configured with EAP. The FreeRadius server debug run into errors as

Receive - Malformed RADIUS packet from host 192.168.1.2: Invalid attribute 0

which I never encountered before upgrade. Anything configuration that I should change to adapt to the new hostapd?

BTW, my FreeRadius server is running in another host, and 192.168.1.2 is the AP's ip address.

Anyone has similar situations? Can someone help me with this issue?

Edit: The downside of using snapshot, apparently is that, you cannot easily go back to a working version in this situation, sigh!

Same problem here. I had to downgrade to 21.02rc2. After upgrading to latest snapshot, the RADIUS Access-Request packet contains an extra 0 value attribute as you noted. That attribute is not there with e.g. the 21.02rc2 version.

...
          Unknown Attribute (186), length: 6, Value:
            0x0000:  000f ac04
          Unknown Attribute (187), length: 6, Value:
            0x0000:  000f ac04
          Unknown Attribute (188), length: 6, Value:
            0x0000:  000f ac01
          Unknown Attribute (0), length: 3, Value:
            0x0000:  00
          Framed-MTU Attribute (12), length: 6, Value: 1400
            0x0000:  0000 0578
          EAP-Message Attribute (79), length: 37, Value: ..
...

By cursory glance I didn't see any changes in hostapd ieee802_1x.c code that creates this packet but something must have changed.

I filed a bug report yesterday, hoping this issue get fixed soon.

1 Like

Not been able to figure out why this happens, but this fixes it ....

Index: hostapd-2021-05-21-d98f4c46/src/ap/ieee802_1x.c
===================================================================
--- hostapd-2021-05-21-d98f4c46.orig/src/ap/ieee802_1x.c
+++ hostapd-2021-05-21-d98f4c46/src/ap/ieee802_1x.c
@@ -606,7 +606,7 @@ int add_common_radius_attr(struct hostap
                return -1;
 
        for (attr = req_attr; attr; attr = attr->next) {
-               if (!radius_msg_add_attr(msg, attr->type,
+               if (attr->type && !radius_msg_add_attr(msg, attr->type,
                                         wpabuf_head(attr->val),
                                         wpabuf_len(attr->val))) {
                        wpa_printf(MSG_ERROR, "Could not add RADIUS attribute");

just fixed the issue in the master branch
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=96e9c81aabe9e14d6ec75c3f238c4ca7389b92a8

1 Like

Thanks for letting me know.

Unfortunately I have bricked the AP when I tried to configure DSA with new semantic, now I am using 21.02 RC2 as @villeww did.

Yep all good now, thank you.

Since 21.02 RC2 has WiFi issue which will cause video playback stop, I have no choice but upgrade it back to master snapshot build.

Now I can confirm that the RADIUS issue been resolved.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.