[Dibbler] Patch for resolv.conf update
MINODIER David RD-RESA-LAN
david.minodier at orange-ftgroup.com
Tue Mar 27 10:42:11 CEST 2007
Hi,
a little patch regarding the update of resolv.conf.
If resolv.conf is not empty before dibbler-client is ran (multiple NICs
for example) :
term1:/etc/dibbler# cat /etc/resolv.conf search xxxx.yyyy.fr nameserver
192.168.10.10
there are some \n and space problems when dibbler-client has been
returned DNS servers and domains:
term1:/etc/dibbler# cat /etc/resolv.conf search xxxx.yyyy.fr
ligne2.example.comnameserver 192.168.10.10 nameserver 2000::1
And when dibbler-client is stopped, the resolv.conf is bugged:
term1:/etc/dibbler# cat /etc/resolv.conf search xxxx.yyyy.frnameserver
192.168.10.10
Here's the patch, that should be applied to
Port-linux/lowlevel-options-linux.c
It only concerns the Linux-port i'm afraid. I haven't tested the other
platforms at all.
(.ORI is the original dibbler)
---
./dibbler-CVS-0.6-RC3-14-03-2007.ORI/Port-linux/lowlevel-options-linux.c
2007-03-23 11:22:25.000000000 +0100
+++
./dibbler-CVS-0.6-RC3-14-03-2007/Port-linux/lowlevel-options-linux.c
2007-03-23 17:39:49.000000000 +0100
@@ -93,7 +93,7 @@ int domain_add(const char* ifname, int i
if ( (!found) && (strstr(buf, "search")) ) {
if (strlen(buf))
buf[strlen(buf)-1]=0;
- fprintf(f2, "%s %s", buf, domain);
+ fprintf(f2, "%s %s\n", buf, domain);
found = 1;
continue;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_dns_update_resolv.conf.diff
Type: application/octet-stream
Size: 508 bytes
Desc: patch_dns_update_resolv.conf.diff
Url : http://klub.com.pl/pipermail/dibbler/attachments/20070327/e307ac4b/attachment.obj
More information about the Dibbler
mailing list