lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 18 Jul 2007 02:18:14 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	acme@...stprotocols.net
Cc:	joakim.koskela@...t.fi, netdev@...r.kernel.org
Subject: Re: [PATCH net-2.6.22-rc7] xfrm beet interfamily support

From: "Arnaldo Carvalho de Melo" <acme@...stprotocols.net>
Date: Mon, 16 Jul 2007 09:56:59 -0300

> Sorry for not commented that the code you were using (and David said
> it was invalid) is in fact valid:
> 
>             skb->transport_header = skb->network_header;
> 
> This works for both offsets and pointers, i.e. both transport_header
> and network_header are in the same "address space".
> 
> 
>              skb_set_transport_header(skb, skb_network_offset(skb));
> 
> Also works, but its too convoluted IMHO, for pointers it would reduce to:
> 
>               skb->transport_header = skb->data + skb->network_header
> - skb->data;
> 
> for offsets:
> 
>               skb->transport_header = skb->data - skb->head;
>               skb->transport_header += skb->head + skb->network_header
> - skb->data;
> 
> I.e. both reduce to:
> 
>                skb->transport_header = skb->network_header;
> 
> Some more comments below, but I think this time, sans the above
> possible cleanup, your patch is OK wrt offsets/pointers.

Thanks for the correction, indeed you are correct :)
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ