netfilter: have ip*t REJECT set the sock err when an icmp is to be sent
authorJP Abgrall <jpa@google.com>
Thu, 16 Jun 2011 21:37:03 +0000 (14:37 -0700)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 20:09:08 +0000 (12:09 -0800)
commitd1bb29d3bdf8437a24b73aece844f699417628e9
tree0d6428326c9e6b1ec04306963a645f4b5c7dd480
parent43826c197491ecc44cc0ea200a1cd4ffa7c8f80e
netfilter: have ip*t REJECT set the sock err when an icmp is to be sent

Allow the REJECT --reject-with icmp*blabla to also set the matching error
locally on the socket affected by the reject.
This allows the process to see an error almost as if it received it
via ICMP.
It avoids the local process who's ingress packet is rejected to have to
wait for a pseudo-eternity until some timeout kicks in.

Ideally, this should be enabled with a new iptables flag similar to
   --reject-with-sock-err
For now it is enabled with CONFIG_IP*_NF_TARGET_REJECT_SKERR option.

Change-Id: I649a4fd5940029ec0b3233e5abb205da6984891e
Signed-off-by: JP Abgrall <jpa@google.com>
net/ipv4/netfilter/Kconfig
net/ipv4/netfilter/ipt_REJECT.c
net/ipv6/netfilter/Kconfig
net/ipv6/netfilter/ip6t_REJECT.c