diff options
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index de5a41de191a..b189278c7bc1 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c | |||
@@ -78,11 +78,9 @@ EXPORT_SYMBOL_GPL(inet_csk_bind_conflict); | |||
78 | /* Obtain a reference to a local port for the given sock, | 78 | /* Obtain a reference to a local port for the given sock, |
79 | * if snum is zero it means select any available local port. | 79 | * if snum is zero it means select any available local port. |
80 | */ | 80 | */ |
81 | int inet_csk_get_port(struct inet_hashinfo *hashinfo, | 81 | int inet_csk_get_port(struct sock *sk, unsigned short snum) |
82 | struct sock *sk, unsigned short snum, | ||
83 | int (*bind_conflict)(const struct sock *sk, | ||
84 | const struct inet_bind_bucket *tb)) | ||
85 | { | 82 | { |
83 | struct inet_hashinfo *hashinfo = sk->sk_prot->hashinfo; | ||
86 | struct inet_bind_hashbucket *head; | 84 | struct inet_bind_hashbucket *head; |
87 | struct hlist_node *node; | 85 | struct hlist_node *node; |
88 | struct inet_bind_bucket *tb; | 86 | struct inet_bind_bucket *tb; |
@@ -142,7 +140,7 @@ tb_found: | |||
142 | goto success; | 140 | goto success; |
143 | } else { | 141 | } else { |
144 | ret = 1; | 142 | ret = 1; |
145 | if (bind_conflict(sk, tb)) | 143 | if (inet_csk(sk)->icsk_af_ops->bind_conflict(sk, tb)) |
146 | goto fail_unlock; | 144 | goto fail_unlock; |
147 | } | 145 | } |
148 | } | 146 | } |