mirror of
https://github.com/outbackdingo/udevmand.git
synced 2026-01-27 18:20:48 +00:00
resolv port to owrt iface names
Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
2
netdev.c
2
netdev.c
@@ -136,7 +136,7 @@ iface_dump(void)
|
||||
struct iface_ip *ip;
|
||||
void *c, *d;
|
||||
|
||||
c = blobmsg_open_table(&b, iface->name);
|
||||
c = blobmsg_open_table(&b, interface_resolve(iface->name));
|
||||
blobmsg_add_mac(&b, "hwaddr", iface->addr);
|
||||
if (!list_empty(&iface->ipv4)) {
|
||||
d = blobmsg_open_array(&b, "ipv4");
|
||||
|
||||
6
ubus.c
6
ubus.c
@@ -52,7 +52,7 @@ ubus_mac_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
return UBUS_STATUS_OK;
|
||||
}
|
||||
|
||||
static int
|
||||
/*static int
|
||||
ubus_interface_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
struct ubus_request_data *req, const char *method,
|
||||
struct blob_attr *msg)
|
||||
@@ -60,7 +60,7 @@ ubus_interface_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
if (!interface_dump())
|
||||
ubus_send_reply(ctx, req, b.head);
|
||||
return UBUS_STATUS_OK;
|
||||
}
|
||||
}*/
|
||||
|
||||
static int
|
||||
ubus_port_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
@@ -74,7 +74,7 @@ ubus_port_cb(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
}
|
||||
|
||||
static const struct ubus_method topology_methods[] = {
|
||||
UBUS_METHOD_NOARG("interface", ubus_interface_cb),
|
||||
//UBUS_METHOD_NOARG("interface", ubus_interface_cb),
|
||||
UBUS_METHOD_NOARG("mac", ubus_mac_cb),
|
||||
UBUS_METHOD_NOARG("port", ubus_port_cb),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user