ALT Linux Bugzilla
– Attachment 2914 Details for
Bug 17136
dhcpcd портит resolv.conf
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
The patch which resolved an issue for me.
dhcpcd-3.0.17-alt-resolvconf.patch (text/plain), 1.62 KB, created by
Dmitry Mukhoedov
on 2008-09-15 21:10:37 MSD
(
hide
)
Description:
The patch which resolved an issue for me.
Filename:
MIME Type:
Creator:
Dmitry Mukhoedov
Created:
2008-09-15 21:10:37 MSD
Size:
1.62 KB
patch
obsolete
>diff -Nrua dhcpcd-3.0.17.orig/configure.c dhcpcd-3.0.17/configure.c >--- dhcpcd-3.0.17.orig/configure.c 2007-05-21 15:05:01 +0400 >+++ dhcpcd-3.0.17/configure.c 2008-09-11 21:26:25 +0400 >@@ -137,9 +137,9 @@ > > if (f) { > fprintf (f, "# Generated by dhcpcd for interface %s\n", ifname); >- if (dhcp->dnssearch) >+ if (dhcp->dnssearch && *dhcp->dnssearch) > fprintf (f, "search %s\n", dhcp->dnssearch); >- else if (dhcp->dnsdomain) { >+ else if (dhcp->dnsdomain && *dhcp->dnsdomain) { > fprintf (f, "search %s\n", dhcp->dnsdomain); > } > >diff -Nrua dhcpcd-3.0.17.orig/dhcp.c dhcpcd-3.0.17/dhcp.c >--- dhcpcd-3.0.17.orig/dhcp.c 2007-05-21 15:05:01 +0400 >+++ dhcpcd-3.0.17/dhcp.c 2008-09-11 21:25:59 +0400 >@@ -589,6 +589,7 @@ > > #define GETSTR(_var) \ > MIN_LENGTH (sizeof (char)); \ >+ if (*(char*)p == '\0') continue; \ > if (_var) free (_var); \ > _var = xmalloc (length + 1); \ > memcpy (_var, p, length); \ >@@ -632,7 +633,8 @@ > MIN_LENGTH (1); > if (dhcp->dnssearch) > free (dhcp->dnssearch); >- if ((len = decode_search (p, length, NULL)) > 0) { >+ /* FIXME: decode_search() also reserves space for '\0' */ >+ if ((len = decode_search (p, length, NULL)) > 1) { > dhcp->dnssearch = xmalloc (len); > decode_search (p, length, dhcp->dnssearch); > } >diff -Nrua dhcpcd-3.0.17.orig/interface.c dhcpcd-3.0.17/interface.c >--- dhcpcd-3.0.17.orig/interface.c 2007-05-21 15:05:01 +0400 >+++ dhcpcd-3.0.17/interface.c 2008-09-11 21:28:40 +0400 >@@ -142,7 +142,7 @@ > if (! ifname) > return NULL; > >- memset (hwaddr, sizeof (hwaddr), 0); >+ memset (hwaddr, 0, sizeof (hwaddr)); > > #ifndef __linux__ > if (getifaddrs (&ifap) != 0)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 17136
: 2914