mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-02-18 02:01:26 +01:00
Device.IP.Interface.{i}.MaxMTUSize: read its value from sysfs
This commit is contained in:
parent
bd92aa3b86
commit
f17dfc929a
2 changed files with 7 additions and 12 deletions
|
|
@ -1558,9 +1558,13 @@ static int set_IPInterface_Reset(char *refparam, struct dmctx *ctx, void *data,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*#Device.IP.Interface.{i}.MaxMTUSize!UCI:network/interface,@i-1/mtu*/
|
||||
/*#Device.IP.Interface.{i}.MaxMTUSize!SYSFS:/sys/class/net/@Name/mtu*/
|
||||
static int get_IPInterface_MaxMTUSize(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
get_ip_iface_sysfs(data, "mtu", value);
|
||||
if (*value && **value != '0')
|
||||
return 0;
|
||||
|
||||
*value = dmuci_get_value_by_section_fallback_def((struct uci_section *)data, "mtu", "1500");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41116,17 +41116,8 @@
|
|||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "network",
|
||||
"section": {
|
||||
"type": "interface",
|
||||
"index": "@i-1"
|
||||
},
|
||||
"option": {
|
||||
"name": "mtu"
|
||||
}
|
||||
}
|
||||
"type": "sysfs",
|
||||
"file": "/sys/class/net/@Name/mtu"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue