VLAN Frames RAW Socket
i try to sent a VLAN Frame with the help of a PF_Packet RAW Socket but if i write in the protocol field of the frame the ammount 0x8100, Linux remove the field and sent it without this 2 bytes. For example i capture this two frames with Wireshark.
If i write 0x8000 the frame send as i create it in the memory.
00 11 22 33 44 55 01 11 22 33 44 55 80 00 22 22 22 22 22 22
But i write 0x8100 the frame send without this 2 bytes
00 11 22 33 44 55 01 11 22 33 44 55 22 22 22 22 22 22
I thought with a RAW Socket i can send what i want.
I use the Linux Kernel 2.6.31 and include the VLAN Support Packet.
With best Regards
Originally Posted by soch0082
Did you find a solution for this? I am seeing the same problem on my system (Ubuntu 3.0.0-14-generic-pae). The odd thing is that when I ran my test applications (same binaries) on another system (Ubuntu 2.6.38-8-generic) everything looks correct and I get the 802.1q tagging from the raw socket.
In my case i note that linux on my embedded system sent the right frame. Wireshark displayed the frame without 2 bytes on a windows PC, on a other PC Wireshark display the right frame. So in my case not linux was the problem. Windows with Wireshark caused the problem.
I found out that when using recvmsg(...), I can get the vlan tagging from the auxdata. It's more complicated solution, but still a solution.
Is someone is interested, I can publish the code.
Hi Shlomo - I am facing similar issue. Instead of fixing the driver issue, i would like to fix my application. So can you please provide the code?
Originally Posted by shlomosh
Thanks in advance