diff options
-rw-r--r-- | include/net/sock.h | 4 | ||||
-rw-r--r-- | net/core/sock.c | 4 | ||||
-rw-r--r-- | net/ipv4/udp.c | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index e02be37a3d91..ad23e80cb8d3 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1575,7 +1575,11 @@ void sock_wfree(struct sk_buff *skb); | |||
1575 | void skb_orphan_partial(struct sk_buff *skb); | 1575 | void skb_orphan_partial(struct sk_buff *skb); |
1576 | void sock_rfree(struct sk_buff *skb); | 1576 | void sock_rfree(struct sk_buff *skb); |
1577 | void sock_efree(struct sk_buff *skb); | 1577 | void sock_efree(struct sk_buff *skb); |
1578 | #ifdef CONFIG_INET | ||
1578 | void sock_edemux(struct sk_buff *skb); | 1579 | void sock_edemux(struct sk_buff *skb); |
1580 | #else | ||
1581 | #define sock_edemux(skb) sock_efree(skb) | ||
1582 | #endif | ||
1579 | 1583 | ||
1580 | int sock_setsockopt(struct socket *sock, int level, int op, | 1584 | int sock_setsockopt(struct socket *sock, int level, int op, |
1581 | char __user *optval, unsigned int optlen); | 1585 | char __user *optval, unsigned int optlen); |
diff --git a/net/core/sock.c b/net/core/sock.c index d04005c51724..69592cb66e3b 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1643,18 +1643,18 @@ void sock_efree(struct sk_buff *skb) | |||
1643 | } | 1643 | } |
1644 | EXPORT_SYMBOL(sock_efree); | 1644 | EXPORT_SYMBOL(sock_efree); |
1645 | 1645 | ||
1646 | #ifdef CONFIG_INET | ||
1646 | void sock_edemux(struct sk_buff *skb) | 1647 | void sock_edemux(struct sk_buff *skb) |
1647 | { | 1648 | { |
1648 | struct sock *sk = skb->sk; | 1649 | struct sock *sk = skb->sk; |
1649 | 1650 | ||
1650 | #ifdef CONFIG_INET | ||
1651 | if (sk->sk_state == TCP_TIME_WAIT) | 1651 | if (sk->sk_state == TCP_TIME_WAIT) |
1652 | inet_twsk_put(inet_twsk(sk)); | 1652 | inet_twsk_put(inet_twsk(sk)); |
1653 | else | 1653 | else |
1654 | #endif | ||
1655 | sock_put(sk); | 1654 | sock_put(sk); |
1656 | } | 1655 | } |
1657 | EXPORT_SYMBOL(sock_edemux); | 1656 | EXPORT_SYMBOL(sock_edemux); |
1657 | #endif | ||
1658 | 1658 | ||
1659 | kuid_t sock_i_uid(struct sock *sk) | 1659 | kuid_t sock_i_uid(struct sock *sk) |
1660 | { | 1660 | { |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 0da3849fd35b..cd0db5471bb5 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1972,7 +1972,7 @@ void udp_v4_early_demux(struct sk_buff *skb) | |||
1972 | return; | 1972 | return; |
1973 | 1973 | ||
1974 | skb->sk = sk; | 1974 | skb->sk = sk; |
1975 | skb->destructor = sock_edemux; | 1975 | skb->destructor = sock_efree; |
1976 | dst = sk->sk_rx_dst; | 1976 | dst = sk->sk_rx_dst; |
1977 | 1977 | ||
1978 | if (dst) | 1978 | if (dst) |