Skip to content
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

Setting Default filter chain but no common filter chains should not "no filter chains specified" exception #13685

Closed
lambdai opened this issue Oct 21, 2020 · 2 comments · Fixed by #14025
Assignees

Comments

@lambdai
Copy link
Contributor

lambdai commented Oct 21, 2020

void ListenerImpl::validateFilterChains(Network::Socket::Type socket_type) {
  if (config_.filter_chains().empty() && (socket_type == Network::Socket::Type::Stream ||
                                          !udp_listener_factory_->isTransportConnectionless())) {
    // If we got here, this is a tcp listener or connection-oriented udp listener, so ensure there
    // is a filter chain specified
    throw EnvoyException(fmt::format("error adding listener '{}': no filter chains specified",
                                     address_->asString()));

Work around: create a never hit filter chain in listener.

Need to add tests coverage also validate that the rest of the code could tolerate empty common filter chain collection.

@lambdai lambdai added enhancement Feature requests. Not bugs or questions. triage Issue requires triage labels Oct 21, 2020
@lambdai
Copy link
Contributor Author

lambdai commented Oct 21, 2020

The latter case could be

  if (PROTOBUF_GET_WRAPPED_OR_DEFAULT(config_.filter_chains()[0], use_proxy_proto, false)) {

@mattklein123 mattklein123 added area/connection and removed enhancement Feature requests. Not bugs or questions. triage Issue requires triage labels Oct 24, 2020
@shashankram
Copy link

Has this fix made it into any envoy release yet? Will this be a part of 1.16.x or 1.17?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants