Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OF1.0 Make tests with ethertype 0x8922 optional #120

Open
msune opened this issue Mar 20, 2014 · 4 comments
Open

OF1.0 Make tests with ethertype 0x8922 optional #120

msune opened this issue Mar 20, 2014 · 4 comments

Comments

@msune
Copy link

msune commented Mar 20, 2014

Linux kernel as well as some ASICs reject 0x8922. IMHO these tests should be optional:

  • DirectVlanPackets: testPacket with 0x8922 eth_type values

(attached patch is not suggesting the deletion of such tests; it is only attached for the sake of easy location of the tests.

diff --git a/tests/pktact.py b/tests/pktact.py
index cceb13e..ed90aff 100644
--- a/tests/pktact.py
+++ b/tests/pktact.py
@@ -2649,16 +2649,6 @@ class DirectVlanPackets(DirectBadPacketBase):
             scapy.Ether(dst=eth_dst, src=eth_src, type=0x800) / scapy.IP(),
             self.RESULT_MATCH
         )
-        testPacket("Basic MAC matching - VMware beacon - no payload",
-            self.createMatch(eth_dst=parse_mac(eth_dst), eth_src=parse_mac(eth_src)),
-            scapy.Ether(dst=eth_dst, src=eth_src, type=0x8922),
-            self.RESULT_MATCH
-        )
-        testPacket("Basic MAC matching - VMware beacon - with payload",
-            self.createMatch(eth_dst=parse_mac(eth_dst), eth_src=parse_mac(eth_src)),
-            scapy.Ether(dst=eth_dst, src=eth_src, type=0x8922)/ ("X" * 1),
-            self.RESULT_MATCH
-        )
         testPacket("Basic MAC matching - IPv6 payload",
             self.createMatch(eth_dst=parse_mac(eth_dst), eth_src=parse_mac(eth_src)),
             scapy.Ether(dst=eth_dst, src=eth_src) / scapy.IPv6(),
@rlane
Copy link
Contributor

rlane commented Mar 21, 2014

Can you point me to the Linux code that drops these packets? I want to see a comment justifying the drop. This just seems like a bug in the switch.

@msune
Copy link
Author

msune commented Mar 21, 2014

PACKET_MMAP TX_RING will produce an error when trying to send an eth_type of 0x8922.

You can reproduce it via a modification on the example:
http://wiki.ipxwarzone.com/index.php5?title=Linux_packet_mmap

@rlane
Copy link
Contributor

rlane commented Mar 21, 2014

I grepped through the code and could not find a mention of this ethertype. The openvswitch kernel module handles it just fine. What errno does is return?

@msune
Copy link
Author

msune commented Mar 21, 2014

When calling sendto() on the TX ring: errno:22 (Invalid argument)

This only happens when ETH_TYPE 0x8922 packets are trying to be sent, but I guess would happen also with other strange ETH_TYPEs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants