The iface->dhcpv4_own_ip struct is not a struct in_addr, so change the
code so that the iov takes the actual IPv4 address.
Closes: https://github.com/openwrt/odhcpd/issues/344
Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/odhcpd/pull/345
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
reply_dnsserver.len = iface->dns_addrs4_cnt * sizeof(*iface->dns_addrs4);
iov[IOV_DNSSERVER_ADDRS].iov_base = iface->dns_addrs4;
} else {
- reply_dnsserver.len = sizeof(iface->dhcpv4_own_ip);
- iov[IOV_DNSSERVER_ADDRS].iov_base = &iface->dhcpv4_own_ip;
+ reply_dnsserver.len = sizeof(iface->dhcpv4_own_ip.addr.in);
+ iov[IOV_DNSSERVER_ADDRS].iov_base = &iface->dhcpv4_own_ip.addr.in;
}
iov[IOV_DNSSERVER_ADDRS].iov_len = reply_dnsserver.len;
break;