]> git.droids-corp.org - dpdk.git/blobdiff - examples/ip_pipeline/kni.c
examples/ipsec-secgw: limit inflight packets count
[dpdk.git] / examples / ip_pipeline / kni.c
index ed5f8942e21869e90b5268e369cfc1971a611833..7e5ff0543a35339bccdb4b85545ba744b8c23c81 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <rte_ethdev.h>
 #include <rte_bus_pci.h>
+#include <rte_string_fns.h>
 
 #include "kni.h"
 #include "mempool.h"
@@ -153,7 +154,7 @@ kni_create(const char *name, struct kni_params *params)
                return NULL;
 
        /* Node fill in */
-       strncpy(kni->name, name, sizeof(kni->name));
+       strlcpy(kni->name, name, sizeof(kni->name));
        kni->k = k;
 
        /* Node add to list */