summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device.h3
-rw-r--r--interface.c4
-rw-r--r--interface.h1
-rw-r--r--ubus.c2
4 files changed, 7 insertions, 3 deletions
diff --git a/device.h b/device.h
index ce135ba..798e19e 100644
--- a/device.h
+++ b/device.h
@@ -160,8 +160,11 @@ struct device {
struct blob_attr *config;
bool config_pending;
bool sys_present;
+ /* DEV_EVENT_ADD */
bool present;
+ /* DEV_EVENT_UP */
int active;
+ /* DEV_EVENT_LINK_UP */
bool link_active;
bool external;
diff --git a/interface.c b/interface.c
index 848990e..ffe7988 100644
--- a/interface.c
+++ b/interface.c
@@ -649,7 +649,7 @@ interface_handle_config_change(struct interface *iface)
}
static void
-interface_proto_cb(struct interface_proto_state *state, enum interface_proto_event ev)
+interface_proto_event_cb(struct interface_proto_state *state, enum interface_proto_event ev)
{
struct interface *iface = state->iface;
@@ -708,7 +708,7 @@ void interface_set_proto_state(struct interface *iface, struct interface_proto_s
if (!state)
return;
- state->proto_event = interface_proto_cb;
+ state->proto_event = interface_proto_event_cb;
state->iface = iface;
}
diff --git a/interface.h b/interface.h
index 8eeb7db..6f9112c 100644
--- a/interface.h
+++ b/interface.h
@@ -120,6 +120,7 @@ struct interface {
struct list_head users;
+ /* for alias interface */
const char *parent_ifname;
struct interface_user parent_iface;
diff --git a/ubus.c b/ubus.c
index 56f7bdd..c834d11 100644
--- a/ubus.c
+++ b/ubus.c
@@ -817,7 +817,7 @@ netifd_iface_handle_device(struct ubus_context *ctx, struct ubus_object *obj,
cur = tb[DEV_LINK_EXT];
if (cur)
- link_ext = !!blobmsg_get_u8(cur);
+ link_ext = blobmsg_get_bool(cur);
return interface_handle_link(iface, blobmsg_data(tb[DEV_LINK_NAME]), add, link_ext);
}