From bec5000ca4b75bbd128c3f2edbad0035e8cc604d Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 10 Feb 2015 08:54:33 +0000 Subject: [PATCH] Reserve space for a fully escaped SSID in the lease filename. --- dhcp.h | 2 +- dhcp6.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dhcp.h b/dhcp.h index 8e847a70..9a01e67b 100644 --- a/dhcp.h +++ b/dhcp.h @@ -223,7 +223,7 @@ struct dhcp_state { struct in_addr dst; uint8_t added; - char leasefile[sizeof(LEASEFILE) + IF_NAMESIZE]; + char leasefile[sizeof(LEASEFILE) + IF_NAMESIZE + (IF_SSIDSIZE * 4)]; time_t start_uptime; unsigned char *clientid; diff --git a/dhcp6.h b/dhcp6.h index 7e5e11db..37f963c2 100644 --- a/dhcp6.h +++ b/dhcp6.h @@ -197,7 +197,8 @@ struct dhcp6_state { struct in6_addr unicast; struct ipv6_addrhead addrs; uint32_t lowpl; - char leasefile[sizeof(LEASEFILE6) + IF_NAMESIZE]; + /* The +3 is for the possible .pd extension for prefix delegation */ + char leasefile[sizeof(LEASEFILE6) + IF_NAMESIZE + (IF_SSIDSIZE * 4) +3]; const char *reason; struct authstate auth; -- 2.47.3