Revert "netfilter: have ip*t REJECT set the sock err when an icmp is to be sent"

This reverts commit 6f489c42a9.

Bug: 28719525
Change-Id: I77707cc93b3c5f0339e6bce36734027586c639d3
Git-commit: 4f73004629821af9c179be63c2b34c6b951bcd18
Git-repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
This commit is contained in:
Erik Kline 2016-06-01 16:16:10 +09:00 committed by syphyr
parent d05603a11f
commit f5d1bea22e
4 changed files with 0 additions and 41 deletions

View File

@ -111,18 +111,6 @@ config IP_NF_TARGET_REJECT
To compile it as a module, choose M here. If unsure, say N.
config IP_NF_TARGET_REJECT_SKERR
bool "Force socket error when rejecting with icmp*"
depends on IP_NF_TARGET_REJECT
default n
help
This option enables turning a "--reject-with icmp*" into a matching
socket error also.
The REJECT target normally allows sending an ICMP message. But it
leaves the local socket unaware of any ingress rejects.
If unsure, say N.
config IP_NF_TARGET_ULOG
tristate "ULOG target support"
default m if NETFILTER_ADVANCED=n

View File

@ -129,14 +129,6 @@ static void send_reset(struct sk_buff *oldskb, int hook)
static inline void send_unreach(struct sk_buff *skb_in, int code)
{
icmp_send(skb_in, ICMP_DEST_UNREACH, code, 0);
#ifdef CONFIG_IP_NF_TARGET_REJECT_SKERR
if (skb_in->sk) {
skb_in->sk->sk_err = icmp_err_convert[code].errno;
skb_in->sk->sk_error_report(skb_in->sk);
pr_debug("ipt_REJECT: sk_err=%d for skb=%p sk=%p\n",
skb_in->sk->sk_err, skb_in, skb_in->sk);
}
#endif
}
static unsigned int

View File

@ -154,18 +154,6 @@ config IP6_NF_TARGET_REJECT
To compile it as a module, choose M here. If unsure, say N.
config IP6_NF_TARGET_REJECT_SKERR
bool "Force socket error when rejecting with icmp*"
depends on IP6_NF_TARGET_REJECT
default n
help
This option enables turning a "--reject-with icmp*" into a matching
socket error also.
The REJECT target normally allows sending an ICMP message. But it
leaves the local socket unaware of any ingress rejects.
If unsure, say N.
config IP6_NF_MANGLE
tristate "Packet mangling"
default m if NETFILTER_ADVANCED=n

View File

@ -180,15 +180,6 @@ send_unreach(struct net *net, struct sk_buff *skb_in, unsigned char code,
skb_in->dev = net->loopback_dev;
icmpv6_send(skb_in, ICMPV6_DEST_UNREACH, code, 0);
#ifdef CONFIG_IP6_NF_TARGET_REJECT_SKERR
if (skb_in->sk) {
icmpv6_err_convert(ICMPV6_DEST_UNREACH, code,
&skb_in->sk->sk_err);
skb_in->sk->sk_error_report(skb_in->sk);
pr_debug("ip6t_REJECT: sk_err=%d for skb=%p sk=%p\n",
skb_in->sk->sk_err, skb_in, skb_in->sk);
}
#endif
}
static unsigned int