mirror of
https://github.com/apache/nuttx.git
synced 2026-08-09 22:45:08 +00:00
* net/netdev/netdev_ioctl.c: (netdev_ifr_ioctl): The ioctl SIOCSIFHWADDR sets the hardware address (e.g., Ethernet MAC, etc.) of a network interface. Radio devices may have different lengths of hardware addresses, such as NET_6LOWPAN_EADDRSIZE (8), NET_6LOWPAN_SADDRSIZE (2), or RADIO_MAX_ADDRLEN (8). Also, Kconfig CONFIG_PKTRADIO_ADDRLEN allows the user to set any arbitrary size. Note that while the sister ioctl SIOCGIFHWADDR "get hardware address" copies `dev->d_mac.radio.nv_addrlen` bytes, SIOCSIFHWADDR was copying NET_6LOWPAN_ADDRSIZE bytes unconditionally. Depending on which radio is used, this could be incorrect. Fixing it to use `dev->d_mac.radio.nv_addrlen` for SIOCSIFHWADDR as well. Also adding DEBUGASSERT to ensure this is within bounds of source and destination of the copy. |
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Make.defs | ||
| netdev.h | ||
| netdev_carrier.c | ||
| netdev_count.c | ||
| netdev_default.c | ||
| netdev_findbyaddr.c | ||
| netdev_findbyindex.c | ||
| netdev_findbyname.c | ||
| netdev_foreach.c | ||
| netdev_ifconf.c | ||
| netdev_ioctl.c | ||
| netdev_lladdrsize.c | ||
| netdev_register.c | ||
| netdev_txnotify.c | ||
| netdev_unregister.c | ||
| netdev_verify.c | ||
| netdown_notifier.c | ||