network/netdev: do not try to update several parameters if the interface already exists (#34937)

split-out of #34909.
This commit is contained in:
Yu Watanabe
2024-10-31 04:04:33 +09:00
committed by GitHub
5 changed files with 98 additions and 36 deletions
+6
View File
@@ -179,6 +179,12 @@ typedef struct NetDevVTable {
/* get ifindex of the netdev. */
int (*get_ifindex)(NetDev *netdev, const char *name);
/* provides if MAC address can be set. If this is not set, assumed to be yes. */
bool (*can_set_mac)(NetDev *netdev, const struct hw_addr_data *hw_addr);
/* provides if MTU can be set. If this is not set, assumed to be yes. */
bool (*can_set_mtu)(NetDev *netdev, uint32_t mtu);
/* expected iftype, e.g. ARPHRD_ETHER. */
uint16_t iftype;