From: "Arnaldo Carvalho de Melo" <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html