Skip to content

Commit 9ab9396

Browse files
authored
Merge pull request #38 from felix-jia/tunnel-inspection
no tunnel inpection by default.
2 parents d3b4fac + ed02a6e commit 9ab9396

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

ginetflow.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -442,18 +442,22 @@ static gboolean flow_parse_ipv6(GInetTuple * f, const guint8 * data, guint32 len
442442
}
443443
break;
444444
case IP_PROTOCOL_IPV4:
445-
if (!flow_parse_ipv4(f, data, length, fragments, iphr, ts, tcp_flags, tunnel)) {
446-
return FALSE;
447-
}
445+
if (tunnel)
446+
if (!flow_parse_ipv4(f, data, length, fragments, iphr, ts, tcp_flags, tunnel)) {
447+
return FALSE;
448+
}
448449
break;
449450
case IP_PROTOCOL_IPV6:
450-
if (!flow_parse_ipv6(f, data, length, fragments, iphr, ts, tcp_flags, tunnel)) {
451-
return FALSE;
452-
}
451+
if (tunnel)
452+
if (!flow_parse_ipv6(f, data, length, fragments, iphr, ts, tcp_flags, tunnel)) {
453+
return FALSE;
454+
}
453455
break;
454456
case IP_PROTOCOL_GRE:
455457
if (tunnel)
456-
flow_parse_gre(f, data, length, fragments, iphr, ts, tcp_flags);
458+
if (!flow_parse_gre(f, data, length, fragments, iphr, ts, tcp_flags)) {
459+
return FALSE;
460+
}
457461
break;
458462
case IP_PROTOCOL_HBH_OPT:
459463
case IP_PROTOCOL_DEST_OPT:

0 commit comments

Comments
 (0)