Fix regression in --rebind-domain-ok in 2.86
authorSimon Kelley <simon@thekelleys.org.uk>
Wed, 8 Dec 2021 23:51:38 +0000 (23:51 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Wed, 8 Dec 2021 23:51:38 +0000 (23:51 +0000)
commit1176cd58c90fc37bf98a6f774b26fc1adc8fd8e9
tree6949e13c032b57921c131dbe1019a6aa271d49ab
parent44a4643b620a86f1dea25235db1d4e75d21b4727
Fix regression in --rebind-domain-ok in 2.86

The 2.86 domain-match rewrite changed matching from
whole-labels to substring matching, so example.com
would match example.com and www.example.com, as before,
but also goodexample.com, which is a regression. This
restores the original behaviour.

Also restore the behaviour of --rebind-domain-ok=//
to match domains with onlt a single label and no dots.

Thanks to Sung Pae for reporting these bugs and supplying
an initial patch.
src/forward.c