aboutsummaryrefslogtreecommitdiff
path: root/src/nat
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-11-04 14:00:32 +0000
committerChristian Grothoff <christian@grothoff.org>2011-11-04 14:00:32 +0000
commit83b19539f4d322b43683f5838b72e9ec2c8e6073 (patch)
treed0ab9329fcbefe360d9d14e2ace21a6b3396dfe9 /src/nat
parent28a2eb43281a1f08a67954f07beb9af3a9bc9a35 (diff)
downloadgnunet-83b19539f4d322b43683f5838b72e9ec2c8e6073.tar.gz
gnunet-83b19539f4d322b43683f5838b72e9ec2c8e6073.zip
curly wars / auto-indentation
Diffstat (limited to 'src/nat')
-rw-r--r--src/nat/nat.c6
-rw-r--r--src/nat/test_nat_test.c3
2 files changed, 6 insertions, 3 deletions
diff --git a/src/nat/nat.c b/src/nat/nat.c
index 2040451d5..802b241e4 100644
--- a/src/nat/nat.c
+++ b/src/nat/nat.c
@@ -649,8 +649,9 @@ process_interfaces (void *cls, const char *name, int isDefault,
649 ip = &s4->sin_addr; 649 ip = &s4->sin_addr;
650 650
651 /* Check if address is in 127.0.0.0/8 */ 651 /* Check if address is in 127.0.0.0/8 */
652 uint32_t address = ntohl((in_addr_t)(s4->sin_addr.s_addr)); 652 uint32_t address = ntohl ((in_addr_t) (s4->sin_addr.s_addr));
653 uint32_t value = (address & 0xFF000000) ^ 0x7F000000; 653 uint32_t value = (address & 0xFF000000) ^ 0x7F000000;
654
654 if ((h->return_localaddress == GNUNET_NO) && (value == 0)) 655 if ((h->return_localaddress == GNUNET_NO) && (value == 0))
655 { 656 {
656 return GNUNET_OK; 657 return GNUNET_OK;
@@ -1139,7 +1140,8 @@ GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp,
1139 h->use_localaddresses = 1140 h->use_localaddresses =
1140 GNUNET_CONFIGURATION_get_value_yesno (cfg, "nat", "USE_LOCALADDR"); 1141 GNUNET_CONFIGURATION_get_value_yesno (cfg, "nat", "USE_LOCALADDR");
1141 h->return_localaddress = 1142 h->return_localaddress =
1142 GNUNET_CONFIGURATION_get_value_yesno (cfg, "nat", "RETURN_LOCAL_ADDRESSES"); 1143 GNUNET_CONFIGURATION_get_value_yesno (cfg, "nat",
1144 "RETURN_LOCAL_ADDRESSES");
1143 1145
1144 h->use_hostname = 1146 h->use_hostname =
1145 GNUNET_CONFIGURATION_get_value_yesno (cfg, "nat", "USE_HOSTNAME"); 1147 GNUNET_CONFIGURATION_get_value_yesno (cfg, "nat", "USE_HOSTNAME");
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c
index 0786bb04b..c080e8ff3 100644
--- a/src/nat/test_nat_test.c
+++ b/src/nat/test_nat_test.c
@@ -111,7 +111,8 @@ main (int argc, char *const argv[])
111 nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server"); 111 nat_res = GNUNET_OS_check_helper_binary ("gnunet-nat-server");
112 if (GNUNET_SYSERR == nat_res) 112 if (GNUNET_SYSERR == nat_res)
113 { 113 {
114 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Cannot run NAT test: `%s' file not found\n", 114 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
115 "Cannot run NAT test: `%s' file not found\n",
115 "gnunet-nat-server"); 116 "gnunet-nat-server");
116 return 0; 117 return 0;
117 } 118 }