RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 740653 - Bug in virtio_net at NF_INET_PRE_ROUTING
Summary: Bug in virtio_net at NF_INET_PRE_ROUTING
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Michael S. Tsirkin
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-22 20:20 UTC by cristea
Modified: 2013-01-10 00:22 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-27 10:00:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
kernel module that dumps IP packets at NF_INET_PRE_ROUTING hook (3.63 KB, application/x-gzip)
2011-09-22 20:20 UTC, cristea
no flags Details

Description cristea 2011-09-22 20:20:31 UTC
Created attachment 524467 [details]
kernel module that dumps IP packets at NF_INET_PRE_ROUTING hook

Description of problem:
Packets captured in NF_INET_PRE_ROUTING, or NF_INET_LOCAL_INPUT hook over a virtio NIC shows rubbish starting at offset 0x80 from raw-Ethernet.

Version-Release number of selected component (if applicable):

QEMU emulator version 0.14.1 (qemu-kvm-0.14.1) in host.
centos6.0 (kernel 2.6.32-71.29.1.el6.x86_64) in VM
and 
scientific-linux-6.1 (kernel 2.6.32-131.12.1.el6.x86_64) in VM

How reproducible:

To show this, I made a simple kernel module with netfilter hook for nfho.hooknum  = NF_INET_PRE_ROUTING; - runned it and tested with pings (dump the ping packet). You can download the sources of this module here: http://dl.free.fr/gXETj3izM (or attached to this report)

Steps to Reproduce:
1.Use a VM running centos6 (or sl-6.1) with the latest kernel. Have 2 NICs types: e1000 and virtio.
2. Take the attached module and compile it (run ./build.sh) => get mymodule.ko
3. insmod the compiled kernel module (./reload.sh) => see mymodule in lsmod
4. from another host, ping each of the NIC of the VM that has mymodule running using: ping x.x.x.x -p AA -s 1000 (filled with 0xAA 1000bytes).
  
Actual results:

When pinging the virtio NIC:

Dump ICMP packet, size of: 1028
45 00 04 04 00 00 40 00  40 01 bf 07 c0 a8 7b 01    E.....@.@.....{.
c0 a8 7b 9f 08 00 f9 ce  69 8a 00 05 d2 b1 5b 4e    ..{.....i.....[N
00 00 00 00 5d a1 09 00  00 00 00 00 aa aa aa aa    ....]...........
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
01 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00    ................
00 00 01 c0 0c 00 10 00  00 00 00 00 00 00 00 00    ................
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
60 86 c3 00 00 ea ff ff  aa 00 00 00 74 03 00 00    `...........t...
00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00    ................
00 76 61 68 69 2e 63 6f  00 00 00 00 00 00 00 00    .vahi

Expected results:

When pinging the e1000 NIC:

Dump ICMP packet, size of: 1028
45 00 04 04 00 00 40 00  40 01 0b 0d xx xx xx xx    E.....@.@....d..
yy yy yy yy 08 00 73 10  c1 7e 00 1c 83 b1 5b 4e    .d....s.......[N
00 00 00 00 d8 54 0c 00  00 00 00 00 aa aa aa aa    .....T..........
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    ................
aa aa aa aa aa aa aa aa  aa aa aa aa aa aa aa aa    .....


Additional info:
This problem didn't occur with older kernels (2.6.18-centos, or vanilla 2.6.25)!

Comment 2 Dor Laor 2011-09-27 10:00:17 UTC
This is not the place to report centos issues and the above versions are too old in respect to rhel6 series.

Comment 3 cristea 2011-09-27 11:07:11 UTC
(In reply to comment #2)
> This is not the place to report centos issues and the above versions are too
> old in respect to rhel6 series.

Unfortunately, it's not a CentOS issue: it's about virtio and latest linux kernels. Besides Centos and ScientificLinux, I tried it also on the latest Debian and ubuntu - same problems. Just try the code I posted in your favorite linux - and you'll see the problem.

Kind regards,
Mihai

Comment 4 Dor Laor 2011-10-02 14:19:03 UTC
Michael, can you please check if we like to fixed it?


Note You need to log in before you can comment on or make changes to this bug.