From 33071b40dd1c94c4ec62da628106157f940d1363 Mon Sep 17 00:00:00 2001 From: Daniel Collins Date: Sat, 11 Jan 2014 18:20:55 +0000 Subject: [PATCH] Initialise ptype of IPX sockets correctly. --- changes.txt | 3 +++ src/winsock.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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);