Added htonl wrapper around mask when ANDing in client_sane. This was
authormgriego <mgriego>
Sat, 15 Oct 2005 23:52:36 +0000 (23:52 +0000)
committermgriego <mgriego>
Sat, 15 Oct 2005 23:52:36 +0000 (23:52 +0000)
some hard to track down issues.  The same may need to be done for the
IPv6 code in that function.

src/main/client.c

index ef1b0ab..064c883 100644 (file)
@@ -168,7 +168,7 @@ static int client_sane(RADCLIENT *client)
                        uint32_t mask = ~0;
 
                        mask <<= (32 - client->prefix);
-                       client->ipaddr.ipaddr.ip4addr.s_addr &= mask;
+                       client->ipaddr.ipaddr.ip4addr.s_addr &= htonl(mask);
                }
                break;