mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 10:35:03 +08:00
dhcpcd CAN work on IEEE FireWire interfaces.
However, BPF does not appear to operate on these, so we report the error and continue. When BPF supports FireWire for DHCP, dhcpcd will magically start to work.
This commit is contained in:
parent
d377fcaa7c
commit
45b51c7f6c
@ -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.
|
||||
|
12
dhcpcd.c
12
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
|
||||
|
7
if-bsd.c
7
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
|
||||
|
Loading…
Reference in New Issue
Block a user