summaryrefslogtreecommitdiffstats
path: root/dhcp.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-10-18 16:41:19 +0000
committerRoy Marples <roy@marples.name>2008-10-18 16:41:19 +0000
commiteae4f5b4724b0a237bdf036479435e553b6ecd90 (patch)
tree2c080a55cb7df85b7bd92c0ba2d636cd37d85c75 /dhcp.c
parentaec7d71ddb2d4236c7db2fe79350274ca26e178f (diff)
downloaddhcpcd-eae4f5b4724b0a237bdf036479435e553b6ecd90.tar.xz
Get INFORM support almost working again.
Diffstat (limited to 'dhcp.c')
-rw-r--r--dhcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dhcp.c b/dhcp.c
index 59c648df..3b698dae 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -1198,10 +1198,10 @@ configure_env(char **env, const char *prefix, const struct dhcp_message *dhcp,
}
ep = env;
- if (dhcp->yiaddr) {
+ if (dhcp->yiaddr || dhcp->ciaddr) {
/* Set some useful variables that we derive from the DHCP
* message but are not necessarily in the options */
- addr.s_addr = dhcp->yiaddr;
+ addr.s_addr = dhcp->yiaddr ? dhcp->yiaddr : dhcp->ciaddr;
setvar(&ep, prefix, "ip_address", inet_ntoa(addr));
if (get_option_addr(&net.s_addr, dhcp, DHO_SUBNETMASK) == -1) {
net.s_addr = get_netmask(addr.s_addr);