gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r19305 - gnunet/src/vpn


From: gnunet
Subject: [GNUnet-SVN] r19305 - gnunet/src/vpn
Date: Sat, 21 Jan 2012 21:12:03 +0100

Author: grothoff
Date: 2012-01-21 21:12:03 +0100 (Sat, 21 Jan 2012)
New Revision: 19305

Modified:
   gnunet/src/vpn/gnunet-service-vpn.c
Log:
-make up ICMP payload for error responses on VPN->TUN link

Modified: gnunet/src/vpn/gnunet-service-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-service-vpn.c 2012-01-21 20:09:51 UTC (rev 19304)
+++ gnunet/src/vpn/gnunet-service-vpn.c 2012-01-21 20:12:03 UTC (rev 19305)
@@ -1613,8 +1613,15 @@
                        struct GNUNET_TUN_IPv4Header *ipp,
                        struct GNUNET_TUN_UdpHeader *udp)
 {
-  /* FIXME */
-  GNUNET_break (0);
+  GNUNET_TUN_initialize_ipv4_header (ipp,
+                                    ts->protocol,
+                                    sizeof (struct GNUNET_TUN_TcpHeader),
+                                    &ts->source_ip.v4,
+                                    &ts->destination_ip.v4);
+  udp->spt = htons (ts->source_port);
+  udp->dpt = htons (ts->destination_port);
+  udp->len = htons (0);
+  udp->crc = htons (0);
 }
 
 
@@ -1632,8 +1639,15 @@
                        struct GNUNET_TUN_IPv6Header *ipp,
                        struct GNUNET_TUN_UdpHeader *udp)
 {
-  /* FIXME */
-  GNUNET_break (0);
+  GNUNET_TUN_initialize_ipv6_header (ipp,
+                                    ts->protocol,
+                                    sizeof (struct GNUNET_TUN_TcpHeader),
+                                    &ts->source_ip.v6,
+                                    &ts->destination_ip.v6);
+  udp->spt = htons (ts->source_port);
+  udp->dpt = htons (ts->destination_port);
+  udp->len = htons (0);
+  udp->crc = htons (0);
 }
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]