[PATCHv2 02/12] radius: add tagged vlan parsing

Jouni Malinen j at w1.fi
Thu Dec 24 10:56:43 PST 2015


On Sun, Dec 06, 2015 at 09:47:33PM +0100, Michael Braun wrote:
> This patch
>  1. adds tagged vlan to struct vlan_description
>     (compile limited number of tagged vlans per description)
>     For k tagged vlans, the first k entries in vlan_description.tagged are
>     used. They are sorted in ascending order. All other entries are zero.
>     This way os_memcmp can find identical configurations.

Is this os_memcmp use here referring to comparing memory presentations
of C structures in full? If so, I don't really think that is a good
approach as noted in the earlier comments in this thread. That is not
safe if the compiler does any padding between the fields and some of
those is not initialized and in any case, it would be much clearer to
provide an explicit function to do such comparison of the exact struct
members that need to be compared.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list