Verify compatibility before parsing config message

This adds a verion field to the ubus configuration message, to avoid
acting upon a message from an incompatible version of dawn.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
This commit is contained in:
Eneas U de Queiroz 2021-08-05 10:55:51 -03:00 committed by Polynomdivision
parent a7a830950a
commit 1e34357bdc
3 changed files with 15 additions and 0 deletions

View file

@ -1366,6 +1366,7 @@ int uci_send_via_network()
void *metric, *times;
blob_buf_init(&b, 0);
blobmsg_add_string(&b, "version", DAWN_CONFIG_VERSION);
metric = blobmsg_open_table(&b, "metric");
blobmsg_add_u32(&b, "ht_support", dawn_metric.ht_support);
blobmsg_add_u32(&b, "vht_support", dawn_metric.vht_support);