submariner-io/lighthouse

Explicit fallthrough is needed while request does not match configured zones

juju812 opened this issue · 6 comments

While demonstrating #954, I found that explicit fallthrough is needed while request does not match configured zones, and this is different with behavior of kubernetes and multicluster. If fallthrough not configured, NOTZONE will be returned.

I found this change is introduced by 744b666. Could you please kindly clarify if there's any specific consideration, or we can just align the code with kubernetes :

func (lh *Lighthouse) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
	...
	// qname: mysvc.default.svc.example.org.
	// zone:  example.org.
	// Matches will return zone in all lower cases
	zone := plugin.Zones(lh.Zones).Matches(qname)
	if zone == "" {
		// implicit fallthrough while request does not match configured zones
		return plugin.NextOrFailure(lh.Name(), lh.Next, ctx, w, r)
	}
       ...
}
stale commented

This issue has been automatically marked as stale because it has not had activity for 60 days. It will be closed if no further activity occurs. Please make a comment if this issue/pr is still valid. Thank you for your contributions.

stale commented

This issue has been automatically marked as stale because it has not had activity for 60 days. It will be closed if no further activity occurs. Please make a comment if this issue/pr is still valid. Thank you for your contributions.

skitt commented

@vthapar can you take a look at this?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further
activity occurs. Thank you for your contributions.