]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9a7e168657a297fcb012b052f4738c693b464e9b
treee83c8590a639d251049a235c4165e49ce46a69de
parent5a156489308b7ae3372a2988ccdb8d440316c2eb
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