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

Don't accept queries arriving on alias interface if configured not to do this. #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Dec 20, 2021

I found the following bug/misbehavior (whatever you wanna call it):

Real interface is eth0. an alias is created as eth0:0

  1. Config --interface=eth0
    Queries on eth0 and eth0:0 are accepted because dnsmasq only
    compares the physical interface name string.

  2. Config --interface=eth0:0
    Queries on eth0 and eth0:0 are rejected (at first!) because of
    the physical interface's name mismatch. But there is another
    check "label_expection()" that does said iteration and would lead
    to accepting the eth0:0 query. The eth0 query is correctly
    rejected.

In an ideal world, we should reject also the eth0:0 query when
configured with "--interface=eth0". It can rather easily be done
when comparing the configured interface's IP addresses instead of
the name strings (or ifindex).
When doing this, the warn_wild_listeners() can be dropped
altogether as the strange behavior we used to warn about is
fixed.

The patch addresses this.

https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2021q4/015938.html

…interfaces to extend their scope to interface aliases. The man page does not mention that they are limited to "real" interfaces and stop working once an alias interface is specified (even if valid).

Signed-off-by: DL6ER <[email protected]>
@DL6ER
Copy link
Member Author

DL6ER commented Jan 9, 2022

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

Successfully merging this pull request may close these issues.

1 participant