mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Don't do bindtodevice if --interface option not given.
This commit is contained in:
@@ -453,14 +453,17 @@ void bindtodevice(int fd)
|
|||||||
individual processes don't always see the packets they should.
|
individual processes don't always see the packets they should.
|
||||||
SO_BINDTODEVICE is only available Linux.
|
SO_BINDTODEVICE is only available Linux.
|
||||||
|
|
||||||
Note that if wildcards are used in --interface, or a configured interface doesn't
|
Note that if wildcards are used in --interface, or --interface is not used at all,
|
||||||
yet exist, then more interfaces may arrive later, so we can't safely assert there
|
or a configured interface doesn't yet exist, then more interfaces may arrive later,
|
||||||
is only one interface and proceed.
|
so we can't safely assert there is only one interface and proceed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct irec *iface, *found;
|
struct irec *iface, *found;
|
||||||
struct iname *if_tmp;
|
struct iname *if_tmp;
|
||||||
|
|
||||||
|
if (!daemon->if_names)
|
||||||
|
return;
|
||||||
|
|
||||||
for (if_tmp = daemon->if_names; if_tmp; if_tmp = if_tmp->next)
|
for (if_tmp = daemon->if_names; if_tmp; if_tmp = if_tmp->next)
|
||||||
if (if_tmp->name && (!if_tmp->used || strchr(if_tmp->name, '*')))
|
if (if_tmp->name && (!if_tmp->used || strchr(if_tmp->name, '*')))
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user