summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2019-12-17 00:38:50 +0100
committerJordan Augé <jordan.auge+fdio@cisco.com>2019-12-17 00:38:50 +0100
commitf2ef661f26d13ee55976f1578e5f76f7ddb20df7 (patch)
tree697b7cadd12d5f9a3969e66c64aa39309a894e4a
parenta6325a7343cc971cfca45fb50e4d7a9b9b5a2982 (diff)
[HICN-461] Improve netlink event management in facemgr
Change-Id: I4d26843bd3a3ac23db9c72a095ab030a037237d4 Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
-rw-r--r--ctrl/facemgr/src/interfaces/netlink/netlink.c24
1 files 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;
}