aboutsummaryrefslogtreecommitdiff
path: root/src/nat
diff options
context:
space:
mode:
Diffstat (limited to 'src/nat')
-rw-r--r--src/nat/gnunet-helper-nat-client-windows.c18
-rw-r--r--src/nat/gnunet-helper-nat-client.c72
-rw-r--r--src/nat/gnunet-helper-nat-server-windows.c18
-rw-r--r--src/nat/gnunet-helper-nat-server.c64
-rw-r--r--src/nat/gnunet-nat.c18
-rw-r--r--src/nat/gnunet-service-nat.c26
-rw-r--r--src/nat/gnunet-service-nat.h18
-rw-r--r--src/nat/gnunet-service-nat_externalip.c18
-rw-r--r--src/nat/gnunet-service-nat_externalip.h18
-rw-r--r--src/nat/gnunet-service-nat_helper.c18
-rw-r--r--src/nat/gnunet-service-nat_helper.h18
-rw-r--r--src/nat/gnunet-service-nat_mini.c18
-rw-r--r--src/nat/gnunet-service-nat_mini.h18
-rw-r--r--src/nat/gnunet-service-nat_stun.c18
-rw-r--r--src/nat/gnunet-service-nat_stun.h18
-rw-r--r--src/nat/nat.conf.in2
-rw-r--r--src/nat/nat.h18
-rw-r--r--src/nat/nat_api.c18
-rw-r--r--src/nat/nat_api_stun.c18
-rw-r--r--src/nat/nat_stun.h18
-rw-r--r--src/nat/test_nat.c18
-rw-r--r--src/nat/test_nat_data.conf2
-rw-r--r--src/nat/test_nat_mini.c18
-rw-r--r--src/nat/test_nat_test.c18
-rw-r--r--src/nat/test_nat_test_data.conf6
-rw-r--r--src/nat/test_stun.c18
-rw-r--r--src/nat/test_stun.conf2
27 files changed, 273 insertions, 261 deletions
diff --git a/src/nat/gnunet-helper-nat-client-windows.c b/src/nat/gnunet-helper-nat-client-windows.c
index 622f8c961..9dbaa0d48 100644
--- a/src/nat/gnunet-helper-nat-client-windows.c
+++ b/src/nat/gnunet-helper-nat-client-windows.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2010 GNUnet e.V. 3 Copyright (C) 2010 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/gnunet-helper-nat-client.c b/src/nat/gnunet-helper-nat-client.c
index d9129afb0..d4fc54b24 100644
--- a/src/nat/gnunet-helper-nat-client.c
+++ b/src/nat/gnunet-helper-nat-client.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2010 GNUnet e.V. 3 Copyright (C) 2010 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
@@ -67,6 +65,17 @@
67#endif 65#endif
68 66
69/** 67/**
68 * Call memcpy() but check for @a n being 0 first. In the latter
69 * case, it is now safe to pass NULL for @a src or @a dst.
70 * Unlike traditional memcpy(), returns nothing.
71 *
72 * @param dst destination of the copy, may be NULL if @a n is zero
73 * @param src source of the copy, may be NULL if @a n is zero
74 * @param n number of bytes to copy
75 */
76#define GNUNET_memcpy(dst,src,n) do { if (0 != n) { (void) memcpy (dst,src,n); } } while (0)
77
78/**
70 * Must match IP given in the server. 79 * Must match IP given in the server.
71 */ 80 */
72#define DUMMY_IP "192.0.2.86" 81#define DUMMY_IP "192.0.2.86"
@@ -251,14 +260,18 @@ send_icmp_udp (const struct in_addr *my_ip, const struct in_addr *other)
251 ip_pkt.dst_ip = other->s_addr; 260 ip_pkt.dst_ip = other->s_addr;
252 ip_pkt.checksum = 261 ip_pkt.checksum =
253 htons (calc_checksum ((uint16_t *) & ip_pkt, sizeof (struct ip_header))); 262 htons (calc_checksum ((uint16_t *) & ip_pkt, sizeof (struct ip_header)));
254 memcpy (&packet[off], &ip_pkt, sizeof (struct ip_header)); 263 GNUNET_memcpy (&packet[off],
264 &ip_pkt,
265 sizeof (struct ip_header));
255 off += sizeof (struct ip_header); 266 off += sizeof (struct ip_header);
256 267
257 icmp_pkt.type = ICMP_TIME_EXCEEDED; 268 icmp_pkt.type = ICMP_TIME_EXCEEDED;
258 icmp_pkt.code = 0; 269 icmp_pkt.code = 0;
259 icmp_pkt.checksum = 0; 270 icmp_pkt.checksum = 0;
260 icmp_pkt.unused = 0; 271 icmp_pkt.unused = 0;
261 memcpy (&packet[off], &icmp_pkt, sizeof (struct icmp_ttl_exceeded_header)); 272 GNUNET_memcpy (&packet[off],
273 &icmp_pkt,
274 sizeof (struct icmp_ttl_exceeded_header));
262 off += sizeof (struct icmp_ttl_exceeded_header); 275 off += sizeof (struct icmp_ttl_exceeded_header);
263 276
264 /* ip header of the presumably 'lost' udp packet */ 277 /* ip header of the presumably 'lost' udp packet */
@@ -275,7 +288,9 @@ send_icmp_udp (const struct in_addr *my_ip, const struct in_addr *other)
275 ip_pkt.dst_ip = dummy.s_addr; 288 ip_pkt.dst_ip = dummy.s_addr;
276 ip_pkt.checksum = 289 ip_pkt.checksum =
277 htons (calc_checksum ((uint16_t *) & ip_pkt, sizeof (struct ip_header))); 290 htons (calc_checksum ((uint16_t *) & ip_pkt, sizeof (struct ip_header)));
278 memcpy (&packet[off], &ip_pkt, sizeof (struct ip_header)); 291 GNUNET_memcpy (&packet[off],
292 &ip_pkt,
293 sizeof (struct ip_header));
279 off += sizeof (struct ip_header); 294 off += sizeof (struct ip_header);
280 295
281 /* build UDP header */ 296 /* build UDP header */
@@ -283,7 +298,9 @@ send_icmp_udp (const struct in_addr *my_ip, const struct in_addr *other)
283 udp_pkt.dst_port = htons (NAT_TRAV_PORT); 298 udp_pkt.dst_port = htons (NAT_TRAV_PORT);
284 udp_pkt.length = htons (port); 299 udp_pkt.length = htons (port);
285 udp_pkt.crc = 0; 300 udp_pkt.crc = 0;
286 memcpy (&packet[off], &udp_pkt, sizeof (struct udp_header)); 301 GNUNET_memcpy (&packet[off],
302 &udp_pkt,
303 sizeof (struct udp_header));
287 off += sizeof (struct udp_header); 304 off += sizeof (struct udp_header);
288 305
289 /* set ICMP checksum */ 306 /* set ICMP checksum */
@@ -292,8 +309,9 @@ send_icmp_udp (const struct in_addr *my_ip, const struct in_addr *other)
292 ((uint16_t *) & packet[sizeof (struct ip_header)], 309 ((uint16_t *) & packet[sizeof (struct ip_header)],
293 sizeof (struct icmp_ttl_exceeded_header) + 310 sizeof (struct icmp_ttl_exceeded_header) +
294 sizeof (struct ip_header) + sizeof (struct udp_header))); 311 sizeof (struct ip_header) + sizeof (struct udp_header)));
295 memcpy (&packet[sizeof (struct ip_header)], &icmp_pkt, 312 GNUNET_memcpy (&packet[sizeof (struct ip_header)],
296 sizeof (struct icmp_ttl_exceeded_header)); 313 &icmp_pkt,
314 sizeof (struct icmp_ttl_exceeded_header));
297 315
298 memset (&dst, 0, sizeof (dst)); 316 memset (&dst, 0, sizeof (dst));
299 dst.sin_family = AF_INET; 317 dst.sin_family = AF_INET;
@@ -352,7 +370,9 @@ send_icmp (const struct in_addr *my_ip, const struct in_addr *other)
352 ip_pkt.dst_ip = other->s_addr; 370 ip_pkt.dst_ip = other->s_addr;
353 ip_pkt.checksum = 371 ip_pkt.checksum =
354 htons (calc_checksum ((uint16_t *) & ip_pkt, sizeof (struct ip_header))); 372 htons (calc_checksum ((uint16_t *) & ip_pkt, sizeof (struct ip_header)));
355 memcpy (&packet[off], &ip_pkt, sizeof (struct ip_header)); 373 GNUNET_memcpy (&packet[off],
374 &ip_pkt,
375 sizeof (struct ip_header));
356 off = sizeof (ip_pkt); 376 off = sizeof (ip_pkt);
357 377
358 /* icmp reply: time exceeded */ 378 /* icmp reply: time exceeded */
@@ -360,7 +380,9 @@ send_icmp (const struct in_addr *my_ip, const struct in_addr *other)
360 icmp_ttl.code = 0; 380 icmp_ttl.code = 0;
361 icmp_ttl.checksum = 0; 381 icmp_ttl.checksum = 0;
362 icmp_ttl.unused = 0; 382 icmp_ttl.unused = 0;
363 memcpy (&packet[off], &icmp_ttl, sizeof (struct icmp_ttl_exceeded_header)); 383 GNUNET_memcpy (&packet[off],
384 &icmp_ttl,
385 sizeof (struct icmp_ttl_exceeded_header));
364 off += sizeof (struct icmp_ttl_exceeded_header); 386 off += sizeof (struct icmp_ttl_exceeded_header);
365 387
366 /* ip header of the presumably 'lost' udp packet */ 388 /* ip header of the presumably 'lost' udp packet */
@@ -377,7 +399,9 @@ send_icmp (const struct in_addr *my_ip, const struct in_addr *other)
377 ip_pkt.checksum = 0; 399 ip_pkt.checksum = 0;
378 ip_pkt.checksum = 400 ip_pkt.checksum =
379 htons (calc_checksum ((uint16_t *) & ip_pkt, sizeof (struct ip_header))); 401 htons (calc_checksum ((uint16_t *) & ip_pkt, sizeof (struct ip_header)));
380 memcpy (&packet[off], &ip_pkt, sizeof (struct ip_header)); 402 GNUNET_memcpy (&packet[off],
403 &ip_pkt,
404 sizeof (struct ip_header));
381 off += sizeof (struct ip_header); 405 off += sizeof (struct ip_header);
382 406
383 icmp_echo.type = ICMP_ECHO; 407 icmp_echo.type = ICMP_ECHO;
@@ -386,8 +410,10 @@ send_icmp (const struct in_addr *my_ip, const struct in_addr *other)
386 icmp_echo.checksum = 0; 410 icmp_echo.checksum = 0;
387 icmp_echo.checksum = 411 icmp_echo.checksum =
388 htons (calc_checksum 412 htons (calc_checksum
389 ((uint16_t *) & icmp_echo, sizeof (struct icmp_echo_header))); 413 ((uint16_t *) &icmp_echo, sizeof (struct icmp_echo_header)));
390 memcpy (&packet[off], &icmp_echo, sizeof (struct icmp_echo_header)); 414 GNUNET_memcpy (&packet[off],
415 &icmp_echo,
416 sizeof (struct icmp_echo_header));
391 417
392 /* no go back to calculate ICMP packet checksum */ 418 /* no go back to calculate ICMP packet checksum */
393 off = sizeof (struct ip_header); 419 off = sizeof (struct ip_header);
@@ -396,7 +422,9 @@ send_icmp (const struct in_addr *my_ip, const struct in_addr *other)
396 ((uint16_t *) & packet[off], 422 ((uint16_t *) & packet[off],
397 sizeof (struct icmp_ttl_exceeded_header) + 423 sizeof (struct icmp_ttl_exceeded_header) +
398 sizeof (struct ip_header) + sizeof (struct icmp_echo_header))); 424 sizeof (struct ip_header) + sizeof (struct icmp_echo_header)));
399 memcpy (&packet[off], &icmp_ttl, sizeof (struct icmp_ttl_exceeded_header)); 425 GNUNET_memcpy (&packet[off],
426 &icmp_ttl,
427 sizeof (struct icmp_ttl_exceeded_header));
400 428
401 /* prepare for transmission */ 429 /* prepare for transmission */
402 memset (&dst, 0, sizeof (dst)); 430 memset (&dst, 0, sizeof (dst));
diff --git a/src/nat/gnunet-helper-nat-server-windows.c b/src/nat/gnunet-helper-nat-server-windows.c
index 09bd02538..c26684369 100644
--- a/src/nat/gnunet-helper-nat-server-windows.c
+++ b/src/nat/gnunet-helper-nat-server-windows.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2010 GNUnet e.V. 3 Copyright (C) 2010 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/gnunet-helper-nat-server.c b/src/nat/gnunet-helper-nat-server.c
index ef8e97482..c5c6b563e 100644
--- a/src/nat/gnunet-helper-nat-server.c
+++ b/src/nat/gnunet-helper-nat-server.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2010 GNUnet e.V. 3 Copyright (C) 2010 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
@@ -71,6 +69,17 @@
71#endif 69#endif
72 70
73/** 71/**
72 * Call memcpy() but check for @a n being 0 first. In the latter
73 * case, it is now safe to pass NULL for @a src or @a dst.
74 * Unlike traditional memcpy(), returns nothing.
75 *
76 * @param dst destination of the copy, may be NULL if @a n is zero
77 * @param src source of the copy, may be NULL if @a n is zero
78 * @param n number of bytes to copy
79 */
80#define GNUNET_memcpy(dst,src,n) do { if (0 != n) { (void) memcpy (dst,src,n); } } while (0)
81
82/**
74 * Should we print some debug output? 83 * Should we print some debug output?
75 */ 84 */
76#define VERBOSE 0 85#define VERBOSE 0
@@ -266,9 +275,9 @@ send_icmp_echo (const struct in_addr *my_ip)
266 ip_pkt.checksum = 275 ip_pkt.checksum =
267 htons (calc_checksum ((uint16_t *) & ip_pkt, 276 htons (calc_checksum ((uint16_t *) & ip_pkt,
268 sizeof (struct ip_header))); 277 sizeof (struct ip_header)));
269 memcpy (&packet[off], 278 GNUNET_memcpy (&packet[off],
270 &ip_pkt, 279 &ip_pkt,
271 sizeof (struct ip_header)); 280 sizeof (struct ip_header));
272 off += sizeof (struct ip_header); 281 off += sizeof (struct ip_header);
273 282
274 icmp_echo.type = ICMP_ECHO; 283 icmp_echo.type = ICMP_ECHO;
@@ -279,9 +288,9 @@ send_icmp_echo (const struct in_addr *my_ip)
279 htons (calc_checksum 288 htons (calc_checksum
280 ((uint16_t *) & icmp_echo, 289 ((uint16_t *) & icmp_echo,
281 sizeof (struct icmp_echo_header))); 290 sizeof (struct icmp_echo_header)));
282 memcpy (&packet[off], 291 GNUNET_memcpy (&packet[off],
283 &icmp_echo, 292 &icmp_echo,
284 sizeof (struct icmp_echo_header)); 293 sizeof (struct icmp_echo_header));
285 off += sizeof (struct icmp_echo_header); 294 off += sizeof (struct icmp_echo_header);
286 295
287 memset (&dst, 0, sizeof (dst)); 296 memset (&dst, 0, sizeof (dst));
@@ -388,9 +397,13 @@ process_icmp_response ()
388 return; 397 return;
389 } 398 }
390 off = 0; 399 off = 0;
391 memcpy (&ip_pkt, &buf[off], sizeof (struct ip_header)); 400 GNUNET_memcpy (&ip_pkt,
401 &buf[off],
402 sizeof (struct ip_header));
392 off += sizeof (struct ip_header); 403 off += sizeof (struct ip_header);
393 memcpy (&icmp_ttl, &buf[off], sizeof (struct icmp_ttl_exceeded_header)); 404 GNUNET_memcpy (&icmp_ttl,
405 &buf[off],
406 sizeof (struct icmp_ttl_exceeded_header));
394 off += sizeof (struct icmp_ttl_exceeded_header); 407 off += sizeof (struct icmp_ttl_exceeded_header);
395 if ((ICMP_TIME_EXCEEDED != icmp_ttl.type) || (0 != icmp_ttl.code)) 408 if ((ICMP_TIME_EXCEEDED != icmp_ttl.type) || (0 != icmp_ttl.code))
396 { 409 {
@@ -401,7 +414,9 @@ process_icmp_response ()
401 source_ip.s_addr = ip_pkt.src_ip; 414 source_ip.s_addr = ip_pkt.src_ip;
402 415
403 /* skip 2nd IP header */ 416 /* skip 2nd IP header */
404 memcpy (&ip_pkt, &buf[off], sizeof (struct ip_header)); 417 GNUNET_memcpy (&ip_pkt,
418 &buf[off],
419 sizeof (struct ip_header));
405 off += sizeof (struct ip_header); 420 off += sizeof (struct ip_header);
406 421
407 switch (ip_pkt.proto) 422 switch (ip_pkt.proto)
@@ -416,7 +431,9 @@ process_icmp_response ()
416 return; 431 return;
417 } 432 }
418 /* grab ICMP ECHO content */ 433 /* grab ICMP ECHO content */
419 memcpy (&icmp_echo, &buf[off], sizeof (struct icmp_echo_header)); 434 GNUNET_memcpy (&icmp_echo,
435 &buf[off],
436 sizeof (struct icmp_echo_header));
420 port = (uint16_t) ntohl (icmp_echo.reserved); 437 port = (uint16_t) ntohl (icmp_echo.reserved);
421 break; 438 break;
422 case IPPROTO_UDP: 439 case IPPROTO_UDP:
@@ -428,7 +445,9 @@ process_icmp_response ()
428 return; 445 return;
429 } 446 }
430 /* grab UDP content */ 447 /* grab UDP content */
431 memcpy (&udp_pkt, &buf[off], sizeof (struct udp_header)); 448 GNUNET_memcpy (&udp_pkt,
449 &buf[off],
450 sizeof (struct udp_header));
432 port = ntohs (udp_pkt.length); 451 port = ntohs (udp_pkt.length);
433 break; 452 break;
434 default: 453 default:
@@ -664,7 +683,10 @@ main (int argc,
664 if (1 == getppid ()) /* Check the parent process id, if 1 the parent has died, so we should die too */ 683 if (1 == getppid ()) /* Check the parent process id, if 1 the parent has died, so we should die too */
665 break; 684 break;
666 if (FD_ISSET (icmpsock, &rs)) 685 if (FD_ISSET (icmpsock, &rs))
686 {
667 process_icmp_response (); 687 process_icmp_response ();
688 continue;
689 }
668 if (0 == (++alt % 2)) 690 if (0 == (++alt % 2))
669 send_icmp_echo (&external); 691 send_icmp_echo (&external);
670 else 692 else
diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c
index 72f343627..ddc678ddc 100644
--- a/src/nat/gnunet-nat.c
+++ b/src/nat/gnunet-nat.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2015, 2016 GNUnet e.V. 3 Copyright (C) 2015, 2016 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/gnunet-service-nat.c b/src/nat/gnunet-service-nat.c
index 0695c7ac7..dd0715785 100644
--- a/src/nat/gnunet-service-nat.c
+++ b/src/nat/gnunet-service-nat.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2016, 2017 GNUnet e.V. 3 Copyright (C) 2016, 2017 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19 */ 17 */
20 18
21/** 19/**
@@ -1234,8 +1232,12 @@ process_external_ip (void *cls,
1234 ch->hole_external); 1232 ch->hole_external);
1235 1233
1236 /* build sockaddr storage with port number */ 1234 /* build sockaddr storage with port number */
1237 memset (&ss, 0, sizeof (ss)); 1235 memset (&ss,
1238 memcpy (&ss, addr, addrlen); 1236 0,
1237 sizeof (ss));
1238 GNUNET_memcpy (&ss,
1239 addr,
1240 addrlen);
1239 switch (addr->sa_family) 1241 switch (addr->sa_family)
1240 { 1242 {
1241 case AF_INET: 1243 case AF_INET:
diff --git a/src/nat/gnunet-service-nat.h b/src/nat/gnunet-service-nat.h
index 96eb9f78b..d1cdd0180 100644
--- a/src/nat/gnunet-service-nat.h
+++ b/src/nat/gnunet-service-nat.h
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2016, 2017 GNUnet e.V. 3 Copyright (C) 2016, 2017 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19 */ 17 */
20 18
21/** 19/**
diff --git a/src/nat/gnunet-service-nat_externalip.c b/src/nat/gnunet-service-nat_externalip.c
index f79ff4070..e55f5ac1e 100644
--- a/src/nat/gnunet-service-nat_externalip.c
+++ b/src/nat/gnunet-service-nat_externalip.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2015, 2016, 2017 GNUnet e.V. 3 Copyright (C) 2009, 2015, 2016, 2017 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20/** 18/**
21 * Code to figure out what our external IPv4 address(es) might 19 * Code to figure out what our external IPv4 address(es) might
diff --git a/src/nat/gnunet-service-nat_externalip.h b/src/nat/gnunet-service-nat_externalip.h
index 31910555d..846bac7b9 100644
--- a/src/nat/gnunet-service-nat_externalip.h
+++ b/src/nat/gnunet-service-nat_externalip.h
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2015, 2016, 2017 GNUnet e.V. 3 Copyright (C) 2009, 2015, 2016, 2017 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20/** 18/**
21 * Code to figure out what our external IPv4 address(es) might 19 * Code to figure out what our external IPv4 address(es) might
diff --git a/src/nat/gnunet-service-nat_helper.c b/src/nat/gnunet-service-nat_helper.c
index de6531fa8..35b3dd999 100644
--- a/src/nat/gnunet-service-nat_helper.c
+++ b/src/nat/gnunet-service-nat_helper.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2010, 2011, 2016 GNUnet e.V. 3 Copyright (C) 2009, 2010, 2011, 2016 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/gnunet-service-nat_helper.h b/src/nat/gnunet-service-nat_helper.h
index 026526b05..52b36e057 100644
--- a/src/nat/gnunet-service-nat_helper.h
+++ b/src/nat/gnunet-service-nat_helper.h
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2010, 2011, 2016 GNUnet e.V. 3 Copyright (C) 2009, 2010, 2011, 2016 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/gnunet-service-nat_mini.c b/src/nat/gnunet-service-nat_mini.c
index 8f1229be1..a3617e3ce 100644
--- a/src/nat/gnunet-service-nat_mini.c
+++ b/src/nat/gnunet-service-nat_mini.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2011-2014, 2016 GNUnet e.V. 3 Copyright (C) 2011-2014, 2016 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/gnunet-service-nat_mini.h b/src/nat/gnunet-service-nat_mini.h
index 8a7af9bf1..86930f39f 100644
--- a/src/nat/gnunet-service-nat_mini.h
+++ b/src/nat/gnunet-service-nat_mini.h
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2011-2014, 2016 GNUnet e.V. 3 Copyright (C) 2011-2014, 2016 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/gnunet-service-nat_stun.c b/src/nat/gnunet-service-nat_stun.c
index 6f3ea10eb..17dfcadf4 100644
--- a/src/nat/gnunet-service-nat_stun.c
+++ b/src/nat/gnunet-service-nat_stun.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2015, 2016 GNUnet e.V. 3 Copyright (C) 2009, 2015, 2016 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20/** 18/**
21 * This code provides some support for doing STUN transactions. We 19 * This code provides some support for doing STUN transactions. We
diff --git a/src/nat/gnunet-service-nat_stun.h b/src/nat/gnunet-service-nat_stun.h
index 3d7e18f53..f34c7f43b 100644
--- a/src/nat/gnunet-service-nat_stun.h
+++ b/src/nat/gnunet-service-nat_stun.h
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2015, 2016 GNUnet e.V. 3 Copyright (C) 2009, 2015, 2016 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20/** 18/**
21 * This code provides some support for doing STUN transactions. We 19 * This code provides some support for doing STUN transactions. We
diff --git a/src/nat/nat.conf.in b/src/nat/nat.conf.in
index 87fe29d9c..a8dbee953 100644
--- a/src/nat/nat.conf.in
+++ b/src/nat/nat.conf.in
@@ -1,5 +1,5 @@
1[nat] 1[nat]
2AUTOSTART = @AUTOSTART@ 2START_ON_DEMAND = @START_ON_DEMAND@
3@UNIXONLY@ PORT = 2121 3@UNIXONLY@ PORT = 2121
4HOSTNAME = localhost 4HOSTNAME = localhost
5BINARY = gnunet-service-nat 5BINARY = gnunet-service-nat
diff --git a/src/nat/nat.h b/src/nat/nat.h
index d34900bd1..d5ec7747d 100644
--- a/src/nat/nat.h
+++ b/src/nat/nat.h
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2011, 2016 GNUnet e.V. 3 Copyright (C) 2011, 2016 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/nat_api.c b/src/nat/nat_api.c
index 69612584e..017c8739d 100644
--- a/src/nat/nat_api.c
+++ b/src/nat/nat_api.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2007-2017 GNUnet e.V. 3 Copyright (C) 2007-2017 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/nat_api_stun.c b/src/nat/nat_api_stun.c
index b1309fb53..9332cfd98 100644
--- a/src/nat/nat_api_stun.c
+++ b/src/nat/nat_api_stun.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2015, 2016 GNUnet e.V. 3 Copyright (C) 2009, 2015, 2016 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20/** 18/**
21 * This code provides some support for doing STUN transactions. 19 * This code provides some support for doing STUN transactions.
diff --git a/src/nat/nat_stun.h b/src/nat/nat_stun.h
index 8d1c2720f..25e2e46da 100644
--- a/src/nat/nat_stun.h
+++ b/src/nat/nat_stun.h
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2015, 2016 GNUnet e.V. 3 Copyright (C) 2009, 2015, 2016 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20/** 18/**
21 * Message types for STUN server resolution 19 * Message types for STUN server resolution
diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c
index 2e14a1ffa..f38fa8e81 100644
--- a/src/nat/test_nat.c
+++ b/src/nat/test_nat.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2011 GNUnet e.V. 3 Copyright (C) 2009, 2011 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/test_nat_data.conf b/src/nat/test_nat_data.conf
index d23a49162..cb018cecd 100644
--- a/src/nat/test_nat_data.conf
+++ b/src/nat/test_nat_data.conf
@@ -1,5 +1,5 @@
1[PATHS] 1[PATHS]
2GNUNET_TEST_HOME = /tmp/nat-test 2GNUNET_TEST_HOME = $GNUNET_TMP/nat-test
3# GNUNET_TEST_HOME = /var/lib/gnunet/ 3# GNUNET_TEST_HOME = /var/lib/gnunet/
4# configuration file is assumed to be the default, 4# configuration file is assumed to be the default,
5# which is what we want by default... 5# which is what we want by default...
diff --git a/src/nat/test_nat_mini.c b/src/nat/test_nat_mini.c
index d6ab2a321..cc8248cfe 100644
--- a/src/nat/test_nat_mini.c
+++ b/src/nat/test_nat_mini.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2011 GNUnet e.V. 3 Copyright (C) 2009, 2011 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c
index 402671bd2..a7cbaeab4 100644
--- a/src/nat/test_nat_test.c
+++ b/src/nat/test_nat_test.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2011, 2014 GNUnet e.V. 3 Copyright (C) 2009, 2011, 2014 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20/** 18/**
21 * @file nat/test_nat_test.c 19 * @file nat/test_nat_test.c
diff --git a/src/nat/test_nat_test_data.conf b/src/nat/test_nat_test_data.conf
index 161af6c48..03850ec06 100644
--- a/src/nat/test_nat_test_data.conf
+++ b/src/nat/test_nat_test_data.conf
@@ -1,12 +1,12 @@
1[PATHS] 1[PATHS]
2GNUNET_TEST_HOME = /tmp/nat-test 2GNUNET_TEST_HOME = $GNUNET_TMP/nat-test
3# GNUNET_TEST_HOME = /var/lib/gnunet/ 3# GNUNET_TEST_HOME = /var/lib/gnunet/
4# configuration file is assumed to be the default, 4# configuration file is assumed to be the default,
5# which is what we want by default... 5# which is what we want by default...
6 6
7[gnunet-nat-server] 7[gnunet-nat-server]
8HOSTNAME = localhost 8HOSTNAME = localhost
9PORT = 12345 9PORT = 57315
10 10
11[nat] 11[nat]
12# Are we behind NAT? 12# Are we behind NAT?
@@ -42,6 +42,6 @@ DISABLEV6 = YES
42 42
43 43
44[nse] 44[nse]
45AUTOSTART = NO 45START_ON_DEMAND = NO
46 46
47 47
diff --git a/src/nat/test_stun.c b/src/nat/test_stun.c
index 9d4792cd6..630538162 100644
--- a/src/nat/test_stun.c
+++ b/src/nat/test_stun.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2009, 2015 GNUnet e.V. 3 Copyright (C) 2009, 2015 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20 18
21/** 19/**
diff --git a/src/nat/test_stun.conf b/src/nat/test_stun.conf
index c8104f0a7..b03bbfff3 100644
--- a/src/nat/test_stun.conf
+++ b/src/nat/test_stun.conf
@@ -1,5 +1,5 @@
1[PATHS] 1[PATHS]
2GNUNET_TEST_HOME = /tmp/test-stun 2GNUNET_TEST_HOME = $GNUNET_TMP/test-stun
3 3
4[resolver] 4[resolver]
5PORT = 22354 5PORT = 22354