diff options
author | carlsonj <none@none> | 2007-04-25 11:54:45 -0700 |
---|---|---|
committer | carlsonj <none@none> | 2007-04-25 11:54:45 -0700 |
commit | cfb9c9abdc2696bc174bb10a3a28552dc917b98f (patch) | |
tree | 66f98c1f0a916d6eacc66a9141e1153208695386 /usr/src/cmd/cmd-inet/sbin/dhcpagent/inform.c | |
parent | 8cb045d062db356cee4eaacd954f772ab314f6f3 (diff) | |
download | illumos-gate-cfb9c9abdc2696bc174bb10a3a28552dc917b98f.tar.gz |
6396937 dhcpagent: cannot write /etc/dhcp/e1000g0.dhc
6514851 in.ndpd "giving up" message needs work
6524645 clear_lif_dhcp is too cautious
6525108 inconsistent handling of lists due to fix for CR 6209214
6528047 dhcp inform messages are sent with zero source
6541139 dhcpagent can leave timers running on drop
6541633 dhcpagent's route clean-up mechanism can misfire, removing default route
Diffstat (limited to 'usr/src/cmd/cmd-inet/sbin/dhcpagent/inform.c')
-rw-r--r-- | usr/src/cmd/cmd-inet/sbin/dhcpagent/inform.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/src/cmd/cmd-inet/sbin/dhcpagent/inform.c b/usr/src/cmd/cmd-inet/sbin/dhcpagent/inform.c index e742e91649..f53944a006 100644 --- a/usr/src/cmd/cmd-inet/sbin/dhcpagent/inform.c +++ b/usr/src/cmd/cmd-inet/sbin/dhcpagent/inform.c @@ -50,6 +50,9 @@ static boolean_t stop_informing(dhcp_smach_t *, unsigned int); * output: void * note: the INFORM cannot be sent successfully if the interface * does not have an IP address (this is mostly an issue for IPv4). + * We switch into INFORM_SENT state before sending the packet so + * that the packet-sending subsystem uses regular sockets and sets + * the source address. (See set_smach_state.) */ void @@ -57,7 +60,7 @@ dhcp_inform(dhcp_smach_t *dsmp) { dhcp_pkt_t *dpkt; - if (!set_smach_state(dsmp, INIT)) + if (!set_smach_state(dsmp, INFORM_SENT)) goto failed; if (dsmp->dsm_isv6) { @@ -101,14 +104,12 @@ dhcp_inform(dhcp_smach_t *dsmp) } } - if (!set_smach_state(dsmp, INFORM_SENT)) - goto failed; - return; failed: dsmp->dsm_dflags |= DHCP_IF_FAILED; ipc_action_finish(dsmp, DHCP_IPC_E_INT); + (void) set_smach_state(dsmp, INIT); } /* |