git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c69f5e0
)
net/tap: use strlcpy for interface name
author
Stephen Hemminger
<stephen@networkplumber.org>
Fri, 11 Jan 2019 20:35:14 +0000
(12:35 -0800)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Mon, 14 Jan 2019 16:44:29 +0000
(17:44 +0100)
snprintf is not needed here, use strlcpy instead.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by Keith Wiles <keith.wiles@intel.com>
drivers/net/tap/rte_eth_tap.c
patch
|
blob
|
history
diff --git
a/drivers/net/tap/rte_eth_tap.c
b/drivers/net/tap/rte_eth_tap.c
index
0ec030b
..
1c00681
100644
(file)
--- a/
drivers/net/tap/rte_eth_tap.c
+++ b/
drivers/net/tap/rte_eth_tap.c
@@
-148,7
+148,7
@@
tun_alloc(struct pmd_internals *pmd, int is_keepalive)
*/
ifr.ifr_flags = (pmd->type == ETH_TUNTAP_TYPE_TAP) ?
IFF_TAP : IFF_TUN | IFF_POINTOPOINT;
- s
nprintf(ifr.ifr_name, IFNAMSIZ, "%s", pmd->name
);
+ s
trlcpy(ifr.ifr_name, pmd->name, IFNAMSIZ
);
TAP_LOG(DEBUG, "ifr_name '%s'", ifr.ifr_name);