/* The inform address HAS to be configured for it to
* work with most DHCP servers */
/* add_address */
+ addr.s_addr = lease->addr.s_addr | ~lease->net.s_addr;
+ logger(LOG_DEBUG, "adding IP address %s/%d",
+ inet_ntoa(lease->addr),
+ inet_ntocidr(lease->net));
+ if (add_address(iface->name, &lease->addr,
+ &lease->net, &addr) == -1)
+ {
+ logger(LOG_ERR, "add_address: %s",
+ strerror(errno));
+ return -1;
+ }
iface->addr.s_addr = lease->addr.s_addr;
iface->net.s_addr = lease->net.s_addr;
}
do_socket(state, SOCKET_CLOSED);
+ if (options->options & DHCPCD_INFORM)
+ return -1;
+
#ifdef ENABLE_INFO
if (!(state->options & DHCPCD_TEST) &&
(state->options & DHCPCD_IPV4LL ||
interface to be configured first. This does not get a lease as such, just
notifies the DHCP server of the
.Ar address
-we are using.
+we are using. If we fail to contact a DHCP server then we return a failure
+instead of falling back on IPv4LL.
.It Fl t , -timeout Ar seconds
Timeout after
.Ar seconds ,