# [SOLVED] 'hostapd': attribute type 213 has an invalid length

## Ant P.

On my wifi router, right from boot I'm seeing this message slowly repeating over and over:

```
[   14.292600] netlink: 'hostapd': attribute type 213 has an invalid length.

[   14.306051] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

[   15.262000] r8169 0000:07:00.0 eth0: link up

[   15.262026] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

[   15.262199] IPv6: ADDRCONF(NETDEV_CHANGE): wan0: link becomes ready

[   19.827429] netlink: 'hostapd': attribute type 213 has an invalid length.

[   96.577465] netlink: 'hostapd': attribute type 213 has an invalid length.

[   97.345431] netlink: 'hostapd': attribute type 213 has an invalid length.
```

This has been happening for a few months now. It doesn't seem to impair normal function, but it fills up the kernel log buffer after a few days which is mildly irritating.

Some more details:

```
03:00.0 Network controller [0280]: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) [168c:002b] (rev 01)

        Subsystem: AzureWave AW-NE785 / AW-NE785H 802.11bgn Wireless Full or Half-size Mini PCIe Card [1a3b:1089]

        Kernel driver in use: ath9k
```

```
4.16.7-zen-427958-g9e36a9ff1896
```

(just updated, but this has been happening since 4.14 or earlier)

```
net-wireless/hostapd-2.6::libressl was built with the following:

USE="crda ipv6 libressl ssl -logwatch -netlink -sqlite -wps"
```

I can't find any correlation between the timestamps in dmesg and syslog, neither for hostapd nor dhcpd. There seems to be no pattern to the spacing of the messages themselves, either. Has anyone else seen this?Last edited by Ant P. on Sat Jun 02, 2018 11:48 am; edited 1 time in total

----------

## bunder

 *Quote:*   

> net-wireless/hostapd-2.6::libressl

 

after a few weeks of being gone, gentoo brought hostapd back into the main portage tree, with version 2.6-r1 currently listed as stable.  does it still happen there?

----------

## Ant P.

I was completely unaware the mainline ebuild works with libressl now, had it in p.mask. Thanks for pointing that out.

I'm running hostapd-2.6-r4::gentoo now, but it hasn't helped one bit...

```
[Sun May  6 19:12:05 2018] netlink: 'hostapd': attribute type 213 has an invalid length.

[Sun May  6 19:13:18 2018] netlink: 'hostapd': attribute type 213 has an invalid length.

[Sun May  6 19:30:04 2018] netlink: 'hostapd': attribute type 213 has an invalid length.

[Sun May  6 19:30:04 2018] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

[Sun May  6 19:30:05 2018] netlink: 'hostapd': attribute type 213 has an invalid length.

[Sun May  6 19:30:05 2018] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

[Sun May  6 19:30:08 2018] netlink: 'hostapd': attribute type 213 has an invalid length.
```

Tail of hostapd log, after restarting:

```
2018-05-06T18:26:32.52352 wlan0: STA **:**:**:**:**:** RADIUS: starting accounting session BC9E355385B1BDDE

2018-05-06T18:26:32.52366 wlan0: STA **:**:**:**:**:** WPA: pairwise key handshake completed (RSN)

---

2018-05-06T18:30:03.55320 wlan0: interface state ENABLED->DISABLED

2018-05-06T18:30:03.55321 wlan0: AP-STA-DISCONNECTED **:**:**:**:**:**

2018-05-06T18:30:03.55321 wlan0: AP-STA-DISCONNECTED **:**:**:**:**:**

2018-05-06T18:30:03.55446 wlan0: AP-DISABLED

2018-05-06T18:30:03.55468 nl80211: deinit ifname=wlan0 disabled_11b_rates=0

2018-05-06T18:30:03.61544 Configuration file: /etc/hostapd/hostapd.conf

2018-05-06T18:30:03.62129 wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE

2018-05-06T18:30:03.62338 wlan0: interface state COUNTRY_UPDATE->HT_SCAN

2018-05-06T18:30:04.88204 20/40 MHz operation not permitted on channel pri=1 sec=5 based on overlapping BSSes

2018-05-06T18:30:04.88674 Using interface wlan0 with hwaddr **:**:**:**:**:** and ssid "foo"

2018-05-06T18:30:04.91041 VLAN: vlan_set_name_type: SET_VLAN_NAME_TYPE_CMD name_type=2 failed: Package not installed

2018-05-06T18:30:04.92529 wlan0: interface state HT_SCAN->ENABLED

2018-05-06T18:30:04.92533 wlan0: AP-ENABLED

2018-05-06T18:30:07.92583 wlan0: STA **:**:**:**:**:** IEEE 802.11: authenticated

2018-05-06T18:30:07.93024 wlan0: STA **:**:**:**:**:** IEEE 802.11: associated (aid 1)

2018-05-06T18:30:07.98191 wlan0: AP-STA-CONNECTED **:**:**:**:**:**

2018-05-06T18:30:07.98195 wlan0: STA **:**:**:**:**:** RADIUS: starting accounting session ACB6AE8C78823AED

2018-05-06T18:30:07.98198 wlan0: STA **:**:**:**:**:** WPA: pairwise key handshake completed (RSN)
```

I might have to start poking around in source code on my own to figure this out...

----------

## perlovka

Same here:

```
03:02.0 Network controller [0280]: Qualcomm Atheros AR9227 Wireless Network Adapter [168c:002d] (rev 01)

   Subsystem: Qualcomm Atheros AR9227 Wireless Network Adapter [168c:0300]

   Kernel driver in use: ath9k
```

```
[I] net-wireless/hostapd

Installed versions:  2.6-r4(02:24:55 PM 06/01/2018)(crda ipv6 -internal-tls -libressl -logwatch -netlink -savedconfig -sqlite -wps)
```

```
vanilla-sources-4.16.6
```

----------

## perlovka

Seems this is a reason:

https://github.com/torvalds/linux/commit/6e237d099fac1f73a7b6d7287bb9191f29585a4e

And this is fixed in upstream, but not released yet:

http://lists.infradead.org/pipermail/hostap/2017-December/038074.html

----------

## Ant P.

Ahh, thanks for finding that. Guess I'll wait for 4.17 or whatever.

----------

## perlovka

New kernel release would not fix this   :Smile: 

You may take hostapd live ebuild from git ( net-wireless/hostapd-9999 ) or wait until it accepted.

----------

## Ant P.

Yeah, as long as it wasn't me doing something stupid to cause it, I can live with it for the time being. Going to mark this solved then.

----------

