diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-08-24 23:09:41 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 16:48:31 -0700 |
commit | 32c1da70810017a98aa6c431a5494a302b6b9a30 (patch) | |
tree | 8583fe356829dd0265c673798262453d4bc36869 /net/ipv4/udp_impl.h | |
parent | 356f89e12e301376f26795643f3b5931c81c9cd5 (diff) | |
download | linux-32c1da70810017a98aa6c431a5494a302b6b9a30.tar.bz2 |
[UDP]: Randomize port selection.
This patch causes UDP port allocation to be randomized like TCP.
The earlier code would always choose same port (ie first empty list).
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp_impl.h')
-rw-r--r-- | net/ipv4/udp_impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/udp_impl.h b/net/ipv4/udp_impl.h index 820a477cfaa6..6c55828e41ba 100644 --- a/net/ipv4/udp_impl.h +++ b/net/ipv4/udp_impl.h @@ -9,7 +9,7 @@ extern int __udp4_lib_rcv(struct sk_buff *, struct hlist_head [], int ); extern void __udp4_lib_err(struct sk_buff *, u32, struct hlist_head []); extern int __udp_lib_get_port(struct sock *sk, unsigned short snum, - struct hlist_head udptable[], int *port_rover, + struct hlist_head udptable[], int (*)(const struct sock*,const struct sock*)); extern int ipv4_rcv_saddr_equal(const struct sock *, const struct sock *); |