diff options
author | Jordan Augé <jordan.auge+fdio@cisco.com> | 2019-12-09 01:23:37 +0100 |
---|---|---|
committer | Jordan Augé <jordan.auge+fdio@cisco.com> | 2019-12-09 15:33:32 +0100 |
commit | b0c1a5f4362a1db5621b74052eca27d3e2af1ab2 (patch) | |
tree | 9f3dc5018db1d2c4cfcb8a363cea210d6e3ff00c /ctrl/facemgr/src/interfaces | |
parent | c294250cd9faccf514316f92636a1a78a35b514f (diff) |
[HICN-438] facemgr should allow face creation with physical interface down
Change-Id: I9d333f2d420c735d3867c0813dc93e82aceb3861
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'ctrl/facemgr/src/interfaces')
4 files changed, 9 insertions, 9 deletions
diff --git a/ctrl/facemgr/src/interfaces/android_utility/android_utility.c b/ctrl/facemgr/src/interfaces/android_utility/android_utility.c index 47d3cd106..8eca6c2b0 100644 --- a/ctrl/facemgr/src/interfaces/android_utility/android_utility.c +++ b/ctrl/facemgr/src/interfaces/android_utility/android_utility.c @@ -119,7 +119,7 @@ int au_on_event(interface_t * interface, facelet_t * facelet) facelet_t * facelet_new = facelet_create(); facelet_set_netdevice(facelet_new, netdevice); - facelet_set_status(facelet_new, FACELET_STATUS_CLEAN); + facelet_set_attr_clean(facelet_new); facelet_set_netdevice_type(facelet_new, netdevice_type); facelet_set_event(facelet_new, FACELET_EVENT_UPDATE); diff --git a/ctrl/facemgr/src/interfaces/netlink/netlink.c b/ctrl/facemgr/src/interfaces/netlink/netlink.c index 4d92f2511..b57a4e480 100644 --- a/ctrl/facemgr/src/interfaces/netlink/netlink.c +++ b/ctrl/facemgr/src/interfaces/netlink/netlink.c @@ -428,7 +428,7 @@ int nl_callback(interface_t * interface, int fd, void * unused) DEBUG("Interface %s: address was removed", interface_name); if (facelet) { facelet_set_event(facelet, FACELET_EVENT_SET_DOWN); - facelet_set_status(facelet, FACELET_STATUS_CLEAN); + facelet_set_attr_clean(facelet); interface_raise_event(interface, facelet); } break; @@ -450,7 +450,7 @@ int nl_callback(interface_t * interface, int fd, void * unused) if (facelet) { facelet_set_event(facelet, FACELET_EVENT_UPDATE); - facelet_set_status(facelet, FACELET_STATUS_CLEAN); + facelet_set_attr_clean(facelet); interface_raise_event(interface, facelet); } break; @@ -474,7 +474,7 @@ int nl_callback(interface_t * interface, int fd, void * unused) break; facelet_set_event(facelet, FACELET_EVENT_DELETE); - facelet_set_status(facelet, FACELET_STATUS_CLEAN); + facelet_set_attr_clean(facelet); interface_raise_event(interface, facelet); break; @@ -505,7 +505,7 @@ int nl_callback(interface_t * interface, int fd, void * unused) if (up && running) { facelet_set_event(facelet, FACELET_EVENT_CREATE); //facelet_set_family(facelet, AF_INET); - facelet_set_status(facelet, FACELET_STATUS_CLEAN); + facelet_set_attr_clean(facelet); interface_raise_event(interface, facelet); #if 0 @@ -520,7 +520,7 @@ int nl_callback(interface_t * interface, int fd, void * unused) } else { #if 1 facelet_set_event(facelet, FACELET_EVENT_SET_DOWN); - facelet_set_status(facelet, FACELET_STATUS_CLEAN); + facelet_set_attr_clean(facelet); interface_raise_event(interface, facelet); #else facelet_free(facelet); diff --git a/ctrl/facemgr/src/interfaces/priority_controller/priority_controller.c b/ctrl/facemgr/src/interfaces/priority_controller/priority_controller.c index 5452c0e85..76538185f 100644 --- a/ctrl/facemgr/src/interfaces/priority_controller/priority_controller.c +++ b/ctrl/facemgr/src/interfaces/priority_controller/priority_controller.c @@ -115,8 +115,8 @@ int priority_controller_callback(interface_t * interface, int fd, void * unused) facelet_t * facelet_c = facelet_create(); facelet_set_netdevice_type(facelet_w, NETDEVICE_TYPE_WIFI); facelet_set_netdevice_type(facelet_c, NETDEVICE_TYPE_CELLULAR); - facelet_set_status(facelet_w, FACELET_STATUS_CLEAN); - facelet_set_status(facelet_c, FACELET_STATUS_CLEAN); + facelet_set_attr_clean(facelet_w); + facelet_set_attr_clean(facelet_c); switch(buf[0]) { case '\0': facelet_set_priority(facelet_w, 0); diff --git a/ctrl/facemgr/src/interfaces/updown/updown.c b/ctrl/facemgr/src/interfaces/updown/updown.c index b804cdac1..7d305a5cd 100644 --- a/ctrl/facemgr/src/interfaces/updown/updown.c +++ b/ctrl/facemgr/src/interfaces/updown/updown.c @@ -118,7 +118,7 @@ int updown_callback(interface_t * interface, int fd, void * unused) /* Raise facelet update event */ facelet_t * facelet = facelet_create(); facelet_set_netdevice_type(facelet, NETDEVICE_TYPE_WIFI); //CELLULAR); - facelet_set_status(facelet, FACELET_STATUS_CLEAN); + facelet_set_attr_clean(facelet); switch(buf[0]) { case '\0': facelet_set_admin_state(facelet, FACE_STATE_DOWN); |