dhcp-users Digest, Vol 27, Issue 28

Peter Holland pholland at skytap.com
Tue Jan 25 16:44:52 UTC 2011


On Tue, Jan 25, 2011 at 4:00 AM, <dhcp-users-request at lists.isc.org> wrote:

>
> Date: Tue, 25 Jan 2011 12:03:05 +0100
> From: Peter Rathlev <peter at rathlev.dk>
> Subject: Re: error: partial base64 value left over
> To: Users of ISC DHCP <dhcp-users at lists.isc.org>
> Message-ID: <1295953385.7082.28.camel at abehat.dyn.net.rm.dk>
> Content-Type: text/plain; charset="UTF-8"
>
> On Mon, 2011-01-24 at 16:00 -0800, Peter Holland wrote:
> > I have generated a base64 encoded value using python's os.urandom and
> > base64.b64encode functions that causes isc dhcp3-server to fail when
> > it parses it as a HMAC-MD5 key for omapi
> ...
> > The error received is:
> > dhcpd: /var/run/network/505/dhcpd.conf line 14: partial base64 value
> > left over: 14.
> > secret
> > XQhFIJF1HGrlAZKQbIu2VBZxLGXbjEI5Y0VMw0zzoiEyKKw1U/1yTgTVU2nKVjnUdnRHa
> >
> > This is easily reproducible with the clause:
> > key omapi_key {
> >     algorithm HMAC-MD5;
> >
> >  secret
> XQhFIJF1HGrlAZKQbIu2VBZxLGXbjEI5Y0VMw0zzoiEyKKw1U/1yTgTVU2nKVjnUdnRHa+p66+NO+iwteSPRrg==;
> > };
> > omapi-key omapi_key;
>
> Just a shot in the dark, but have you tried quoting the key? That works
> fine for me.
>
> It happens in common/parse.c, but I can't figure out exactly why that
> happens. It could be the tokenization in common/conflex.c.
>
> --
> Peter
>
>
So, yes, quoting the string in the dhcpd.conf file does make the parser
happy.  Thank you for the suggestion.  Much appreciated.
Cheers,
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20110125/8e63445c/attachment.html>


More information about the dhcp-users mailing list