Skip to content

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

@lambdai

Description

@lambdai
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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions