From f5ca1766dc93f8fb65efdd43670f1d7a74dba581 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Sun, 21 Feb 2016 12:01:39 +0100 Subject: [PATCH] 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 --- src/ap/vlan.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ap/vlan.c b/src/ap/vlan.c index 80ae98445..b6f6bb1af 100644 --- a/src/ap/vlan.c +++ b/src/ap/vlan.c @@ -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; }