+ // Parse trusted hosts list
+ giServer_NumTrustedHosts = Config_GetValueCount("trusted_host");
+ gaServer_TrustedHosts = malloc(giServer_NumTrustedHosts * sizeof(*gaServer_TrustedHosts));
+ for( int i = 0; i < giServer_NumTrustedHosts; i ++ )
+ {
+ const char *addr = Config_GetValue("trusted_host", i);
+
+ if( inet_aton(addr, &gaServer_TrustedHosts[i]) == 0 ) {
+ fprintf(stderr, "Invalid IP address '%s'\n", addr);
+ continue ;
+ }
+ }
+