net: core: introduce skb_probe_transport_header()
authorJason Wang <jasowang@redhat.com>
Tue, 26 Mar 2013 23:11:21 +0000 (23:11 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Mar 2013 16:48:31 +0000 (12:48 -0400)
commit5203cd28db6dc05c3618a602cf4cf81203d00257
tree062761308de223744f78111cbbd2ab37772a03d4
parente5d5decaedf41f5b03e6819789cc3ba8744d9f54
net: core: introduce skb_probe_transport_header()

Sometimes, we need probe and set the transport header for packets (e.g from
untrusted source). This patch introduces a new helper
skb_probe_transport_header() which tries to probe and set the l4 header through
skb_flow_dissect(), if not just set the transport header to the hint passed by
caller.

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h