[PATCH] bsd: Use correct size for routing socket

Jouni Malinen j
Sun Feb 27 04:04:01 PST 2011

On Wed, Feb 23, 2011 at 12:22:19PM +0900, Masashi Honma wrote:
> No. I haven't seen it caused a problem. But the fact doesn't
> guarantee 2048 is enough. At least rtbuf_len() returns the value
> which OS guarantees it is enough.


> I have thought as you. But this can change dynamically. At
> wpa_driver_bsd_init(), wpa_driver_bsd_event_receive()
> rtbuf_len() returns 4259, 5046 respectively.

Interesting.. That sounds a bit odd, but well, whatever. With that in
mind, this approach looks reasonable.

> I used realloc() because rtbuf_len() returns larger value than
> practical message size. If wpa_supplicant_event() returns immediately,
> following patch can be used.

The buffer is freed more or less immediately, so this patch looks better
to me and I applied it. Thanks!

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list