error: partial base64 value left over

Peter Rathlev peter at
Tue Jan 25 11:03:05 UTC 2011

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
> 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.


More information about the dhcp-users mailing list