'conntrack' output format varies depending on the system
configuration, i.e., conntrack accounting or timestamping is enabled.
Modify the FORMAT_CT() macro to hide these differences.
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
# FORMAT_CT()
#
# Strip content from the piped input which would differ from test to test.
-#
+# Strip also content that depends on the system setup (accounting,
+# timestamping)
m4_define([FORMAT_CT],
[[grep "dst=$1" | sed -e 's/port=[0-9]*/port=<cleared>/g' -e 's/ */ /g' \
-e 's/secctx[^ ]* //' \
+ -e 's/packets=[^ ]* //' \
+ -e 's/bytes=[^ ]* //' \
+ -e 's/packets=[^ ]* //' \
+ -e 's/bytes=[^ ]* //' \
+ -e 's/delta-time=[^ ]* //' \
-e 's/id=[0-9]*/id=<cleared>/g' \
| cut -d' ' -f4- | sort | uniq]])