mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
VLAN: Fix vlan_compare() for tagged VLANs
While refactoring VLAN comparison into vlan_compare(), it was overlooked that modifications are needed for tagged VLAN support. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
This commit is contained in:
parent
12605642b3
commit
f5ca1766dc
@ -16,6 +16,7 @@
|
||||
*/
|
||||
int vlan_compare(struct vlan_description *a, struct vlan_description *b)
|
||||
{
|
||||
int i;
|
||||
const int a_empty = !a || !a->notempty;
|
||||
const int b_empty = !b || !b->notempty;
|
||||
|
||||
@ -25,5 +26,9 @@ int vlan_compare(struct vlan_description *a, struct vlan_description *b)
|
||||
return 1;
|
||||
if (a->untagged != b->untagged)
|
||||
return 1;
|
||||
for (i = 0; i < MAX_NUM_TAGGED_VLAN; i++) {
|
||||
if (a->tagged[i] != b->tagged[i])
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user