Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
-static void broadcast_packet_helper(node_t *source, vpn_packet_t *packet) {
+static void route_broadcast(node_t *source, vpn_packet_t *packet) {
if(decrement_ttl && source != myself)
if(!do_decrement_ttl(source, packet))
return;
if(decrement_ttl && source != myself)
if(!do_decrement_ttl(source, packet))
return;
packet->data[31] == 255 &&
packet->data[32] == 255 &&
packet->data[33] == 255)))
packet->data[31] == 255 &&
packet->data[32] == 255 &&
packet->data[33] == 255)))
- broadcast_packet_helper(source, packet);
+ route_broadcast(source, packet);
else
route_ipv4_unicast(source, packet);
}
else
route_ipv4_unicast(source, packet);
}
}
if(broadcast_mode && packet->data[38] == 255)
}
if(broadcast_mode && packet->data[38] == 255)
- broadcast_packet_helper(source, packet);
+ route_broadcast(source, packet);
else
route_ipv6_unicast(source, packet);
}
else
route_ipv6_unicast(source, packet);
}
subnet = lookup_subnet_mac(NULL, &dest);
if(!subnet) {
subnet = lookup_subnet_mac(NULL, &dest);
if(!subnet) {
- broadcast_packet_helper(source, packet);
+ route_broadcast(source, packet);
- broadcast_packet_helper(source, packet);
+ route_broadcast(source, packet);