Sending frames of size 1518 using raw sockets
I wrote an application that receives packets on one interface and sends them to another interface after it added a vlan header. Both the sending and the receiving is done using raw sockets.
Everything seems to work fine until I get TCP packets that are of size 1514 (MTU). Once I add a vlan header to the packet, its size becomes 1518 and when I try to send it I get the returned value -1 and errno=90 (message too long).
I tried to change the MTU of the NIC to a value that is bigger than 1500 but that fails.
If I create a bridge using brctl and vconfig between the NICs I can see that my NIC does sends packets of size 1518.
What do I need to in order to make my NIC to send packets of size 1518?
Thanks in advance,