X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=macvlan.c;h=9c03cd8191dc1d61295ad01c705f57734a3d1b2e;hb=023db1ca8f352a646700f2d60c397fb89492f4c8;hp=bf813407726bb3bf48b3886b9181f4633bcab79c;hpb=5dd87fd8ad3a42c71d90a8fecc893af973e552bf;p=project%2Fnetifd.git diff --git a/macvlan.c b/macvlan.c index bf81340..9c03cd8 100644 --- a/macvlan.c +++ b/macvlan.c @@ -17,7 +17,11 @@ #include #include #include +#include + +#ifdef linux #include +#endif #include "netifd.h" #include "device.h" @@ -65,6 +69,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; }