'never used' leases will no longer consistently shift between servers
on every pool rebalance run.
+- sendmsg()/recvmsg() control buffers are now declared in such a way to
+ ensure they are correctly aligned on all (esp. 64-bit) architectures.
+
Changes since 4.0.0a3
- The DHCP server no longer requires a "ddns-update-style" statement,
struct iovec v;
int result;
struct in6_pktinfo *pktinfo;
- char pbuf[CMSG_SPACE(sizeof(struct in6_pktinfo))];
struct cmsghdr *cmsg;
+ union {
+ struct cmsghdr cmsg_sizer;
+ u_int8_t pktinfo_sizer[CMSG_SPACE(sizeof(struct in6_pktinfo))];
+ } control_buf;
/*
* Initialize our message header structure.
* source address if we wanted, but we can safely let the
* kernel decide what that should be.
*/
- m.msg_control = pbuf;
- m.msg_controllen = sizeof(pbuf);
+ m.msg_control = &control_buf;
+ m.msg_controllen = sizeof(control_buf);
cmsg = CMSG_FIRSTHDR(&m);
cmsg->cmsg_level = IPPROTO_IPV6;
cmsg->cmsg_type = IPV6_PKTINFO;
struct sockaddr_in6 *from, struct in6_addr *to_addr) {
struct msghdr m;
struct iovec v;
- char pbuf[CMSG_SPACE(sizeof(struct in6_pktinfo))];
int result;
struct cmsghdr *cmsg;
struct in6_pktinfo *pktinfo;
int found_to_addr;
+ union {
+ struct cmsghdr cmsg_sizer;
+ u_int8_t pktinfo_sizer[CMSG_SPACE(sizeof(struct in6_pktinfo))];
+ } control_buf;
/*
* Initialize our message header structure.
* information (when we initialized the interface), so we
* should get the destination address from that.
*/
- m.msg_control = pbuf;
- m.msg_controllen = sizeof(pbuf);
+ m.msg_control = &control_buf;
+ m.msg_controllen = sizeof(control_buf);
result = recvmsg(interface->rfdesc, &m, 0);