ipv4: Use standard iovec primitive in raw_probe_proto_opt
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 7 Nov 2014 13:27:08 +0000 (21:27 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Nov 2014 19:25:35 +0000 (14:25 -0500)
commit32b5913a931fd753faf3d4e1124b2bc2edb364da
treee65937a86f9af8eeac60db99a8ad1720d312998a
parent1ef8019be8799c39f316a772ffdd705c46029752
ipv4: Use standard iovec primitive in raw_probe_proto_opt

The function raw_probe_proto_opt tries to extract the first two
bytes from the user input in order to seed the IPsec lookup for
ICMP packets.  In doing so it's processing iovec by hand and
overcomplicating things.

This patch replaces the manual iovec processing with a call to
memcpy_fromiovecend.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/raw.c