[Devel] Re: [PATCH 2/11 net-2.6.26] [DCCP]: Replace socket with sock for reset sending.

Denis V. Lunev den at openvz.org
Fri Mar 28 08:08:42 PDT 2008


On Fri, 2008-03-28 at 11:39 -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Mar 28, 2008 at 12:08:49PM +0300, Denis V. Lunev escreveu:
> > Replace dccp_v(4|6)_ctl_socket with sock to unify a code with TCP/ICMP.
> > 
> > Signed-off-by: Denis V. Lunev <den at openvz.org>
> > ---
> >  net/dccp/ipv4.c |   16 +++++++++-------
> >  net/dccp/ipv6.c |   10 ++++++----
> >  2 files changed, 15 insertions(+), 11 deletions(-)
> > 
> > diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
> > index 4ca8b0c..79a9a4a 100644
> > --- a/net/dccp/ipv4.c
> > +++ b/net/dccp/ipv4.c
> > @@ -36,7 +36,7 @@
> >   * the Out-of-the-blue (OOTB) packets. A control sock will be created
> >   * for this socket at the initialization time.
> >   */
> > -static struct socket *dccp_v4_ctl_socket;
> > +static struct sock *dccp_v4_ctl_sk;
> >  
> >  int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
> >  {
> > @@ -514,11 +514,11 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
> >  	if (rxskb->rtable->rt_type != RTN_LOCAL)
> >  		return;
> >  
> > -	dst = dccp_v4_route_skb(dccp_v4_ctl_socket->sk, rxskb);
> > +	dst = dccp_v4_route_skb(dccp_v4_ctl_sk, rxskb);
> >  	if (dst == NULL)
> >  		return;
> >  
> > -	skb = dccp_ctl_make_reset(dccp_v4_ctl_socket, rxskb);
> > +	skb = dccp_ctl_make_reset(dccp_v4_ctl_sk->sk_socket, rxskb);
> 
> Why not make dccp_ctl_make_reset receive a struct sock too? It only uses
> ctl->sk anyway. But I guess that can be on a follow-up patch, could you
> that?

sure!

Thank you for pointing this out :)

Regards,
	Den

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list