Should ICMP echo responses be 'bound to the interface' of the incoming ICMP echo request?
andrei radulescu-banu <[email protected]> Wed, 6 Apr 2011 09:36:24 -0700 (PDT)
| Newsgroups | gmane.linux.network.general |
|---|---|
| Message-ID | <[email protected]> |
Question about the icmp_reply() routine in linux/net/ipv4/icmp.c: The routine does not seem that the ICMP echo response goes out of the same interface where the ICMP echo request was received. Is that correct behavior? I've tried to modify the icmp_reply() in my sandbox (see attached) to force the icmp echo reply out of the same interface where the request was received, but I think there's something wrong with my modification, as it does not seem to work right. Or perhaps the modification is right, but skb->skb_iif is set wrong. Can anyone offer advice? Please cc any response to [email protected]. Thanks, Andrei diff -c -r1.2 icmp.c *** icmp.c 28 Oct 2010 18:48:00 -0000 1.2 --- icmp.c 5 Apr 2011 20:25:53 -0000 *************** *** 384,390 **** daddr = icmp_param->replyopts.faddr; } { ! struct flowi fl = { .nl_u = { .ip4_u = { .daddr = daddr, .saddr = rt->rt_spec_dst, .tos = RT_TOS(ip_hdr(skb)->tos) } }, --- 384,391 ---- daddr = icmp_param->replyopts.faddr; } { ! struct flowi fl = { .oif = skb->skb_iif, ! .nl_u = { .ip4_u = { .daddr = daddr, .saddr = rt->rt_spec_dst, .tos = RT_TOS(ip_hdr(skb)->tos) } }, -- To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html