Re: [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for paged skbs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Miller
Date: Friday, December 31, 2010 - 1:45 pm

From: Stephen Hemminger <stephen.hemminger@vyatta.com>
Date: Thu, 30 Dec 2010 15:06:16 -0800


I still think we should be judicious and keep using skb_clone() here.

Simply combine the two pskb_may_pull() calls into one on "skb2" after
the clone and before the blind __skb_pull() call.  Then add a error
path "out:" called "out_nopush:" for the error path to goto.

Also, I think the "+ 1" in the ipv6 stack code comes from the fact that
the parsing loop can "peek" into the next header's byte to see the type.
And I really don't think it's relevant here.

Also, all of these "x_header + ... + 1 - skb->data" factors are
irrelevent and shouldn't be used.  Just pass "offset + sizeof(*icmp6h)"
to pskb_may_pull().

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for ..., Stephen Hemminger, (Thu Dec 30, 4:06 pm)
Re: [PATCH net-2.6] bridge: fix br_multicast_ipv6_rcv for ..., David Miller, (Fri Dec 31, 1:45 pm)