mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 16:41:25 +00:00
[NETFILTER]: fix ebtable targets return
The function ebt_do_table doesn't take NF_DROP as a verdict from the targets. Signed-off-by: Joonwoo Park <joonwpark81@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
34cc7ba639
commit
1b04ab4597
3 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ static int ebt_target_dnat(struct sk_buff *skb, unsigned int hooknr,
|
||||||
const struct ebt_nat_info *info = data;
|
const struct ebt_nat_info *info = data;
|
||||||
|
|
||||||
if (!skb_make_writable(skb, 0))
|
if (!skb_make_writable(skb, 0))
|
||||||
return NF_DROP;
|
return EBT_DROP;
|
||||||
|
|
||||||
memcpy(eth_hdr(skb)->h_dest, info->mac, ETH_ALEN);
|
memcpy(eth_hdr(skb)->h_dest, info->mac, ETH_ALEN);
|
||||||
return info->target;
|
return info->target;
|
||||||
|
|
|
@ -22,7 +22,7 @@ static int ebt_target_redirect(struct sk_buff *skb, unsigned int hooknr,
|
||||||
const struct ebt_redirect_info *info = data;
|
const struct ebt_redirect_info *info = data;
|
||||||
|
|
||||||
if (!skb_make_writable(skb, 0))
|
if (!skb_make_writable(skb, 0))
|
||||||
return NF_DROP;
|
return EBT_DROP;
|
||||||
|
|
||||||
if (hooknr != NF_BR_BROUTING)
|
if (hooknr != NF_BR_BROUTING)
|
||||||
memcpy(eth_hdr(skb)->h_dest,
|
memcpy(eth_hdr(skb)->h_dest,
|
||||||
|
|
|
@ -23,7 +23,7 @@ static int ebt_target_snat(struct sk_buff *skb, unsigned int hooknr,
|
||||||
const struct ebt_nat_info *info = data;
|
const struct ebt_nat_info *info = data;
|
||||||
|
|
||||||
if (!skb_make_writable(skb, 0))
|
if (!skb_make_writable(skb, 0))
|
||||||
return NF_DROP;
|
return EBT_DROP;
|
||||||
|
|
||||||
memcpy(eth_hdr(skb)->h_source, info->mac, ETH_ALEN);
|
memcpy(eth_hdr(skb)->h_source, info->mac, ETH_ALEN);
|
||||||
if (!(info->target & NAT_ARP_BIT) &&
|
if (!(info->target & NAT_ARP_BIT) &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue