Anyone know what function or file in linux holds the algorithm that finds a random port to use for the bind() system call? I'm hunting all over and cannot find the method that contains this algorithm in the Linux source.
Thanks!
Anyone know what function or file in linux holds the algorithm that finds a random port to use for the bind() system call? I'm hunting all over and cannot find the method that contains this algorithm in the Linux source.
Thanks!
Is this what you are looking for?
u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport);