Re: [Dnsmasq-discuss] dnsmasq coding style, trailing white space

2019-09-27 Thread Geert Stappers
On Fri, Sep 27, 2019 at 07:23:53AM +0200, john doe wrote:
> On 9/26/2019 7:47 PM, Maarten de Vries wrote:
> > On 26-09-2019 18:03, Kurt H Maier wrote:
> >> On Thu, Sep 26, 2019 at 03:10:00PM +0300, Ariel Miculas wrote:
> >>> What about the issue regarding trailing whitespaces? There are empty
> >>> lines
> >>> which have random tabs/spaces, also there are spaces before newline
> >>> characters.
> >>> What is the rationale against removing trailing whitespaces?
> >> This stuff only matters if your tooling is broken.
> >>
> >
> > Which is my it matters for open source projects. There will be people
> > with broken tooling that commit trailing whitespace.
> >
> 
> That is the issue,
> simply use a hook to avoied that 'pre-commit' in this case.

Please elaborate that.
So that further adding of trailing white spaces can be avoided.



  git log -p 90d7c6b97dbae2c913e...90d7c6b97dbae2c913e~1
shows at my screen many green lines for added lines
plus a red block indicating "WARNING, here is trailing white space"

Commit 90d7c6b97dbae2c913 is currently the most recent commit.
In others words: It make sense to tell right now how to
avoid trailing white space. It is not an old mistake.


Groeten
Geert Stappers
-- 
Leven en laten leven

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


Re: [Dnsmasq-discuss] DHCP: Allocate from different IP pools depending on MAC address

2019-09-27 Thread john doe
On 9/27/2019 3:04 PM, Olivier wrote:
> Hello,
>
> I've got several Debian hosts using ISC DHCP server.
>
> In those, I'm currently using the following feature:
> "when a requesting host MAC address ends with 00, use group 0
> when a requesting host MAC address ends with 01, use group 1
> when a requesting host MAC address ends with 02, use group 0
> when a requesting host MAC address ends with 03 use group 1
> ...
> when a requesting host MAC address ends with ff, use group 1
> for hosts from group 0, allocate from pool 192.168.1.1-50
> for hosts from group 1, allocate from pool 192.168.1.101-150"
>
> In dhcpd.configuration, this translates to
> class "guest0" {
>match suffix(hardware, 1);
> }
>
> class "guest1" {
>match suffix(hardware, 1);
> }
>
> subclass "guest0" 00;
> subclass "guest1" 01;
> subclass "guest0" 02;
> subclass "guest1" 03;
> ...
>  pool {
>  allow members of "guest0";
>  range 192.168.1.1-50 192.168.1.50;
>   }
>   pool {
>  allow members of "guest1";
>  range 192.168.1.101 192.168.1.150;
>   }
>
> As you may guess, requesting devices are unknown when DHCP server is
> configured and using two different IP pools allows rough dispatching
> devices among available WAN links.
>
> Is it something that can be reproduced with Dnsmasq ?
> Suggestions ?
>

I guess a conbination of tags and wildcard in 'dhcp-host' option should
do what you want.

--
John Doe

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


[Dnsmasq-discuss] DHCP: Allocate from different IP pools depending on MAC address

2019-09-27 Thread Olivier
Hello,

I've got several Debian hosts using ISC DHCP server.

In those, I'm currently using the following feature:
"when a requesting host MAC address ends with 00, use group 0
when a requesting host MAC address ends with 01, use group 1
when a requesting host MAC address ends with 02, use group 0
when a requesting host MAC address ends with 03 use group 1
...
when a requesting host MAC address ends with ff, use group 1
for hosts from group 0, allocate from pool 192.168.1.1-50
for hosts from group 1, allocate from pool 192.168.1.101-150"

In dhcpd.configuration, this translates to
class "guest0" {
   match suffix(hardware, 1);
}

class "guest1" {
   match suffix(hardware, 1);
}

subclass "guest0" 00;
subclass "guest1" 01;
subclass "guest0" 02;
subclass "guest1" 03;
...
 pool {
 allow members of "guest0";
 range 192.168.1.1-50 192.168.1.50;
  }
  pool {
 allow members of "guest1";
 range 192.168.1.101 192.168.1.150;
  }

As you may guess, requesting devices are unknown when DHCP server is
configured and using two different IP pools allows rough dispatching
devices among available WAN links.

Is it something that can be reproduced with Dnsmasq ?
Suggestions ?

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