summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dhcpcd-run-hooks.8.in9
-rw-r--r--dhcpcd.c12
-rw-r--r--if-bsd.c7
3 files changed, 23 insertions, 5 deletions
diff --git a/dhcpcd-run-hooks.8.in b/dhcpcd-run-hooks.8.in
index 89525697..ef95590f 100644
--- a/dhcpcd-run-hooks.8.in
+++ b/dhcpcd-run-hooks.8.in
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd March 19, 2009
+.Dd March 23, 2009
.Dt DHCPCD.SH 8 SMM
.Os
.Sh NAME
@@ -104,9 +104,12 @@ This should be treated as EXPIRE.
dhcpcd lost the carrier.
The cable may have been unplugged or association to the wireless point lost.
.It Dv FAIL
-dhcpcd failed to contact any DHCP servers or use an old lease.
+dhcpcd failed to operate on the interface.
+This normally happens when dhcpcd does not support the raw interface, which
+means it cannot work as a DHCP or ZeroConf client.
+Static configuration is still allowed.
.It Dv STOP
-dhcpcd will stop running on the interface.
+dhcpcd stopped running on the interface.
.It Dv TEST
dhcpcd received an OFFER from a DHCP server but will not configure the
interface.
diff --git a/dhcpcd.c b/dhcpcd.c
index e19dfbd8..1fe5cdbf 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -310,8 +310,18 @@ send_message(struct interface *iface, int type,
len = make_udp_packet(&udp, (uint8_t *)dhcp, len, from, to);
r = send_raw_packet(iface, ETHERTYPE_IP, udp, len);
free(udp);
- if (r == -1)
+ /* If we failed to send a raw packet this normally means
+ * we don't have the ability to work beneath the IP layer
+ * for this interface.
+ * As such we remove it from consideration without actually
+ * stopping the interface. */
+ if (r == -1) {
syslog(LOG_ERR, "%s: send_raw_packet: %m", iface->name);
+ drop_config(iface, "FAIL");
+ close_sockets(iface);
+ delete_timeout(NULL, iface);
+ callback = NULL;
+ }
}
free(dhcp);
/* Even if we fail to send a packet we should continue as we are
diff --git a/if-bsd.c b/if-bsd.c
index 0db8b304..2b8b9375 100644
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -408,7 +408,10 @@ discover_link(struct interface **ifs, int argc, char * const *argv,
case IFT_ETHER:
ifp->family = ARPHRD_ETHER;
ifp->hwlen = sdl->sdl_alen;
- memcpy(ifp->hwaddr, LLADDR(sdl), sdl->sdl_alen);
+ break;
+ case IFT_IEEE1394:
+ ifp->family = ARPHRD_IEEE1394;
+ ifp->hwlen = sdl->sdl_alen;
break;
case IFT_LOOP:
/* We don't allow loopback unless requested */
@@ -418,6 +421,8 @@ discover_link(struct interface **ifs, int argc, char * const *argv,
}
break;
}
+ if (ifp && ifp->hwlen)
+ memcpy(ifp->hwaddr, LLADDR(sdl), ifp->hwlen);
if (ifl)
ifl->next = ifp;
else