projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix all warnings when compiling with -Wall -W -pedantic.
[tinc]
/
src
/
route.c
diff --git
a/src/route.c
b/src/route.c
index
7530e42
..
3e86b40
100644
(file)
--- a/
src/route.c
+++ b/
src/route.c
@@
-632,11
+632,13
@@
static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) {
}
if(!subnet->owner->status.reachable) {
}
if(!subnet->owner->status.reachable) {
- return route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_UNREACH);
+ route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_UNREACH);
+ return;
}
if(forwarding_mode == FMODE_OFF && source != myself && subnet->owner != myself) {
}
if(forwarding_mode == FMODE_OFF && source != myself && subnet->owner != myself) {
- return route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
+ route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
+ return;
}
if(decrement_ttl && source != myself && subnet->owner != myself)
}
if(decrement_ttl && source != myself && subnet->owner != myself)
@@
-656,7
+658,8
@@
static void route_ipv4_unicast(node_t *source, vpn_packet_t *packet) {
}
if(directonly && subnet->owner != via) {
}
if(directonly && subnet->owner != via) {
- return route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
+ route_ipv4_unreachable(source, packet, ether_size, ICMP_DEST_UNREACH, ICMP_NET_ANO);
+ return;
}
if(via && packet->len > MAX(via->mtu, 590) && via != myself) {
}
if(via && packet->len > MAX(via->mtu, 590) && via != myself) {
@@
-723,17
+726,20
@@
static void route_ipv6_unicast(node_t *source, vpn_packet_t *packet) {
}
if(!subnet->owner->status.reachable) {
}
if(!subnet->owner->status.reachable) {
- return route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOROUTE);
+ route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_NOROUTE);
+ return;
}
if(forwarding_mode == FMODE_OFF && source != myself && subnet->owner != myself) {
}
if(forwarding_mode == FMODE_OFF && source != myself && subnet->owner != myself) {
- return route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
+ route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
+ return;
}
}
- if(decrement_ttl && source != myself && subnet->owner != myself)
+ if(decrement_ttl && source != myself && subnet->owner != myself)
{
if(!do_decrement_ttl(source, packet)) {
return;
}
if(!do_decrement_ttl(source, packet)) {
return;
}
+ }
if(priorityinheritance) {
packet->priority = ((packet->data[14] & 0x0f) << 4) | (packet->data[15] >> 4);
if(priorityinheritance) {
packet->priority = ((packet->data[14] & 0x0f) << 4) | (packet->data[15] >> 4);
@@
-747,7
+753,8
@@
static void route_ipv6_unicast(node_t *source, vpn_packet_t *packet) {
}
if(directonly && subnet->owner != via) {
}
if(directonly && subnet->owner != via) {
- return route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
+ route_ipv6_unreachable(source, packet, ether_size, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADMIN);
+ return;
}
if(via && packet->len > MAX(via->mtu, 1294) && via != myself) {
}
if(via && packet->len > MAX(via->mtu, 1294) && via != myself) {