system: fix treatment of RT_TABLE_MAIN
[project/netifd.git] / macvlan.c
index 28567dc..e5a4891 100644 (file)
--- a/macvlan.c
+++ b/macvlan.c
@@ -44,6 +44,9 @@ static const struct blobmsg_policy macvlan_attrs[__MACVLAN_ATTR_MAX] = {
 static const struct uci_blob_param_list macvlan_attr_list = {
        .n_params = __MACVLAN_ATTR_MAX,
        .params = macvlan_attrs,
+
+       .n_next = 1,
+       .next = { &device_attr_list },
 };
 
 struct macvlan_device {
@@ -69,6 +72,12 @@ macvlan_base_cb(struct device_user *dev, enum device_event ev)
        case DEV_EVENT_REMOVE:
                device_set_present(&mvdev->dev, false);
                break;
+       case DEV_EVENT_LINK_UP:
+               device_set_link(&mvdev->dev, true);
+               break;
+       case DEV_EVENT_LINK_DOWN:
+               device_set_link(&mvdev->dev, false);
+               break;
        default:
                return;
        }