Skip to content

Commit

Permalink
ipv4: Push struct net down into nf_send_reset
Browse files Browse the repository at this point in the history
This is needed so struct net can be pushed down into
ip_route_me_harder.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Eric W. Biederman authored and Pablo Neira Ayuso committed Sep 29, 2015
1 parent c345602 commit 372892e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/net/netfilter/ipv4/nf_reject.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <net/icmp.h>

void nf_send_unreach(struct sk_buff *skb_in, int code, int hook);
void nf_send_reset(struct sk_buff *oldskb, int hook);
void nf_send_reset(struct net *net, struct sk_buff *oldskb, int hook);

const struct tcphdr *nf_reject_ip_tcphdr_get(struct sk_buff *oldskb,
struct tcphdr *_oth, int hook);
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_REJECT.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ reject_tg(struct sk_buff *skb, const struct xt_action_param *par)
nf_send_unreach(skb, ICMP_PKT_FILTERED, hook);
break;
case IPT_TCP_RESET:
nf_send_reset(skb, hook);
nf_send_reset(par->net, skb, hook);
case IPT_ICMP_ECHOREPLY:
/* Doesn't happen. */
break;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/nf_reject_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void nf_reject_ip_tcphdr_put(struct sk_buff *nskb, const struct sk_buff *oldskb,
EXPORT_SYMBOL_GPL(nf_reject_ip_tcphdr_put);

/* Send RST reply */
void nf_send_reset(struct sk_buff *oldskb, int hook)
void nf_send_reset(struct net *net, struct sk_buff *oldskb, int hook)
{
struct sk_buff *nskb;
const struct iphdr *oiph;
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/nft_reject_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static void nft_reject_ipv4_eval(const struct nft_expr *expr,
nf_send_unreach(pkt->skb, priv->icmp_code, pkt->hook);
break;
case NFT_REJECT_TCP_RST:
nf_send_reset(pkt->skb, pkt->hook);
nf_send_reset(pkt->net, pkt->skb, pkt->hook);
break;
default:
break;
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/nft_reject_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static void nft_reject_inet_eval(const struct nft_expr *expr,
pkt->hook);
break;
case NFT_REJECT_TCP_RST:
nf_send_reset(pkt->skb, pkt->hook);
nf_send_reset(pkt->net, pkt->skb, pkt->hook);
break;
case NFT_REJECT_ICMPX_UNREACH:
nf_send_unreach(pkt->skb,
Expand Down

0 comments on commit 372892e

Please sign in to comment.