diff options
| author | Roy Marples <roy@marples.name> | 2016-11-10 13:47:46 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-11-10 13:47:46 +0000 |
| commit | f0353a809f889a04857bb18fc356d4a68dda2c9d (patch) | |
| tree | f9cc990633281ef9ae58b5e27cf06309dee3c56d | |
| parent | c7c282d9f7bd63b27e140769a8212d005a6893f7 (diff) | |
| download | dhcpcd-f0353a809f889a04857bb18fc356d4a68dda2c9d.tar.xz | |
Fix size of DHCPv6 addresses when making messages.
| -rw-r--r-- | dhcp6.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -680,17 +680,14 @@ dhcp6_makemessage(struct interface *ifp) continue; if (ap->ia_type == D6_OPTION_IA_PD) { #ifndef SMALL - len += sizeof(o) + sizeof(o.len) + - 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: |
