[Dnsmasq-discuss] patch proposal: getent support for ethers

Gabriel Winckler winckler at campogeral.com.br
Thu Jun 25 22:20:04 BST 2009


Hi,

I'm new around here, so I'm not sure if this message belongs to this list.

I made a patch for dnsmasq, allowing dynamic query the ether
information using getent calls.

My goal is use dnsmasq in a large cluster deployment (exactly the
original goal of this code), providing DHCP using LDAP as the backend
server.
Many people have asked for a DHCP server with LDAP support, but nobody
make that happen (at least, not with dynamic updates).

Since this is the best DHCP server code on the market (I tried to
implement this using the ISC... not a happy story), I propose a patch.

Just to clarify my plan:

- Store the MAC/IP information on a LDAP server.
- Configure libnss to access this information (yes, libnss provide
infrastructure for the /etc/ethers file)
- Access the data in dnsmasq using getent.

So, no need to link, call or configure LDAP in dnsmasq.

The drawback is the slowdown (I know, this is why dnsmasq read the
ethers file only during the initialization) of nss queries.

So, I'm submitting a draft patch, that adds this support. In my tests,
everything works (with LDAP!).

** I'm a sysadmin, not a C programmer. **
Feel free to change this patch or express how bad I code.

This patch is for the 2.50test3 revision. (Is there a code repository
somewhere?)

Is this a interesting feature? Any chances of something like this to
be included?
If so, we may need a option "getent-ethers", or something.

Thanks,

Winckler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dnsmasq-ether-getent.patch
Type: text/x-patch
Size: 2522 bytes
Desc: not available
Url : http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20090625/8243e2b1/attachment.bin 


More information about the Dnsmasq-discuss mailing list