summaryrefslogtreecommitdiff
path: root/src/common/socket.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-01-30 00:25:44 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-01-30 00:25:44 +0000
commit741230435bd23aa692f552649664b67a43a358c0 (patch)
tree2f659f9ff3ed0c2b3df3119315047b6f756ef135 /src/common/socket.c
parentd21f2f8479c618c15958ae1f9ac5811b9b035921 (diff)
downloadhercules-741230435bd23aa692f552649664b67a43a358c0.tar.gz
hercules-741230435bd23aa692f552649664b67a43a358c0.tar.bz2
hercules-741230435bd23aa692f552649664b67a43a358c0.tar.xz
hercules-741230435bd23aa692f552649664b67a43a358c0.zip
* Merged changes from trunk [14636:14686/trunk].
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14687 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/socket.c')
-rw-r--r--src/common/socket.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/socket.c b/src/common/socket.c
index 89c605c9d..ff667cf2e 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -996,10 +996,10 @@ int access_ipmask(const char* str, AccessControl* acc)
(n == 5 && m[0] > 32) ){ // invalid bit mask
return 0;
}
- ip = (uint32)(a[0] | (a[1] << 8) | (a[2] << 16) | (a[3] << 24));
+ ip = MAKEIP(a[0],a[1],a[2],a[3]);
if( n == 8 )
{// standard mask
- mask = (uint32)(a[0] | (a[1] << 8) | (a[2] << 16) | (a[3] << 24));
+ mask = MAKEIP(m[0],m[1],m[2],m[3]);
} else if( n == 5 )
{// bit mask
mask = 0;
@@ -1007,7 +1007,6 @@ int access_ipmask(const char* str, AccessControl* acc)
mask = (mask >> 1) | 0x80000000;
--m[0];
}
- mask = ntohl(mask);
} else
{// just this ip
mask = 0xFFFFFFFF;