]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Reserve space for a fully escaped SSID in the lease filename.
authorRoy Marples <roy@marples.name>
Tue, 10 Feb 2015 08:54:33 +0000 (08:54 +0000)
committerRoy Marples <roy@marples.name>
Tue, 10 Feb 2015 08:54:33 +0000 (08:54 +0000)
dhcp.h
dhcp6.h

diff --git a/dhcp.h b/dhcp.h
index 8e847a70fa4cac7c0645e35fd0670a91a9ee595b..9a01e67b4bbac16038a46129a34478f2493574e6 100644 (file)
--- 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 7e5e11dba85fe7c8372aef947808a2f3225e6530..37f963c23f8c47ead1a1dc11058b5c0dc3f2948b 100644 (file)
--- 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;