]> git.puffer.fish Git - mirror/frr.git/commitdiff
nhrpd: change ipsec SA count to 32-bit
authorTimo Teräs <timo.teras@iki.fi>
Sun, 19 Jul 2020 15:07:31 +0000 (18:07 +0300)
committerReuben Dowle <reuben.dowle@4rf.com>
Wed, 16 Dec 2020 21:04:12 +0000 (10:04 +1300)
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.

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
nhrpd/nhrpd.h

index 80a365a3c38d0064593ceafede9361510f6c7890..4ff9734ce632ae50222df8d106960c367075f7ee 100644 (file)
@@ -124,7 +124,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;