From fe08cfd2bfb389f7c174e2dd1561ba4a381db213 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Thu, 13 Nov 2014 15:57:56 +0000 Subject: netifd: Fix device ifindex overwrite when processing netlink event messages When a device with the same name is deleted and created again in the kernel the ifindex changes. A race condition will occur when netlink event messages linked to the old device are processed and will thus overwrite the correct ifindex of the new device. Further make sure a valid ifindex is in place for both external and internal devices when setting the state to enabled. Signed-off-by: Hans Dedecker --- system.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'system.h') diff --git a/system.h b/system.h index b1215d1..3bf6f97 100644 --- a/system.h +++ b/system.h @@ -116,6 +116,8 @@ void system_if_clear_state(struct device *dev); int system_if_up(struct device *dev); int system_if_down(struct device *dev); int system_if_check(struct device *dev); +int system_if_resolve(struct device *dev); + int system_if_dump_info(struct device *dev, struct blob_buf *b); int system_if_dump_stats(struct device *dev, struct blob_buf *b); struct device *system_if_get_parent(struct device *dev); -- cgit v1.2.1