Re: [PATCH RESEND] 2.6.22.6 networking [ipv4]: fix wrong destination when reply packetes

2007-09-21 Thread lepton
Now icmp_reply is only called by icmp_echo and icmp_timestamp ip_send_reply is only called by tcp_v4_send_reset and tcp_v4_send_ack I think in all situations the ip_hdr(skb)-saddr is set and should be the destination of reply packets. If using rt-rt_src as destination is correct in some

Re: [RFC PATCH] 2.6.22.6 netfilter: sk_setup_caps in ip_make_route_harder

2007-09-21 Thread lepton
to tell tcp stack the sk_route_caps of the real out device, we can just disable all things for safety. On Fri, Sep 21, 2007 at 02:39:58PM +0200, Patrick McHardy wrote: lepton wrote: Yes, you are right. What do you think about this: For all packets can be sent out, we just disable all

[PATCH RESEND] 2.6.22.6 networking [ipv4]: fix wrong destination when reply packetes

2007-09-20 Thread lepton
of rt-rt_src as destination to reply packetes is a more simple fix. Thanks Kenan Kalajdzic [EMAIL PROTECTED] for help me with more details about this problem. Signed-off-by: Lepton Wu [EMAIL PROTECTED] diff -X linux-2.6.22.6/Documentation/dontdiff -pru linux-2.6.22.6/net/ipv4/icmp.c linux

Re: [RFC PATCH] 2.6.22.6 netfilter: sk_setup_caps in ip_make_route_harder

2007-09-19 Thread lepton
Yes, you are right. What do you think about this: For all packets can be sent out, we just disable all things in sk_route_caps in ip_route_me_harder diff -X linux-2.6.22.6/Documentation/dontdiff -pru linux-2.6.22.6/net/ipv4/netfilter.c linux-2.6.22.6-lepton/net/ipv4/netfilter.c --- linux

[PATCH] 2.6.22.6 NETWORKING [IPV4]: Always use source addr in skb to reply packet

2007-09-17 Thread lepton
Hi, In some situation, icmp_reply and ip_send_reply will send out packet with the wrong source addr, the following patch will fix this. I don't understand why we must use rt-rt_src in the current code, if this is a wrong fix, please correct me. Signed-off-by: Lepton Wu [EMAIL PROTECTED

Re: [PATCH] 2.6.22.6 NETWORKING [IPV4]: Always use source addr in skb to reply packet

2007-09-17 Thread lepton
and destination addresses as required by the RFC. On Tue, Sep 18, 2007 at 11:26:44AM +0900, YOSHIFUJI Hideaki / [EMAIL PROTECTED](B wrote: In article [EMAIL PROTECTED] (at Mon, 17 Sep 2007 19:20:44 -0700 (PDT)), David Miller [EMAIL PROTECTED] says: From: lepton [EMAIL PROTECTED] Date: Tue, 18 Sep

Re: [PATCH] 2.6.22.6 NETWORKING [IPV4]: Always use source addr in skb to reply packet

2007-09-17 Thread lepton
Hi, sorry for my previous email. What I mean is icmp_reply and ip_send_reply in some situation will send out packets with wrong DESTINATION address. the source address is always correct. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL

Re: [PATCH] 2.6.22.6 NETWORKING [IPV4]: Always use source addr in skb to reply packet

2007-09-17 Thread lepton
. On Mon, Sep 17, 2007 at 08:14:56PM -0700, [EMAIL PROTECTED] wrote: On Tue, 18 Sep 2007, YOSHIFUJI Hideaki / [EMAIL PROTECTED](B wrote: In article [EMAIL PROTECTED] (at Mon, 17 Sep 2007 19:20:44 -0700 (PDT)), David Miller [EMAIL PROTECTED] says: From: lepton [EMAIL PROTECTED] Date: Tue, 18

why we use skb-rt-rt_src as dest address when replying packet?

2007-05-16 Thread lepton
I found in function [ip_send_reply] and [icmp_reply], we use such code to get the destination address of our packet: struct rtable *rt = (struct rtable *)skb-dst; .. daddr = ipc.addr = rt-rt_src; I have a question here: Is there any special reason for using rt-rt_src as destination address?