diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-21 20:12:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-21 20:12:03 +0000 |
commit | c5dc23a6f2cfd4cff8cb13fa50614816dd480843 (patch) | |
tree | 271f3aebc2107f9f2149ca16de0446969bd56048 /src/vpn | |
parent | b53c68458d1b7daa7a4320adb401daac62c4daed (diff) | |
download | gnunet-c5dc23a6f2cfd4cff8cb13fa50614816dd480843.tar.gz gnunet-c5dc23a6f2cfd4cff8cb13fa50614816dd480843.zip |
-make up ICMP payload for error responses on VPN->TUN link
Diffstat (limited to 'src/vpn')
-rw-r--r-- | src/vpn/gnunet-service-vpn.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c index 12b4eef4a..94dadc70b 100644 --- a/src/vpn/gnunet-service-vpn.c +++ b/src/vpn/gnunet-service-vpn.c | |||
@@ -1613,8 +1613,15 @@ make_up_icmpv4_payload (struct TunnelState *ts, | |||
1613 | struct GNUNET_TUN_IPv4Header *ipp, | 1613 | struct GNUNET_TUN_IPv4Header *ipp, |
1614 | struct GNUNET_TUN_UdpHeader *udp) | 1614 | struct GNUNET_TUN_UdpHeader *udp) |
1615 | { | 1615 | { |
1616 | /* FIXME */ | 1616 | GNUNET_TUN_initialize_ipv4_header (ipp, |
1617 | GNUNET_break (0); | 1617 | ts->protocol, |
1618 | sizeof (struct GNUNET_TUN_TcpHeader), | ||
1619 | &ts->source_ip.v4, | ||
1620 | &ts->destination_ip.v4); | ||
1621 | udp->spt = htons (ts->source_port); | ||
1622 | udp->dpt = htons (ts->destination_port); | ||
1623 | udp->len = htons (0); | ||
1624 | udp->crc = htons (0); | ||
1618 | } | 1625 | } |
1619 | 1626 | ||
1620 | 1627 | ||
@@ -1632,8 +1639,15 @@ make_up_icmpv6_payload (struct TunnelState *ts, | |||
1632 | struct GNUNET_TUN_IPv6Header *ipp, | 1639 | struct GNUNET_TUN_IPv6Header *ipp, |
1633 | struct GNUNET_TUN_UdpHeader *udp) | 1640 | struct GNUNET_TUN_UdpHeader *udp) |
1634 | { | 1641 | { |
1635 | /* FIXME */ | 1642 | GNUNET_TUN_initialize_ipv6_header (ipp, |
1636 | GNUNET_break (0); | 1643 | ts->protocol, |
1644 | sizeof (struct GNUNET_TUN_TcpHeader), | ||
1645 | &ts->source_ip.v6, | ||
1646 | &ts->destination_ip.v6); | ||
1647 | udp->spt = htons (ts->source_port); | ||
1648 | udp->dpt = htons (ts->destination_port); | ||
1649 | udp->len = htons (0); | ||
1650 | udp->crc = htons (0); | ||
1637 | } | 1651 | } |
1638 | 1652 | ||
1639 | 1653 | ||