summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2020-11-02 14:53:26 +0100
committerFlorian Westphal <fw@strlen.de>2020-11-09 12:19:24 +0100
commit41158e0388ac56380fc0ee301f0d43f95ec43fab (patch)
treeaa970b7dcf43bc7c1c150cc166701944602beb95 /src/scanner.l
parent2a9aea6f2dfb6ee61528809af98860e06b38762b (diff)
tcpopts: clean up parser -> tcpopt.c plumbing
tcpopt template mapping is asymmetric: one mapping is to match dumped netlink exthdr expression to the original tcp option template. This struct is indexed by the raw, on-write kind/type number. The other mapping maps parsed options to the tcp option template. Remove the latter. The parser is changed to translate the textual option name, e.g. "maxseg" to the on-wire number. This avoids the second mapping, it will also allow to more easily support raw option matching in a followup patch. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 516c648f..8bde1fbe 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -423,7 +423,8 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr})
"eol" { return EOL; }
"maxseg" { return MSS; }
"mss" { return MSS; }
-"noop" { return NOOP; }
+"nop" { return NOP; }
+"noop" { return NOP; }
"sack" { return SACK; }
"sack0" { return SACK0; }
"sack1" { return SACK1; }