Mercurial > hg > dhcpcd
changeset 2945:6960feec8c1d draft
Reserve space for a fully escaped SSID in the lease filename.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Tue, 10 Feb 2015 08:54:33 +0000 |
| parents | 466084782756 |
| children | dfebb30d292a |
| files | dhcp.h dhcp6.h |
| diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dhcp.h Tue Feb 10 08:50:39 2015 +0000 +++ b/dhcp.h Tue Feb 10 08:54:33 2015 +0000 @@ -223,7 +223,7 @@ 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;
--- a/dhcp6.h Tue Feb 10 08:50:39 2015 +0000 +++ b/dhcp6.h Tue Feb 10 08:54:33 2015 +0000 @@ -197,7 +197,8 @@ 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;
