Browse Source

nhrpd: change ipsec SA count to 32-bit

Under certain misconfigurations, the SA count can be unusually high
and wrap 8-bit counter. That leads to premature free, and crash.
Make the count 32-bit to avoid crash in these rare conditions.
Timo Teräs 1 year ago
parent
commit
fc6fefacad
1 changed files with 1 additions and 1 deletions
  1. 1 1
      nhrpd/nhrpd.h

+ 1 - 1
nhrpd/nhrpd.h

@@ -123,7 +123,7 @@ enum nhrp_notify_type {
 
 struct nhrp_vc {
 	struct notifier_list notifier_list;
-	uint8_t ipsec;
+	uint32_t ipsec;
 	uint8_t updating;
 	uint8_t abort_migration;