From: Hangbin Liu <liuhangbin@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: Francesco Fondelli <francesco.fondelli@gmail.com>,
netdev@vger.kernel.org, Hangbin Liu <liuhangbin@gmail.com>
Subject: [PATCH net 3/3] pktgen: disable IPv6 when we want to use IPv4
Date: Thu, 15 May 2014 17:46:37 +0800 [thread overview]
Message-ID: <1400147197-22445-3-git-send-email-liuhangbin@gmail.com> (raw)
In-Reply-To: <1400147197-22445-1-git-send-email-liuhangbin@gmail.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
net/core/pktgen.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 1809bdf..fabd17e 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -1264,6 +1264,8 @@ static ssize_t pktgen_if_write(struct file *file,
if (len < 0)
return len;
+ pkt_dev->flags &= ~F_IPV6;
+
if (copy_from_user(buf, &user_buffer[i], len))
return -EFAULT;
buf[len] = 0;
@@ -1284,6 +1286,7 @@ static ssize_t pktgen_if_write(struct file *file,
if (len < 0)
return len;
+ pkt_dev->flags &= ~F_IPV6;
if (copy_from_user(buf, &user_buffer[i], len))
return -EFAULT;
@@ -1395,6 +1398,8 @@ static ssize_t pktgen_if_write(struct file *file,
if (len < 0)
return len;
+ pkt_dev->flags &= ~F_IPV6;
+
if (copy_from_user(buf, &user_buffer[i], len))
return -EFAULT;
buf[len] = 0;
@@ -1415,6 +1420,8 @@ static ssize_t pktgen_if_write(struct file *file,
if (len < 0)
return len;
+ pkt_dev->flags &= ~F_IPV6;
+
if (copy_from_user(buf, &user_buffer[i], len))
return -EFAULT;
buf[len] = 0;
--
1.8.1.4
prev parent reply other threads:[~2014-05-15 9:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-15 9:46 [PATCH net 1/3] pktgen: should not turn off vlan when we disable svlan Hangbin Liu
2014-05-15 9:46 ` [PATCH net 2/3] pktgen: give user result when disable vlan/svlan Hangbin Liu
2014-05-15 10:00 ` Daniel Borkmann
2014-05-15 11:05 ` Hangbin Liu
2014-05-15 14:12 ` Hangbin Liu
2014-05-15 9:46 ` Hangbin Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400147197-22445-3-git-send-email-liuhangbin@gmail.com \
--to=liuhangbin@gmail.com \
--cc=davem@davemloft.net \
--cc=francesco.fondelli@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).