Re: [Dnsmasq-discuss] ubus problem

2019-04-27 Thread e9hack
Am 10.04.2019 um 23:56 schrieb Simon Kelley:
> If Harmut's config is unique, and works without openWRT talking to both
> dnsmasq instances, then the solution may be just to turn off ubus on one
> of the dnsmasq instances.

I don't know what openwrt does with the dnsmasq data on ubus. I did turn off 
ubus on one dnsmasq instance.

Regards,
Hartmut



___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] ubus problem

2019-04-11 Thread wkitty42

On 4/10/19 12:55 PM, Jan Willem Janssen wrote:

There's one solution I can think of: making the name under which we register
the UBus object configurable (with "dnsmasq" as default for backwards
compatibility). It would allow multiple instances to be configured each with
their own unique name.


this is exactly what i was thinking of in my post where i mistakenly wrote dbus 
instead of ubus...




We could extend the existing `enable-ubus` flag to allow this name to be
supplied from the command line/configuration file.


exactly the idea i proposed... what's that saying about like minds thinking in 
like manner? ;)



--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list unless*
   *a signed and pre-paid contract is in effect with us.*

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] ubus problem

2019-04-10 Thread Simon Kelley



On 10/04/2019 17:55, Jan Willem Janssen wrote:
> On Mon, 2019-04-08 at 20:41 +0100, Simon Kelley wrote:
>>> I've to give it some thought about how we could support multiple Dnsmasq 
>>> instances in
>>> combination with UBus. Not sure how the DBus implementation would handle 
>>> this...
>>
>> It doesn't: the path is a compile-time parameter.
>>
>> It's not clear that the entities on the other end of the UBus under
>> openwrt could cope with multiple instances. The pragmatic solution might
>> be to turn Ubus off for one of them.
> 
> There's one solution I can think of: making the name under which we register 
> the UBus
> object configurable (with "dnsmasq" as default for backwards compatibility). 
> It would
> allow multiple instances to be configured each with their own unique name.
> 
> We could extend the existing `enable-ubus` flag to allow this name to be 
> supplied from the
> command line/configuration file. 
> 
> @Simon Kelley: WDYT?
> 
> 


See my answer above: Ubus == openWRT and friends. If the infrastructure
in openWRT can talk to multiple dnsmasq instances at different ubus
names, or it's a sensible ambition for it to do so in the future, then
it's good to support it.

If Harmut's config is unique, and works without openWRT talking to both
dnsmasq instances, then the solution may be just to turn off ubus on one
of the dnsmasq instances.

Simon.

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] ubus problem

2019-04-10 Thread Jan Willem Janssen
On Mon, 2019-04-08 at 20:41 +0100, Simon Kelley wrote:
> > I've to give it some thought about how we could support multiple Dnsmasq 
> > instances in
> > combination with UBus. Not sure how the DBus implementation would handle 
> > this...
> 
> It doesn't: the path is a compile-time parameter.
> 
> It's not clear that the entities on the other end of the UBus under
> openwrt could cope with multiple instances. The pragmatic solution might
> be to turn Ubus off for one of them.

There's one solution I can think of: making the name under which we register 
the UBus
object configurable (with "dnsmasq" as default for backwards compatibility). It 
would
allow multiple instances to be configured each with their own unique name.

We could extend the existing `enable-ubus` flag to allow this name to be 
supplied from the
command line/configuration file. 

@Simon Kelley: WDYT?



___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] ubus problem

2019-04-08 Thread wkitty42

On 4/8/19 3:58 PM, wkitt...@gmail.com wrote:
is there some ID or signature that could be used to differentiate between 
separate dnsmasq instances? if so, one could specify that in the config and that 
could be used with dbus to separate the instances and how they communicate...



i mixed up ubus and dbus... sorry about that...

i still wonder if something like this might help with the problem, though...


--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list unless*
   *a signed and pre-paid contract is in effect with us.*

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] ubus problem

2019-04-08 Thread wkitty42

On 4/8/19 1:52 PM, Jan Willem Janssen wrote:

I've to give it some thought about how we could support multiple Dnsmasq
instances in combination with UBus. Not sure how the DBus implementation
would handle this...


is there some ID or signature that could be used to differentiate between 
separate dnsmasq instances? if so, one could specify that in the config and that 
could be used with dbus to separate the instances and how they communicate...


we have to do similar for snort (IDS/IPS) instances running on the same machine 
or feeding their logs to a central analysis tool...



--
 NOTE: No off-list assistance is given without prior approval.
   *Please keep mailing list traffic on the list unless*
   *a signed and pre-paid contract is in effect with us.*

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] ubus problem

2019-04-08 Thread Simon Kelley



> 
> I've to give it some thought about how we could support multiple Dnsmasq 
> instances in
> combination with UBus. Not sure how the DBus implementation would handle 
> this...

It doesn't: the path is a compile-time parameter.

It's not clear that the entities on the other end of the UBus under
openwrt could cope with multiple instances. The pragmatic solution might
be to turn Ubus off for one of them.



Simon.


> 
> Regards,
> 
>   Jan Willem
> 
> 
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] ubus problem

2019-04-08 Thread Jan Willem Janssen
Hi,

On Mon, 2019-04-08 at 16:24 +0200, e9hack wrote:
> From the first I see:
> daemon.info dnsmasq[1808]: Connected to system UBus
> daemon.info dnsmasq[1808]: UBus support enabled: connected to system bus
> 
> From the second I see:
> daemon.err dnsmasq[1809]: Cannot add object to UBus: Invalid argument
> daemon.info dnsmasq[1809]: UBus support enabled: bus connection pending
> 
> Sometimes, the starting sequence is inverted. The error occurs all the time 
> on the
> seconded started instance only.
> 
> This occurs since this commit:
> 
> commit  a2b8220f4e82e454bbc0013ee83ea3220111d92e
> Improved UBus supported

I proposed that change. The reason you see this now is that I've added extra 
logging to
the results of the various UBus operations. Previously, UBus failures were 
simply ignored
giving you no clue as to why it did not work. 

>From your description it is quite easy to explain what is happening here: UBus 
>prevents
you from registering objects with duplicate names: hence the "invalid argument" 
message.

I've to give it some thought about how we could support multiple Dnsmasq 
instances in
combination with UBus. Not sure how the DBus implementation would handle this...

Regards,

  Jan Willem



___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] ubus problem

2019-04-08 Thread Simon Kelley
@Jan?

(I suspect that nothing has changed, except that a previously silent
error is now no longer silent, but it would be nice to confirm this, and
maybe explicitly consider this case.)

Simon



On 08/04/2019 15:24, e9hack wrote:
> Hi,
> 
> I'm using the latest dnsmasq version with openwrt. There are two instances 
> running. One provides dhcpv4, dhcpv6 and dns
> to several networks, the other one dhcpv4 to one network only. It looks like, 
> that the second instance has a problem
> with ubus:
> 
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: Connected to system UBus
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: started, version 
> 2.80-52-ga2b8220 cachesize 300
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: compile time options: 
> IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN
> DHCP DHCPv6 no-Lua no-TFTP no-conntrack no-ipset auth DNSSEC no-ID 
> loop-detect inotify dumpfile
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: UBus support enabled: 
> connected to system bus
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: DNSSEC validation enabled
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: DNSSEC signature 
> timestamps not checked until receipt of SIGINT
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: configured with trust 
> anchor for  keytag 20326
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: configured with trust 
> anchor for  keytag 19036
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: using only locally-known 
> addresses for domain test
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: using only locally-known 
> addresses for domain onion
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: using only locally-known 
> addresses for domain localhost
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: using only locally-known 
> addresses for domain local
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: using only locally-known 
> addresses for domain invalid
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: using only locally-known 
> addresses for domain bind
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: using nameserver 
> 2a02:::::::#53
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: using nameserver 
> 46.zzz.zzz.zzz#53
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: using nameserver 
> 2a03:::::::#53
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: using nameserver 
> 146.zzz.zzz.zzz#53
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: using only locally-known 
> addresses for domain lan
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: read /etc/hosts - 4 
> addresses
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1808]: read /tmp/hosts/dhcp.main 
> - 29 addresses
> Sun Apr  7 18:37:34 2019 daemon.err dnsmasq[1809]: Cannot add object to UBus: 
> Invalid argument
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1809]: started, version 
> 2.80-52-ga2b8220 DNS disabled
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1809]: compile time options: 
> IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN
> DHCP DHCPv6 no-Lua no-TFTP no-conntrack no-ipset auth DNSSEC no-ID 
> loop-detect inotify dumpfile
> Sun Apr  7 18:37:34 2019 daemon.info dnsmasq[1809]: UBus support enabled: bus 
> connection pending
> 
>>From the first I see:
> daemon.info dnsmasq[1808]: Connected to system UBus
> daemon.info dnsmasq[1808]: UBus support enabled: connected to system bus
> 
>>From the second I see:
> daemon.err dnsmasq[1809]: Cannot add object to UBus: Invalid argument
> daemon.info dnsmasq[1809]: UBus support enabled: bus connection pending
> 
> Sometimes, the starting sequence is inverted. The error occurs all the time 
> on the seconded started instance only.
> 
> This occurs since this commit:
> 
> commita2b8220f4e82e454bbc0013ee83ea3220111d92e
> Improved UBus supported
> 
> Regards,
> Hartmut
> 
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss