diff --git a/changes.txt b/changes.txt index 0084ba0..1b6e794 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,8 @@ Version XXX: Bugfix: Allow address reuse when only the binding socket has SO_REUSEADDR. + + Bugfix: Initialise the ptype of IPX sockets created with a nonzero + protocol value correctly. Version 0.4.1: Feature: Added workaround for point-to-point links. diff --git a/src/winsock.c b/src/winsock.c index c3968d2..d6232c9 100644 --- a/src/winsock.c +++ b/src/winsock.c @@ -178,7 +178,7 @@ SOCKET WSAAPI socket(int af, int type, int protocol) } nsock->flags = IPX_SEND | IPX_RECV | IPX_RECV_BCAST; - nsock->s_ptype = (protocol ? NSPROTO_IPX - protocol : 0); + nsock->s_ptype = (protocol ? protocol - NSPROTO_IPX : 0); log_printf(LOG_INFO, "IPX socket created (fd = %d)", nsock->fd);