avl_node_t *node;
connection_t *c;
- cp();
-
subnet = lookup_subnet_mac(address);
/* If we don't know this MAC address yet, store it */
connection_t *c;
avl_node_t *node, *next, *node2;
- cp();
-
for(node = myself->subnet_tree->head; node; node = next) {
next = node->next;
s = node->data;
if(ratelimit(3))
return;
- cp();
-
/* Swap Ethernet source and destination addresses */
swap_mac_addresses(packet);
uint8_t *offset;
uint16_t ip_off, origf;
- cp();
-
memcpy(&ip, packet->data + ether_size, ip_size);
fragment.priority = packet->priority;
node_t *via;
ipv4_t dest;
- cp();
-
memcpy(&dest, &packet->data[30], sizeof dest);
subnet = lookup_subnet_ipv4(&dest);
}
static void route_ipv4(node_t *source, vpn_packet_t *packet) {
- cp();
-
if(!checklength(source, packet, ether_size + ip_size))
return;
if(ratelimit(3))
return;
- cp();
-
/* Swap Ethernet source and destination addresses */
swap_mac_addresses(packet);
node_t *via;
ipv6_t dest;
- cp();
-
memcpy(&dest, &packet->data[38], sizeof dest);
subnet = lookup_subnet_ipv6(&dest);
uint32_t next;
} pseudo;
- cp();
-
if(!checklength(source, packet, ether_size + ip6_size + ns_size))
return;
}
static void route_ipv6(node_t *source, vpn_packet_t *packet) {
- cp();
-
if(!checklength(source, packet, ether_size + ip6_size))
return;
subnet_t *subnet;
struct in_addr addr;
- cp();
-
if(!checklength(source, packet, ether_size + arp_size))
return;
subnet_t *subnet;
mac_t dest;
- cp();
-
-
/* Learn source address */
if(source == myself) {
send_packet(subnet->owner, packet);
}
-
void route(node_t *source, vpn_packet_t *packet) {
- cp();
-
if(!checklength(source, packet, ether_size))
return;