From f2ef661f26d13ee55976f1578e5f76f7ddb20df7 Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Tue, 17 Dec 2019 00:38:50 +0100 Subject: [HICN-461] Improve netlink event management in facemgr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I4d26843bd3a3ac23db9c72a095ab030a037237d4 Signed-off-by: Jordan Augé --- ctrl/facemgr/src/interfaces/netlink/netlink.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ctrl/facemgr/src/interfaces/netlink/netlink.c b/ctrl/facemgr/src/interfaces/netlink/netlink.c index b57a4e480..a1affd719 100644 --- a/ctrl/facemgr/src/interfaces/netlink/netlink.c +++ b/ctrl/facemgr/src/interfaces/netlink/netlink.c @@ -425,7 +425,7 @@ int nl_callback(interface_t * interface, int fd, void * unused) break; } - DEBUG("Interface %s: address was removed", interface_name); + DEBUG("[NETLINK] Interface %s: address was removed", interface_name); if (facelet) { facelet_set_event(facelet, FACELET_EVENT_SET_DOWN); facelet_set_attr_clean(facelet); @@ -446,7 +446,7 @@ int nl_callback(interface_t * interface, int fd, void * unused) break; } - DEBUG("Interface %s: new address was assigned: %s", interface_name, interface_address); + DEBUG("[NETLINK] Interface %s: new address was assigned: %s", interface_name, interface_address); if (facelet) { facelet_set_event(facelet, FACELET_EVENT_UPDATE); @@ -468,7 +468,7 @@ int nl_callback(interface_t * interface, int fd, void * unused) break; } - DEBUG("Network interface %s was removed", interface_name); + DEBUG("[NETLINK] Network interface %s was removed", interface_name); if (!facelet) break; @@ -495,7 +495,7 @@ int nl_callback(interface_t * interface, int fd, void * unused) // UP NOT RUNNING // DOWN NOT RUNNING #if 1 - DEBUG("New network interface %s, state: %s %s", interface_name, + DEBUG("[NETLINK] New network interface %s, state: %s %s", interface_name, up ? "UP" : "DOWN", running ? "RUNNING" : "NOT_RUNNING"); #endif @@ -517,14 +517,14 @@ int nl_callback(interface_t * interface, int fd, void * unused) facelet_set_family(facelet6, AF_INET6); interface_raise_event(interface, facelet6); #endif - } else { -#if 1 - facelet_set_event(facelet, FACELET_EVENT_SET_DOWN); - facelet_set_attr_clean(facelet); - interface_raise_event(interface, facelet); -#else - facelet_free(facelet); -#endif +// } else { +//#if 1 +// facelet_set_event(facelet, FACELET_EVENT_SET_DOWN); +// facelet_set_attr_clean(facelet); +// interface_raise_event(interface, facelet); +//#else +// facelet_free(facelet); +//#endif } break; } -- cgit 1.2.3-korg