ipv4: route non-local sources for raw socket
authorJulian Anastasov <ja@ssi.bg>
Sun, 7 Aug 2011 09:16:09 +0000 (09:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Aug 2011 05:52:32 +0000 (22:52 -0700)
commit47670b767b1593433b516df7798df03f858278be
treee83c8590a639d251049a235c4165e49ce46a69de
parent797fd3913abf2f7036003ab8d3d019cbea41affd
ipv4: route non-local sources for raw socket

The raw sockets can provide source address for
routing but their privileges are not considered. We
can provide non-local source address, make sure the
FLOWI_FLAG_ANYSRC flag is set if socket has privileges
for this, i.e. based on hdrincl (IP_HDRINCL) and
transparent flags.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_sock.h
net/ipv4/raw.c