diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-05-24 09:35:37 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-05-24 09:35:37 +0000 |
commit | 101f5787ac60dafa175950fb714c6d4cc4906478 (patch) | |
tree | 711c8042c8b22856b0946d0c819a3520498ac274 /src/vpn | |
parent | 6743123dcc6b37dabf2759f384a7f6ad08a08bec (diff) | |
download | gnunet-101f5787ac60dafa175950fb714c6d4cc4906478.tar.gz gnunet-101f5787ac60dafa175950fb714c6d4cc4906478.zip |
- adding return value to mst callback
Diffstat (limited to 'src/vpn')
-rw-r--r-- | src/vpn/gnunet-service-vpn.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c index 5cd636900..324671b0c 100644 --- a/src/vpn/gnunet-service-vpn.c +++ b/src/vpn/gnunet-service-vpn.c | |||
@@ -1504,7 +1504,7 @@ route_packet (struct DestinationEntry *destination, | |||
1504 | * @param client NULL | 1504 | * @param client NULL |
1505 | * @param message message we got from the client (VPN tunnel interface) | 1505 | * @param message message we got from the client (VPN tunnel interface) |
1506 | */ | 1506 | */ |
1507 | static void | 1507 | static int |
1508 | message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED, | 1508 | message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED, |
1509 | const struct GNUNET_MessageHeader *message) | 1509 | const struct GNUNET_MessageHeader *message) |
1510 | { | 1510 | { |
@@ -1521,7 +1521,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED, | |||
1521 | (mlen < sizeof (struct GNUNET_MessageHeader) + sizeof (struct GNUNET_TUN_Layer2PacketHeader)) ) | 1521 | (mlen < sizeof (struct GNUNET_MessageHeader) + sizeof (struct GNUNET_TUN_Layer2PacketHeader)) ) |
1522 | { | 1522 | { |
1523 | GNUNET_break (0); | 1523 | GNUNET_break (0); |
1524 | return; | 1524 | return GNUNET_OK; |
1525 | } | 1525 | } |
1526 | tun = (const struct GNUNET_TUN_Layer2PacketHeader *) &message[1]; | 1526 | tun = (const struct GNUNET_TUN_Layer2PacketHeader *) &message[1]; |
1527 | mlen -= (sizeof (struct GNUNET_MessageHeader) + sizeof (struct GNUNET_TUN_Layer2PacketHeader)); | 1527 | mlen -= (sizeof (struct GNUNET_MessageHeader) + sizeof (struct GNUNET_TUN_Layer2PacketHeader)); |
@@ -1535,7 +1535,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED, | |||
1535 | { | 1535 | { |
1536 | /* blame kernel */ | 1536 | /* blame kernel */ |
1537 | GNUNET_break (0); | 1537 | GNUNET_break (0); |
1538 | return; | 1538 | return GNUNET_OK; |
1539 | } | 1539 | } |
1540 | pkt6 = (const struct GNUNET_TUN_IPv6Header *) &tun[1]; | 1540 | pkt6 = (const struct GNUNET_TUN_IPv6Header *) &tun[1]; |
1541 | get_destination_key_from_ip (AF_INET6, | 1541 | get_destination_key_from_ip (AF_INET6, |
@@ -1557,7 +1557,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED, | |||
1557 | &pkt6->destination_address, | 1557 | &pkt6->destination_address, |
1558 | buf, | 1558 | buf, |
1559 | sizeof (buf))); | 1559 | sizeof (buf))); |
1560 | return; | 1560 | return GNUNET_OK; |
1561 | } | 1561 | } |
1562 | route_packet (de, | 1562 | route_packet (de, |
1563 | AF_INET6, | 1563 | AF_INET6, |
@@ -1576,7 +1576,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED, | |||
1576 | { | 1576 | { |
1577 | /* blame kernel */ | 1577 | /* blame kernel */ |
1578 | GNUNET_break (0); | 1578 | GNUNET_break (0); |
1579 | return; | 1579 | return GNUNET_OK; |
1580 | } | 1580 | } |
1581 | pkt4 = (struct GNUNET_TUN_IPv4Header *) &tun[1]; | 1581 | pkt4 = (struct GNUNET_TUN_IPv4Header *) &tun[1]; |
1582 | get_destination_key_from_ip (AF_INET, | 1582 | get_destination_key_from_ip (AF_INET, |
@@ -1598,13 +1598,13 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED, | |||
1598 | &pkt4->destination_address, | 1598 | &pkt4->destination_address, |
1599 | buf, | 1599 | buf, |
1600 | sizeof (buf))); | 1600 | sizeof (buf))); |
1601 | return; | 1601 | return GNUNET_OK; |
1602 | } | 1602 | } |
1603 | if (pkt4->header_length * 4 != sizeof (struct GNUNET_TUN_IPv4Header)) | 1603 | if (pkt4->header_length * 4 != sizeof (struct GNUNET_TUN_IPv4Header)) |
1604 | { | 1604 | { |
1605 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 1605 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
1606 | _("Received IPv4 packet with options (dropping it)\n")); | 1606 | _("Received IPv4 packet with options (dropping it)\n")); |
1607 | return; | 1607 | return GNUNET_OK; |
1608 | } | 1608 | } |
1609 | route_packet (de, | 1609 | route_packet (de, |
1610 | AF_INET, | 1610 | AF_INET, |
@@ -1621,6 +1621,7 @@ message_token (void *cls GNUNET_UNUSED, void *client GNUNET_UNUSED, | |||
1621 | (unsigned int) ntohs (tun->proto)); | 1621 | (unsigned int) ntohs (tun->proto)); |
1622 | break; | 1622 | break; |
1623 | } | 1623 | } |
1624 | return GNUNET_OK; | ||
1624 | } | 1625 | } |
1625 | 1626 | ||
1626 | 1627 | ||