On Sat, Feb 5, 2011 at 1:50 PM, Alexander Bluhm <alexander.bl...@gmx.net> wrote: > I think there is a missing check and fallthrough in the icmp case. > > The logic should be > > if (proto == tcp) { > } else if (proto == udp) { > } else if (proto == icmp && af == inet) { > } else if (proto == icmp6 && af == inet6) { > } else { > } > > The current code would do icmp processing for an ipv6 packet with > protocol 1. Such a packet is strange but it should not get special > translation treatment. > > bluhm > >
we can check if "af == inet" in icmp case obviously, but how and why can we end up with af == inet6 and an icmp payload (or af == inet and icmp6 payload for that matter)?