Forward port of svn revision 548:
[svn] SF Bug Tracker [ 2995758 ] libupnp 1.6.6, wrong bind when reuseaddr is 1. Submitted: viallard anthony ( homer242 ) When trying to use reuseaddr option in miniserver/miniserver.c, there isn't a affectation of the port chosen (serverAddr.sin_port isn't receive listen_port variable value). git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@549 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
parent
71ec18a3a9
commit
54727b2a9e
@ -211,6 +211,14 @@ Version 1.8.0
|
|||||||
Version 1.6.7
|
Version 1.6.7
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
|
|
||||||
|
2010-05-07 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
|
SF Bug Tracker [ 2995758 ] libupnp 1.6.6, wrong bind when reuseaddr is
|
||||||
|
1.
|
||||||
|
Submitted: viallard anthony ( homer242 )
|
||||||
|
When trying to use reuseaddr option in miniserver/miniserver.c, there
|
||||||
|
isn't a affectation of the port chosen (serverAddr.sin_port isn't
|
||||||
|
receive listen_port variable value).
|
||||||
|
|
||||||
2010-04-25 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
|
2010-04-25 Marcelo Jimenez <mroberto(at)users.sourceforge.net>
|
||||||
Define PROTOTYPES to be one by default in global.h. This affects the
|
Define PROTOTYPES to be one by default in global.h. This affects the
|
||||||
RSA MD5 code.
|
RSA MD5 code.
|
||||||
|
1
THANKS
1
THANKS
@ -8,6 +8,7 @@ exempt of errors.
|
|||||||
|
|
||||||
- Alex (afaucher)
|
- Alex (afaucher)
|
||||||
- Andre Sodermans (wienerschnitzel)
|
- Andre Sodermans (wienerschnitzel)
|
||||||
|
- Anthony Viallard (homer242)
|
||||||
- Apostolos Syropoulos
|
- Apostolos Syropoulos
|
||||||
- Arno Willig
|
- Arno Willig
|
||||||
- Bob Ciora
|
- Bob Ciora
|
||||||
|
@ -625,8 +625,8 @@ static int get_miniserver_sockets(
|
|||||||
return UPNP_E_SOCKET_BIND;
|
return UPNP_E_SOCKET_BIND;
|
||||||
}
|
}
|
||||||
|
|
||||||
sockError = bind(listenfd4, (struct sockaddr *)&__ss_v4,
|
serverAddr4->sin_port = htons(listen_port4);
|
||||||
sizeof (__ss_v4));
|
sockError = bind(listenfd4, (struct sockaddr *)&__ss_v4, sizeof (__ss_v4));
|
||||||
if (sockError == -1) {
|
if (sockError == -1) {
|
||||||
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
||||||
UpnpPrintf( UPNP_INFO, MSERV, __FILE__, __LINE__,
|
UpnpPrintf( UPNP_INFO, MSERV, __FILE__, __LINE__,
|
||||||
@ -652,6 +652,7 @@ static int get_miniserver_sockets(
|
|||||||
return UPNP_E_SOCKET_BIND;
|
return UPNP_E_SOCKET_BIND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
serverAddr6->sin6_port = htons(listen_port6);
|
||||||
sockError = bind(listenfd6, (struct sockaddr *)&__ss_v6, sizeof (__ss_v6));
|
sockError = bind(listenfd6, (struct sockaddr *)&__ss_v6, sizeof (__ss_v6));
|
||||||
if (sockError == -1) {
|
if (sockError == -1) {
|
||||||
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
strerror_r(errno, errorBuffer, ERROR_BUFFER_LEN);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user