8e44c192da
1. Add 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. 2. Let tagged VLANs be parsed from RADIUS Access-Accept 3. Print VLAN %d+ with %d=untagged VID if tagged VLANs are set 4. Select an unused vlan_id > 4096 for new tagged VLAN configurations 5. Add EGRESS_VLAN RADIUS attribute parsing also for untagged VLANs Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
30 lines
727 B
C
30 lines
727 B
C
/*
|
|
* hostapd / VLAN definition
|
|
* Copyright (c) 2015, Jouni Malinen <j@w1.fi>
|
|
*
|
|
* This software may be distributed under the terms of the BSD license.
|
|
* See README for more details.
|
|
*/
|
|
|
|
#ifndef VLAN_H
|
|
#define VLAN_H
|
|
|
|
#define MAX_NUM_TAGGED_VLAN 32
|
|
|
|
struct vlan_description {
|
|
int notempty; /* 0 : no vlan information present, 1: else */
|
|
int untagged; /* >0 802.1q vid */
|
|
int tagged[MAX_NUM_TAGGED_VLAN]; /* first k items, ascending order */
|
|
};
|
|
|
|
#ifndef CONFIG_NO_VLAN
|
|
int vlan_compare(struct vlan_description *a, struct vlan_description *b);
|
|
#else /* CONFIG_NO_VLAN */
|
|
static inline int
|
|
vlan_compare(struct vlan_description *a, struct vlan_description *b)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif /* CONFIG_NO_VLAN */
|
|
|
|
#endif /* VLAN_H */
|