Browse Source

FST: Fix dialog token wrap-around

Dialog token is only 8 bits and maintaining u32 version of it in struct
fst_group resulted in incorrect wrap-around behavior in
fst_group_assign_dialog_token(). It was possible to assign u8
dialog_token value 0 because of this. Fix this by using u8 variable
consistently.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 9 years ago
parent
commit
fe73b469e8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/fst/fst_group.h

+ 1 - 1
src/fst/fst_group.h

@@ -12,7 +12,7 @@
 struct fst_group {
 	char group_id[IFNAMSIZ + 1];
 	struct dl_list ifaces;
-	u32 dialog_token;
+	u8 dialog_token;
 	u32 fsts_id;
 	struct dl_list global_groups_lentry;
 };