projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
696dc2a
)
Merge remote-tracking branch 'dechamps/ipip' into 1.1
author
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 5 Jan 2018 18:58:28 +0000
(19:58 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Fri, 5 Jan 2018 18:58:28 +0000
(19:58 +0100)
src/route.c
patch
|
blob
|
history
diff --git
a/src/route.c
b/src/route.c
index
a130e69
..
92dc1cd
100644
(file)
--- a/
src/route.c
+++ b/
src/route.c
@@
-406,6
+406,15
@@
static void clamp_mss(const node_t *source, const node_t *via, vpn_packet_t *pac
type = DATA(packet)[16] << 8 | DATA(packet)[17];
}
+ /* IP in IP (RFC 2003) packet */
+ if(type == ETH_P_IP && DATA(packet)[start + 9] == 4) {
+ start += 20;
+ }
+
+ if(packet->len <= start + 20) {
+ return;
+ }
+
if(type == ETH_P_IP && DATA(packet)[start + 9] == 6) {
start += (DATA(packet)[start] & 0xf) * 4;
} else if(type == ETH_P_IPV6 && DATA(packet)[start + 6] == 6) {