diff --git a/src/add-ons/kernel/network/devices/ethernet/ethernet.cpp b/src/add-ons/kernel/network/devices/ethernet/ethernet.cpp index 147a59877c..110b9ac2c9 100644 --- a/src/add-ons/kernel/network/devices/ethernet/ethernet.cpp +++ b/src/add-ons/kernel/network/devices/ethernet/ethernet.cpp @@ -400,7 +400,9 @@ ethernet_add_multicast(struct net_device *_device, const sockaddr *_address) if (address->sdl_type != IFT_ETHER) return B_BAD_VALUE; - return ioctl(device->fd, ETHER_ADDMULTI, LLADDR(address), 6); + if (ioctl(device->fd, ETHER_ADDMULTI, LLADDR(address), 6) < 0) + return errno; + return B_OK; } @@ -416,7 +418,9 @@ ethernet_remove_multicast(struct net_device *_device, const sockaddr *_address) if (address->sdl_type != IFT_ETHER) return B_BAD_VALUE; - return ioctl(device->fd, ETHER_REMMULTI, LLADDR(address), 6); + if (ioctl(device->fd, ETHER_REMMULTI, LLADDR(address), 6) < 0) + return errno; + return B_OK; }