diff options
| author | Roy Marples <roy@marples.name> | 2016-11-24 11:39:59 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-11-24 11:39:59 +0000 |
| commit | b97c75201c83f16643646e9a4a9e1b2b0c501d76 (patch) | |
| tree | f0a3c44e5fe6a132f873fa2a29c49e5fa5e113f3 | |
| parent | a2d467862af19bdf8f3889d11111f7e7dee63ed6 (diff) | |
| download | dhcpcd-b97c75201c83f16643646e9a4a9e1b2b0c501d76.tar.xz | |
Fix size of DHCPv6 addresses when making messages.
| -rw-r--r-- | dhcp6.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -640,17 +640,16 @@ dhcp6_makemessage(struct interface *ifp) continue; if (ap->ia_type == D6_OPTION_IA_PD) { #ifndef SMALL - len += sizeof(*o) + sizeof(u8) + - sizeof(u32) + sizeof(u32) + - sizeof(ap->prefix); + len += sizeof(*o) + + sizeof(struct dhcp6_pd_addr); if (ap->prefix_exclude_len) len += sizeof(*o) + 1 + (uint8_t)((ap->prefix_exclude_len - ap->prefix_len - 1) / NBBY) + 1; #endif } else - len += sizeof(*o) + sizeof(ap->addr) + - sizeof(u32) + sizeof(u32); + len += sizeof(*o) + + sizeof(struct dhcp6_ia_addr); } /* FALLTHROUGH */ case DH6S_INIT: |
