[PATCHv2 08/21] VLAN: remove vlan_tail

Jouni Malinen j
Tue Jun 25 02:17:55 PDT 2013


On Fri, May 17, 2013 at 04:12:12PM +0200, Michael Braun wrote:
> Everything in hostapd can be implemented efficiently without vlan_tail.

> diff --git a/hostapd/config_file.c b/hostapd/config_file.c
> @@ -93,11 +93,8 @@ static int hostapd_config_read_vlan_file(struct hostapd_bss_config *bss,
>  
>  		vlan->vlan_id = vlan_id;
>  		os_strlcpy(vlan->ifname, pos, sizeof(vlan->ifname));
> -		if (bss->vlan_tail)
> -			bss->vlan_tail->next = vlan;
> -		else
> -			bss->vlan = vlan;
> -		bss->vlan_tail = vlan;
> +		vlan->next = bss->vlan;
> +		bss->vlan = vlan;

This would use reverse order for the VLAN list. Can that cause any
issues, e.g., with wildcard entries used with non-wildcard and which one
would be picked in such case?

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list