No empty shared-network allowed version 4.2.4

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

No empty shared-network allowed version 4.2.4

Ryan Gray
Hello humans,

I'm running dhcpd version 4.2.4 on Ubuntu.  My apt history file reports "isc-dhcp-server:amd64 (4.2.4-7ubuntu12.3)".  I have a need for empty shared-network declarations in my dhcpd.conf file.  Like so:

shared-network VIDEO {
}

I could swear dhcpd was perfectly happy with this in the past. However, when I restart the service with an empty shared-network statement now, it fails with these:
Oct 12 19:26:25 goatdev dhcpd: /etc/dhcp/dhcpd.conf line 88: empty shared-network decl
Oct 12 19:26:25 goatdev dhcpd: }
Oct 12 19:26:25 goatdev dhcpd:  ^
Oct 12 19:26:25 goatdev dhcpd: Configuration file errors encountered -- exiting
Oct 12 19:26:25 goatdev dhcpd: Internet Systems Consortium DHCP Server 4.2.4
Oct 12 19:26:25 goatdev dhcpd: Copyright 2004-2012 Internet Systems Consortium.
Oct 12 19:26:25 goatdev dhcpd: All rights reserved.
Oct 12 19:26:25 goatdev dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Oct 12 19:26:25 goatdev dhcpd: /etc/dhcp/dhcpd.conf line 88: empty shared-network decl
Oct 12 19:26:25 goatdev dhcpd: }
Oct 12 19:26:25 goatdev dhcpd:  ^
Oct 12 19:26:25 goatdev dhcpd: Configuration file errors encountered -- exiting
Oct 12 19:26:25 goatdev kernel: [277411.688987] init: isc-dhcp-server pre-start process (7595) terminated with status 1

Am I losing my mind?

Any input would be greatly appreciated!


Regards,
Ryan Gray

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: No empty shared-network allowed version 4.2.4

Simon Hobson
Ryan Gray <[hidden email]> wrote:

I have a need for empty shared-network declarations in my dhcpd.conf file.  Like so:

shared-network VIDEO {
}

Why ?
If it's just a marker for something you may add later, make it into a comment.


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: No empty shared-network allowed version 4.2.4

Ryan Gray
Hi Simon,

Thanks for the reply.  "Why" is a solid question.....There is no function argument for it, of course.  I'm working on a web interface to DHCP (cute, right? I wonder how many times this has been done).  I am writing a fresh dhcpd.conf upon each action taken and then restarting dhcpd.  Adding a shared-network is one of those actions.  So yes, basically just a marker for something the user will be adding later.

Changing the logic to not write and restart upon an addition of just a shared-network isn't that big of a deal.  In fact, if I had identified this earlier in the project, that's exactly what I would have done.  That said, unless I've spent far too much time undercaffeinated, I could swear that dhcpd hasn't had a problem starting with an empty shared-network in the past.  Am I just dreaming that up?  Was there an update that I've missed the docs for that changed the behavior?  Seriously, I am 99% certain that this tested fine previously.....although "previous" to what, I can not answer.

Thanks again for your thoughts.


Regards,
Ryan Gray

On Tue, Oct 13, 2015 at 6:00 AM, Simon Hobson <[hidden email]> wrote:
Ryan Gray <[hidden email]> wrote:

I have a need for empty shared-network declarations in my dhcpd.conf file.  Like so:

shared-network VIDEO {
}

Why ?
If it's just a marker for something you may add later, make it into a comment.


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: No empty shared-network allowed version 4.2.4

glenn.satchell
In reply to this post by Simon Hobson
On Tue, October 13, 2015 10:00 pm, Simon Hobson wrote:

> Ryan Gray <[hidden email]> wrote:
>
>> I have a need for empty shared-network declarations in my dhcpd.conf
>> file.  Like so:
>>
>> shared-network VIDEO {
>> }
>
> Why ?
> If it's just a marker for something you may add later, make it into a
> comment.

My guess is they "fixed" something in the parser. Can you put an empty
subnet declaration in it for a subnet you don't have, eg:

shared-network VIDEO {
  subnet 10.0.0.0 netmask 255.255.255.252 {
  }
}

regards,
-glenn

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: No empty shared-network allowed version 4.2.4

glenn.satchell
On Wed, October 14, 2015 1:29 am, Glenn Satchell wrote:

> On Tue, October 13, 2015 10:00 pm, Simon Hobson wrote:
>> Ryan Gray <[hidden email]> wrote:
>>
>>> I have a need for empty shared-network declarations in my dhcpd.conf
>>> file.  Like so:
>>>
>>> shared-network VIDEO {
>>> }
>>
>> Why ?
>> If it's just a marker for something you may add later, make it into a
>> comment.
>
> My guess is they "fixed" something in the parser. Can you put an empty
> subnet declaration in it for a subnet you don't have, eg:
>
> shared-network VIDEO {
>   subnet 10.0.0.0 netmask 255.255.255.252 {
>   }
> }

This does parse correctly, but I just saw your other message, so this
probably won't help.

The RELNOTES file in the source release lists every change made, so you
can go back looking for changes. Nothing obvious though.

regards,
-glenn

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: No empty shared-network allowed version 4.2.4

Ryan Gray
Yes.  I just tested it myself, and it's happy with an empty subnet.  The ocd monster in me is going to have to go back through the RELNOTES to see if this is documented somewhere.  Either behavior is fine with me;  I was just cranky about the fact that it changed.  The workflow in my application is....

- All DHCP information (settings, shared-networks, class/pool matching, etc.) is in a mysql db.
- Web interface interacts with that db.
- Upon changes in the web interface, a php class (job) is fired off to rewrite the dhcpd.conf based on what's in the db, and then it restarts the dhcpd service.

The only change I had to make was to *not* fire the rewrite/restart job when a shared-network is added.  Probably complete hackery, but it works.

I've been super intrigued to try Kea, but so far all I know about it is "dhcp + mysql".  I'm a little reluctant to jump outside the box of traditional isc dhcp because the people who will be using this interface seem to really like the fact that if the web interface is broken (trust issues!), they can still just hop on and configure things like they do now.  All that said, if Kea is keeping leases in mysql, it would be absolutely priceless to do away completely with caring about parsing dhcpd.leases.....that, my friends, has been the bane of my existence over the years.

Really appreciate your input here.  I haven't been a subscriber to this list in longer than I care to remember, but it's good to be back.

Thanks.


Regards,
Ryan Gray

On Tue, Oct 13, 2015 at 10:12 AM, Glenn Satchell <[hidden email]> wrote:
On Wed, October 14, 2015 1:29 am, Glenn Satchell wrote:
> On Tue, October 13, 2015 10:00 pm, Simon Hobson wrote:
>> Ryan Gray <[hidden email]> wrote:
>>
>>> I have a need for empty shared-network declarations in my dhcpd.conf
>>> file.  Like so:
>>>
>>> shared-network VIDEO {
>>> }
>>
>> Why ?
>> If it's just a marker for something you may add later, make it into a
>> comment.
>
> My guess is they "fixed" something in the parser. Can you put an empty
> subnet declaration in it for a subnet you don't have, eg:
>
> shared-network VIDEO {
>   subnet 10.0.0.0 netmask 255.255.255.252 {
>   }
> }

This does parse correctly, but I just saw your other message, so this
probably won't help.

The RELNOTES file in the source release lists every change made, so you
can go back looking for changes. Nothing obvious though.

regards,
-glenn

_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users


_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users