[PATCH v2] Fix ERROR:do not initialise statics to 0 in af_vsock.c

2019-01-10 Thread Lepton Wu
Found by scripts/checkpatch.pl Signed-off-by: Lepton Wu --- net/vmw_vsock/af_vsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 43a1dec08825..a60df252d3cc 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock

[PATCH] Fix ERROR:do not initialise statics to 0 in af_vsock.c

2019-01-09 Thread Lepton Wu
Found by scripts/checkpatch.pl --- net/vmw_vsock/af_vsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c index 43a1dec08825..a60df252d3cc 100644 --- a/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c @@ -505,7 +505,7

[PATCH v2] VSOCK: bind to random port for VMADDR_PORT_ANY

2018-12-11 Thread Lepton Wu
packets could hit that orphaned vsock. We could also fix this by doing more in vhost_vsock_reset_orphans, but any way, it should be better to start from a random local port instead of a fixed one. Signed-off-by: Lepton Wu --- net/vmw_vsock/af_vsock.c | 7 ++- 1 file changed, 6 insertions(+), 1

[PATCH] VSOCK: bind to random port for VMADDR_PORT_ANY

2018-12-10 Thread Lepton Wu
packets could hit that orphaned vsock. We could also fix this by doing more in vhost_vsock_reset_orphans, but any way, it should be better to start from a random local port instead of a fixed one. Signed-off-by: Lepton Wu --- net/vmw_vsock/af_vsock.c | 6 +- 1 file changed, 5 insertions(+), 1

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

2007-09-21 Thread lepton
a way 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

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

2007-09-20 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 situati

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

2007-09-20 Thread lepton
loopback device. But I think just to use ip_hdr(skb)->saddr instead 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]>

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

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

2007-09-17 Thread lepton
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: > >

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 PRO

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

2007-09-17 Thread lepton
ply to 10.10.10.1 instead of simply reversing the source 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

[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

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