bryancall opened a new pull request, #14122:
URL: https://github.com/apache/trafficserver/pull/14122
Two ways a config file could abort `traffic_server` at startup with an
uncaught exception.
- **plugin.yaml:** `parse_plugin_yaml` caught YAML errors only while loading
the file. A scalar entry (`- libfoo.so`), a value of the wrong type (`enabled:
maybe`, `load_order: x`), or a document that is not a map threw a yaml-cpp
exception out of startup. Each is now reported through the existing config
error path, naming the entry, the same way a missing `path` is reported. What
happens after the error is unchanged: it is the same as for an entry with no
`path` today.
- **Tunnel pre-warm:** `parse_authority` ran `std::stoi` on everything after
the first `:` of a `forward_route` or `partial_blind_route` destination. With
pre-warming on, a destination sni.yaml documents as valid, such as
`host:{inbound_local_port}`, threw, and so did an empty port and a bracketed
IPv6 address. The destination is now split with `swoc::IPEndpoint::tokenize`,
the same split `TLSTunnelSupport` uses when it asks for a pooled connection,
and the port must be 1 to 65535. A destination with no fixed host and port
can't be pre-warmed, so it is skipped with a Warning naming the sni.yaml entry.
One behavior change to note: a port with trailing characters, such as
`host:443x`, or one above 65535 used to be accepted, since `std::stoi` stops at
the first non-digit and checks no range. It is now skipped with the same
Warning.
New unit tests for both parsers fail without the fix. A new Uranium test
starts `traffic_server` with such destinations and checks it stays up, logs the
warning, and registers pre-warm stats only for the valid route.
Found from two Coverity Scan reports of an uncaught exception.
Tested with ASAN in the fedora:45 CI image: all 1421 unit tests, and 395
Uranium tests for sni, tunnel, plugin and prewarm (387 passed, 8 skipped).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]