[PATCH 2/3] buildtools/dpdk-cmdline-gen: fix IP address initializer
Bruce Richardson
bruce.richardson at intel.com
Tue Dec 5 15:51:08 CET 2023
The IP address type should be generic for both IPv4 and IPv6 and so use
the cmdline lib's TOKEN_IPADDR_INITIALIZER rather than
TOKEN_IPV4_INITIALIZER.
Fixes: 37666691e9ed ("buildtools: add a tool to generate cmdline boilerplate")
Cc: stable at dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
---
buildtools/dpdk-cmdline-gen.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/buildtools/dpdk-cmdline-gen.py b/buildtools/dpdk-cmdline-gen.py
index faee4ffca7..8b4f22ca24 100755
--- a/buildtools/dpdk-cmdline-gen.py
+++ b/buildtools/dpdk-cmdline-gen.py
@@ -79,7 +79,7 @@ def process_command(lineno, tokens, comment):
result_struct.append(f"\tcmdline_ipaddr_t {t_name};")
initializers.append(
f"static cmdline_parse_token_ipaddr_t cmd_{name}_{t_name}_tok =\n"
- f"\tTOKEN_IPV4_INITIALIZER(struct cmd_{name}_result, {t_name});"
+ f"\tTOKEN_IPADDR_INITIALIZER(struct cmd_{name}_result, {t_name});"
)
elif t_type.startswith("(") and t_type.endswith(")"):
result_struct.append(f"\tcmdline_fixed_string_t {t_name};")
--
2.40.1
More information about the stable
mailing list