diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/pktgen.c | 9 | ||||
-rw-r--r-- | net/core/skbuff.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 797769551b9..2201e699ad6 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1790,10 +1790,13 @@ static ssize_t pktgen_thread_write(struct file *file, return -EFAULT; i += len; mutex_lock(&pktgen_thread_lock); - pktgen_add_device(t, f); + ret = pktgen_add_device(t, f); mutex_unlock(&pktgen_thread_lock); - ret = count; - sprintf(pg_result, "OK: add_device=%s", f); + if (!ret) { + ret = count; + sprintf(pg_result, "OK: add_device=%s", f); + } else + sprintf(pg_result, "ERROR: can not add device %s", f); goto out; } diff --git a/net/core/skbuff.c b/net/core/skbuff.c index bddc1dd2e7f..55f7ef6ada6 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -686,7 +686,7 @@ static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old) new->network_header = old->network_header; new->mac_header = old->mac_header; new->inner_transport_header = old->inner_transport_header; - new->inner_network_header = old->inner_transport_header; + new->inner_network_header = old->inner_network_header; skb_dst_copy(new, old); new->rxhash = old->rxhash; new->ooo_okay = old->ooo_okay; |