summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2015-09-01 09:24:30 -0700
committerDavid S. Miller <davem@davemloft.net>2015-09-01 15:06:23 -0700
commit8306b688f1a6621b9efe3b0d827e26750528b12a (patch)
tree81725f39b3e3905ec73e817ccdeeda187a298325 /net
parentb840f28b908da0239c8c5d9c8cae362ad21cda97 (diff)
downloadlinux-stable-8306b688f1a6621b9efe3b0d827e26750528b12a.tar.gz
linux-stable-8306b688f1a6621b9efe3b0d827e26750528b12a.tar.bz2
linux-stable-8306b688f1a6621b9efe3b0d827e26750528b12a.zip
flow_dissector: Add flag to stop parsing at L3
Add an input flag to flow dissector on rather dissection should be stopped when an L3 packet is encountered. This would be useful if a caller just wanted to get IP addresses of the outermost header (e.g. to do an L3 hash). Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/flow_dissector.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 907de2f68b1f..94fd841f341f 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -200,6 +200,9 @@ ip:
}
}
+ if (flags & FLOW_DISSECTOR_F_STOP_AT_L3)
+ goto out_good;
+
break;
}
case htons(ETH_P_IPV6): {
@@ -238,6 +241,9 @@ ipv6:
}
}
+ if (flags & FLOW_DISSECTOR_F_STOP_AT_L3)
+ goto out_good;
+
break;
}
case htons(ETH_P_8021AD):