Skip to content
Snippets Groups Projects
Commit 73a940ea authored by Marek Puzyniak's avatar Marek Puzyniak
Browse files

do not remove not ieee1905 interface

parent 7623445b
No related tags found
No related merge requests found
Pipeline #112445 failed
...@@ -1590,6 +1590,7 @@ int i1905_ubus_interface_del(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -1590,6 +1590,7 @@ int i1905_ubus_interface_del(struct ubus_context *ctx, struct ubus_object *obj,
{ {
struct i1905_private *p = container_of(obj, struct i1905_private, obj); struct i1905_private *p = container_of(obj, struct i1905_private, obj);
struct blob_attr *tb[NUM_I1905_INTERFACE_POLICY]; struct blob_attr *tb[NUM_I1905_INTERFACE_POLICY];
struct i1905_interface *iface;
char ifname[16] = {0}; char ifname[16] = {0};
int ret; int ret;
...@@ -1604,6 +1605,13 @@ int i1905_ubus_interface_del(struct ubus_context *ctx, struct ubus_object *obj, ...@@ -1604,6 +1605,13 @@ int i1905_ubus_interface_del(struct ubus_context *ctx, struct ubus_object *obj,
ifname[15] = '\0'; ifname[15] = '\0';
ret = i1905_remove_interface_object(p, ifname); ret = i1905_remove_interface_object(p, ifname);
iface = i1905_ifname_to_interface(p, ifname);
if (!iface) {
dbg("%s: %s is not a 1905 interface\n", __func__, ifname);
return -EINVAL;
}
i1905_teardown_interface(p, ifname); i1905_teardown_interface(p, ifname);
return ret; return ret;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment