[Devel] Re: [PATCH 1/1] skb->tail can be offset

Oren Laadan orenl at cs.columbia.edu
Tue Feb 16 02:02:13 PST 2010


Nice catch -- applied.

Serge E. Hallyn wrote:
> Needed for socket c/r on 64-bit arches.
> 
> Signed-off-by: Serge E. Hallyn <serue at us.ibm.com>
> ---
>  net/checkpoint.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/checkpoint.c b/net/checkpoint.c
> index c6b6341..ee13050 100644
> --- a/net/checkpoint.c
> +++ b/net/checkpoint.c
> @@ -97,19 +97,19 @@ static void sock_record_header_info(struct sk_buff *skb,
>  	h->mac_len = skb->mac_len;
>  	h->skb_len = skb->len;
>  	h->hdr_len = skb->data - skb->head;
> -	h->lin_len = ((unsigned long)skb->tail - (unsigned long)skb->head);
>  	h->frg_len = skb->data_len;
> -
>  	h->data_offset = (skb->data - skb->head);
>  
>  #ifdef NET_SKBUFF_DATA_USES_OFFSET
>  	h->transport_header = skb->transport_header;
>  	h->network_header = skb->network_header;
>  	h->mac_header = skb->mac_header;
> +	h->lin_len = (unsigned long) skb->tail;
>  #else
>  	h->transport_header = skb->transport_header - skb->head;
>  	h->network_header = skb->network_header - skb->head;
>  	h->mac_header = skb->mac_header - skb->head;
> +	h->lin_len = ((unsigned long) skb->tail - (unsigned long) skb->head);
>  #endif
>  
>  	memcpy(h->cb, skb->cb, sizeof(skb->cb));
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list