mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-01 17:42:02 +01:00
fix-wan-interface: fix CWMP bind interface
A ubus call is made for:
```
ubus call network.status '{"interface": "wan"}'
```
Where interface is retrieved from: `cwmp.cpe.default_wan_interface`
However, currently "device" is being used as the interface to bind to
but this is the raw device which only works if a L3 device hasn't been
created over the top - i.e for PPP.
Therefore pull L3 device instead, i.e:
```
"l3_device": "pppoe-wan", # <-- this is the one to use
"device": "eth0.1",
```
this also works when the WAN type is DHCP:
```
"l3_device": "eth0.1",
"device": "eth0.1",
"proto": "dhcp",
```
This commit is contained in:
parent
00d037ce85
commit
4d158e13b6
1 changed files with 1 additions and 1 deletions
2
common.c
2
common.c
|
|
@ -697,7 +697,7 @@ int copy_file(char *source_file, char *target_file)
|
|||
|
||||
void ubus_network_interface_callback(struct ubus_request *req __attribute__((unused)), int type __attribute__((unused)), struct blob_attr *msg)
|
||||
{
|
||||
const struct blobmsg_policy p[1] = { { "device", BLOBMSG_TYPE_STRING } };
|
||||
const struct blobmsg_policy p[1] = { { "l3_device", BLOBMSG_TYPE_STRING } };
|
||||
struct blob_attr *tb[1] = { NULL };
|
||||
blobmsg_parse(p, 1, tb, blobmsg_data(msg), blobmsg_len(msg));
|
||||
if (!tb[0]) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue