xenvirt: fix build break on ethernet address parsing
authorNeil Horman <nhorman@tuxdriver.com>
Thu, 18 Dec 2014 11:31:56 +0000 (06:31 -0500)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 18 Dec 2014 21:52:39 +0000 (22:52 +0100)
Back in commit aaa662e75c23c61 ("cmdline: fix overflow on bsd"),
the author failed to fixup a call to cmdline_parse_etheraddr in xenvirt.
This patch makes the needed correction to avoid a build break.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_pmd_xenvirt/rte_eth_xenvirt.c

index 6555ec5..04e30c9 100644 (file)
@@ -586,8 +586,9 @@ rte_eth_xenvirt_parse_args(struct xenvirt_dict *dict,
                if (!strncmp(pair[0], RTE_ETH_XENVIRT_MAC_PARAM,
                                sizeof(RTE_ETH_XENVIRT_MAC_PARAM))) {
                        if (cmdline_parse_etheraddr(NULL,
-                                                       pair[1],
-                                                       &dict->addr) < 0) {
+                                                   pair[1],
+                                                   &dict->addr,
+                                                   sizeof(dict->addr)) < 0) {
                                RTE_LOG(ERR, PMD,
                                        "Invalid %s device ether address\n",
                                        name);