TCP options parsing doesn't support an option appearing more than once
If the TCP options parser sees the same option multiple times, the last one will win. This is not a problem for TFO as specified, but it may be for future things we want to observe with the same options parser (e.g. MPTCP, TCPENO).
# copy options data into hash
# FIXME doesn't handle multiples
opthash[optbytes[cp]] = optbytes[cp+2:ncp]
"multiples" here means "a TCP option that appears multiple times" -- if this parser sees the same option multiple times, the last one will win. This is not a problem for TFO as specified, but it may be for future things we want to observe with the same options parser (e.g. MPTCP, TCPENO).
Ok, now I've read the code I understand this a lot better. The option number is used as a hash index which then means that there can only be one. Instead, the option number can be used as a hash index for an array which contains the contents as long as this doesn't cause a massive decrease in performance. If it does, we can selectively do that for options that we think would have multiples.