From fb82ab10896f894c6fbdf9ea3f5a96de883ed1ad Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 22 May 2023 11:35:05 +0200 Subject: [PATCH] netifd: backport 2 ubus status fixes Signed-off-by: John Crispin --- ...fd-bridge-Fix-format-string-position.patch | 32 +++++++++++++++++++ ...ray-newline-from-device-status-vlan-.patch | 27 ++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 package/network/config/netifd/patches/0002-netifd-bridge-Fix-format-string-position.patch create mode 100644 package/network/config/netifd/patches/0003-bridge-remove-stray-newline-from-device-status-vlan-.patch diff --git a/package/network/config/netifd/patches/0002-netifd-bridge-Fix-format-string-position.patch b/package/network/config/netifd/patches/0002-netifd-bridge-Fix-format-string-position.patch new file mode 100644 index 0000000000..421a5b1594 --- /dev/null +++ b/package/network/config/netifd/patches/0002-netifd-bridge-Fix-format-string-position.patch @@ -0,0 +1,32 @@ +From ed65a00adc751d102c2041a4a9a32df9dad52b9e Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens +Date: Sun, 12 Feb 2023 21:01:57 +0100 +Subject: [PATCH] netifd: bridge: Fix format string position + +This fixes the following compile error: +error: format not a string literal, argument types not checked [-Werror=format-nonliteral] + +blobmsg_printf() has the following signature: +int blobmsg_printf(struct blob_buf *buf, const char *name, const char *format, ...) + +Signed-off-by: Hauke Mehrtens +--- + bridge.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bridge.c b/bridge.c +index 7e61b9d..ae305e8 100644 +--- a/bridge.c ++++ b/bridge.c +@@ -934,7 +934,7 @@ bridge_dump_port(struct blob_buf *b, struct bridge_vlan_port *port) + bool tagged = !(port->flags & BRVLAN_F_UNTAGGED); + bool pvid = (port->flags & BRVLAN_F_PVID); + +- blobmsg_printf(b, "%s%s%s%s\n", port->ifname, ++ blobmsg_printf(b, NULL, "%s%s%s%s\n", port->ifname, + tagged || pvid ? ":" : "", + tagged ? "t" : "", + pvid ? "*" : ""); +-- +2.34.1 + diff --git a/package/network/config/netifd/patches/0003-bridge-remove-stray-newline-from-device-status-vlan-.patch b/package/network/config/netifd/patches/0003-bridge-remove-stray-newline-from-device-status-vlan-.patch new file mode 100644 index 0000000000..8586a00c32 --- /dev/null +++ b/package/network/config/netifd/patches/0003-bridge-remove-stray-newline-from-device-status-vlan-.patch @@ -0,0 +1,27 @@ +From fb1add3a991ef3aff54fcd87ee1185487f55f540 Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Thu, 4 May 2023 15:14:59 +0200 +Subject: [PATCH] bridge: remove stray newline from device status vlan port + list + +Signed-off-by: Felix Fietkau +--- + bridge.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bridge.c b/bridge.c +index ae305e8..02fd392 100644 +--- a/bridge.c ++++ b/bridge.c +@@ -934,7 +934,7 @@ bridge_dump_port(struct blob_buf *b, struct bridge_vlan_port *port) + bool tagged = !(port->flags & BRVLAN_F_UNTAGGED); + bool pvid = (port->flags & BRVLAN_F_PVID); + +- blobmsg_printf(b, NULL, "%s%s%s%s\n", port->ifname, ++ blobmsg_printf(b, NULL, "%s%s%s%s", port->ifname, + tagged || pvid ? ":" : "", + tagged ? "t" : "", + pvid ? "*" : ""); +-- +2.34.1 + -- 2.34.1