diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-19 16:42:37 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-19 16:42:37 -0800 |
commit | ece639caa33c85c8805fa4a0a5955b8de9c95346 (patch) | |
tree | 5b8d613601c2e01e876a7d241923e90a0e759c3b /net/netfilter/xt_socket.c | |
parent | Merge branch 'rtc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip (diff) | |
parent | netfilter: ip6t_LOG: fix a flaw in printing the MAC (diff) | |
download | linux-dev-ece639caa33c85c8805fa4a0a5955b8de9c95346.tar.xz linux-dev-ece639caa33c85c8805fa4a0a5955b8de9c95346.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
Diffstat (limited to 'net/netfilter/xt_socket.c')
-rw-r--r-- | net/netfilter/xt_socket.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/netfilter/xt_socket.c b/net/netfilter/xt_socket.c index 00d6ae838303..9cc46356b577 100644 --- a/net/netfilter/xt_socket.c +++ b/net/netfilter/xt_socket.c @@ -35,6 +35,15 @@ #include <net/netfilter/nf_conntrack.h> #endif +static void +xt_socket_put_sk(struct sock *sk) +{ + if (sk->sk_state == TCP_TIME_WAIT) + inet_twsk_put(inet_twsk(sk)); + else + sock_put(sk); +} + static int extract_icmp4_fields(const struct sk_buff *skb, u8 *protocol, @@ -164,7 +173,7 @@ socket_match(const struct sk_buff *skb, struct xt_action_param *par, (sk->sk_state == TCP_TIME_WAIT && inet_twsk(sk)->tw_transparent)); - nf_tproxy_put_sock(sk); + xt_socket_put_sk(sk); if (wildcard || !transparent) sk = NULL; @@ -298,7 +307,7 @@ socket_mt6_v1(const struct sk_buff *skb, struct xt_action_param *par) (sk->sk_state == TCP_TIME_WAIT && inet_twsk(sk)->tw_transparent)); - nf_tproxy_put_sock(sk); + xt_socket_put_sk(sk); if (wildcard || !transparent) sk = NULL; |