Commit 2d785e8d authored by Ondřej Zajíček's avatar Ondřej Zajíček

Fixes bug on TCP passive socket binding on BSD.

BGP on BSD was bound to random port. I am surprised that
nobody noticed it already.
parent 5004d02c
......@@ -934,7 +934,8 @@ sk_open(sock *s)
fill_in_sockaddr(&sa, s->saddr, port);
if (type == SK_IP && bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0)
if ((type != SK_UDP_MC) && (type != SK_IP_MC) &&
bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0)
if (bind(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment