a question on ipip encapsulation
hi,
I want to implement ipip encapsulation .
I use skb_push for a new ip header at NF_IP_POST_ROUTING, and use skb_pull at NF_IP_PRE_ROUTING. I could ping well, but when I use ftp, it will not work, just like stop.
I want to know why ftp could not work as ping after ipip encapsulation.should I modify any sk_buff member for ftp? thanks very much!
Quoted 1 line · ????
I want to implement ipip encapsulation .
Why? There already is an implementation in the base network stack, and it should work fine together with iptables.
Quoted 2 lines
I use
skb_pushfor a new ip header atNF_IP_POST_ROUTING, and useskb_pullatNF_IP_PRE_ROUTING. I could ping well, but when I use ftp, it will not work, just like stop.
With the ipip implementation in the kernel, you have an explicit network device, which has an MTU setting, which is observed by the base network stack. If you did nothing of that sort, that will be your problem. A ping with large data size, should also give you a problem.
ALWAYS test with all realistic packet sizes, when modifying packet processors, especially if you modify the length of the packets.
best regards
Patrick