mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
net/netdev: Add an algorithm to prevent an interface index from being reused until all network interfaces have by assigned once. The prevents removable devices from being removed, unregistered and re-installed, re-registered and keeping the same interface index.
This commit is contained in:
@@ -89,6 +89,14 @@ EXTERN struct net_driver_s *g_netdevices;
|
||||
*/
|
||||
|
||||
EXTERN uint32_t g_devset;
|
||||
|
||||
/* The set of network devices that have been freed. The purpose of this
|
||||
* set is to postpone reuse of a interface index for as long as possible,
|
||||
* i.e., don't reuse an interface index until all of the possible indices
|
||||
* have been used.
|
||||
*/
|
||||
|
||||
EXTERN uint32_t g_devfreed;
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user