-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conntrack fails if net.netfilter.nf_conntrack_acct = 1 #2117
Comments
Well spotted! PR? |
It also fails on Fedora because of SELinux being enabled:
|
All these just seem to add some stuff to the end. Is our parser really so sensitive to trip over that? |
After #2095, the parser is 3 different But unfortunately, we need the last field ( I could try to parse differently (with strings.Split, etc.) and check if the performance does not regress to how it was before with xml. |
TODO: - [ ] don't recompile the regexp for each line - [ ] test under different configuration (SELinux, nf_conntrack_acct) - [ ] check performances compared to sscanf and xml Fixes weaveworks#2117
TODO: - [ ] test under different configuration (SELinux, nf_conntrack_acct) - [ ] check performances compared to sscanf and xml Fixes weaveworks#2117
With net.netfilter.nf_conntrack_acct = 1, conntrack adds the following fields in the output: packets=3 bytes=164 And with SELinux (e.g. Fedora), conntrack adds: secctx=... The parsing with fmt.Sscanf introduced in weaveworks#2095 was unfortunately rejecting lines with those fields. This patch fixes that by adding more complicated parsing in decodeTwoTuples() with FieldsFunc and SplitN. Fixes weaveworks#2117 Regression from weaveworks#2095
With net.netfilter.nf_conntrack_acct = 1, conntrack adds the following fields in the output: packets=3 bytes=164 And with SELinux (e.g. Fedora), conntrack adds: secctx=... The parsing with fmt.Sscanf introduced in weaveworks#2095 was unfortunately rejecting lines with those fields. This patch fixes that by adding more complicated parsing in decodeFlowKeyValues() with FieldsFunc and SplitN. Fixes weaveworks#2117 Regression from weaveworks#2095
This adds more information to the conntrack lines ("packets" and "bytes") which breaks the line parser introduced in #2095:
The text was updated successfully, but these errors were encountered: