Skip to content

Commit

Permalink
[NETFILTER]: Check policy length in policy match strict mode
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Feb 5, 2006
1 parent ee4bb81 commit e55f1bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ match_policy_out(const struct sk_buff *skb, const struct ipt_policy_info *info)
return 0;
}

return strict ? 1 : 0;
return strict ? i == info->len : 0;
}

static int match(const struct sk_buff *skb,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/netfilter/ip6t_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ match_policy_out(const struct sk_buff *skb, const struct ip6t_policy_info *info)
return 0;
}

return strict ? 1 : 0;
return strict ? i == info->len : 0;
}

static int match(const struct sk_buff *skb,
Expand Down

0 comments on commit e55f1bc

Please sign in to comment.