Skip Menu |

This queue is for tickets about the Text-DHCPLeases CPAN distribution.

Report information
The Basics
Id: 123768
Status: new
Priority: 0/
Queue: Text-DHCPLeases

People
Owner: Nobody in particular
Requestors: Francois.Beaulieu [...] sbktelecom.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Problems parsing leases with events
Date: Mon, 27 Nov 2017 23:30:24 +0000
To: "bug-Text-DHCPLeases [...] rt.cpan.org" <bug-Text-DHCPLeases [...] rt.cpan.org>
From: François Beaulieu <Francois.Beaulieu [...] sbktelecom.com>
Hi, ISC-DHCPd configurations which use the "on expiry" and "on release" event statements store the event commands under the lease definitions in the lease file. When this happens Text::DHCPLeases is no longer able to parse the lease file. (See REFERENCE: EVENTS in the dhcpd.conf man file) -=Frank
Subject: [rt.cpan.org #123768] followup information
Date: Mon, 27 Nov 2017 23:34:37 +0000
To: "bug-Text-DHCPLeases [...] rt.cpan.org" <bug-Text-DHCPLeases [...] rt.cpan.org>
From: François Beaulieu <Francois.Beaulieu [...] sbktelecom.com>
Here are examples of the returned error messages when using version 0.9: Text::DHCPLeases::Object::parse Error: Statement not recognized: on expiry { at /usr/share/perl5/Text/DHCPLeases.pm line 148. Text::DHCPLeases::Object::parse Error: Statement not recognized: execute ("/usr/local/bin/echothis", at /usr/share/perl5/Text/DHCPLeases.pm line 148. Text::DHCPLeases::Object::parse Error: Statement not recognized: binary-to-ascii (10, 8, ".", leased-address), "1"); at /usr/share/perl5/Text/DHCPLeases.pm line 148. Text::DHCPLeases::_parse Error: Declaration header not recognized: on release and when using 1.0: Text::DHCPLeases::_parse Error: Declaration header not recognized: 'lease 10.2.0.41'
Subject: Re: [rt.cpan.org #123768] followup information
Date: Tue, 12 Dec 2017 16:56:29 +0000
To: "bug-Text-DHCPLeases [...] rt.cpan.org" <bug-Text-DHCPLeases [...] rt.cpan.org>
From: François Beaulieu <Francois.Beaulieu [...] sbktelecom.com>
I've looked at the code in DHCPLeases/Object.pm and it doesn't appear to be written to handle multi-line event definitions in the lease file, such as I have. example: lease 10.123.123.123 { starts 2 2017/10/24 13:35:52; ends 2 2017/10/24 13:37:52; tstp 3 2017/03/01 22:29:00; tsfp 4 2017/03/02 22:14:00; atsfp 4 2017/03/02 22:14:00; cltt 2 2017/10/24 13:35:52; binding state free; hardware ethernet 00:11:22:aa:bb:cc; uid "\001\000\025e*6\314"; on expiry { execute ("/usr/local/bin/saythis", binary-to-ascii (10, 8, ".", leased-address), "1"); } on release { execute ("/usr/local/bin/saythis", binary-to-ascii (10, 8, ".", leased-address), "2"); } } [cid:3440074292_44049292] François Beaulieu Bureau: 514.667.0691 poste 2061 Courriel: francois.beaulieu@sbktelecom.com<mailto:francois.beaulieu@sbktelecom.com> | web: www.sbktelecom.com<http://www.sbktelecom.com/> On Nov 27, 2017, at 6:34 PM, François Beaulieu <Francois.Beaulieu@sbktelecom.com<mailto:Francois.Beaulieu@sbktelecom.com>> wrote: Here are examples of the returned error messages when using version 0.9: Text::DHCPLeases::Object::parse Error: Statement not recognized: on expiry { at /usr/share/perl5/Text/DHCPLeases.pm line 148. Text::DHCPLeases::Object::parse Error: Statement not recognized: execute ("/usr/local/bin/echothis", at /usr/share/perl5/Text/DHCPLeases.pm line 148. Text::DHCPLeases::Object::parse Error: Statement not recognized: binary-to-ascii (10, 8, ".", leased-address), "1"); at /usr/share/perl5/Text/DHCPLeases.pm line 148. Text::DHCPLeases::_parse Error: Declaration header not recognized: on release and when using 1.0: Text::DHCPLeases::_parse Error: Declaration header not recognized: 'lease 10.2.0.41'
Download image.png
image/png 4.9k
image.png