Wednesday, February 15, 2017

Linux tap interface not forwarding ip fragmentations

Leave a Comment

I have 4 tap interfaces, tap0 and tap1 is connected and so is tap2 and tap3

vde_switch -d -tap tap0 -tap tap1 click vde_switch -d -tap tap2 -tap tap3 --sock /run/vde.ctl/ctl2 

I then assigned ip for tap1 and tap2

ip addr add 1.1.1.1/24 dev tap1 ip addr add 1.2.1.1/24 dev tap2 

From raw socket application, I sent a udp packet from tap0 with source ip 1.1.1.3 and destination ip 1.2.1.3 and it arrived at tap3 (according to wireshark).

The problem is, if I send fragmented ip/udp packet, Linux doesn't forward it to tap3.

I checked the fragmented ip packet (first segment), its checksum and destination mac addr are all right. The funny thing is, if I remove the "more fragment" bit in ip header (ip checksum will change), then it got forwarded.

By the way, I am using Linux 3.19.0-65 on 64bit laptop.

Any idea why? Thanks a lot!

EDIT1

Here is the output of ip route list

default via 10.0.0.1 dev wlan0  proto static  1.1.1.0/24 dev tap1  proto kernel  scope link  src 1.1.1.1  1.2.1.0/24 dev tap2  proto kernel  scope link  src 1.2.1.1  10.0.0.0/24 dev wlan0  proto kernel  scope link  src 10.0.0.3  metric 9  172.16.83.0/24 dev vmnet1  proto kernel  scope link  src 172.16.83.1  172.17.0.0/16 dev docker0  proto kernel  scope link  src 172.17.0.1  192.168.181.0/24 dev vmnet8  proto kernel  scope link  src 192.168.181.1 

Edit2

Here is the link to the pcap of the IP fragment packet, captured on tap0 interface.

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment