]> 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)
commit8512f2055b7c17f7fd864315c6de8a8a2f6ae6a2
treee83c8590a639d251049a235c4165e49ce46a69de
parent5366946f82f207ec811ce610f1dd1f752ae52462
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