mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
B#15082: bbfdm does not fault on invalid wildcard usages
This commit is contained in:
parent
1537993fc8
commit
a21c3b36b8
1 changed files with 9 additions and 1 deletions
|
|
@ -1495,6 +1495,8 @@ static void __get_ubus_name(struct ubus_request *req, int type, struct blob_attr
|
|||
if (tb[1]) {
|
||||
dmctx->faultcode = blobmsg_get_u32(tb[1]);
|
||||
return;
|
||||
} else {
|
||||
dmctx->faultcode = 0;
|
||||
}
|
||||
|
||||
dmctx->findparam = 1;
|
||||
|
|
@ -1532,10 +1534,16 @@ static int get_ubus_name(struct dmctx *dmctx, struct dmnode *node)
|
|||
blobmsg_add_u8(&blob, "first_level", dmctx->nextlevel);
|
||||
prepare_optional_table(dmctx, &blob);
|
||||
|
||||
ubus_call_blob_msg(ubus_name, "schema", &blob, 5000, __get_ubus_name, dmctx);
|
||||
int res = ubus_call_blob_msg(ubus_name, "schema", &blob, 5000, __get_ubus_name, dmctx);
|
||||
|
||||
blob_buf_free(&blob);
|
||||
|
||||
if (res)
|
||||
return FAULT_9005;
|
||||
|
||||
if (dmctx->faultcode)
|
||||
return dmctx->faultcode;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue