Mageia Bugzilla – Attachment 5262 Details for
Bug 13685
Fix for seeing \x00 (repeated several times) instead of Mac address of a hidden network
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
workaround
13685.diff (text/plain), 603 bytes, created by
Thierry Vignaud
on 2014-07-06 23:38:28 CEST
(
hide
)
Description:
workaround
Filename:
MIME Type:
Creator:
Thierry Vignaud
Created:
2014-07-06 23:38:28 CEST
Size:
603 bytes
patch
obsolete
>diff --git a/mdk-stage1/dns.c b/mdk-stage1/dns.c >index f711758..0eb7d33 100644 >--- a/mdk-stage1/dns.c >+++ b/mdk-stage1/dns.c >@@ -33,6 +35,8 @@ > > #include "dns.h" > >+static int initialized = 0; >+ > int mygethostbyname(char * name, struct in_addr * addr) > { > struct addrinfo hints, *res, *p; >@@ -43,6 +47,10 @@ int mygethostbyname(char * name, struct in_addr * addr) > hints.ai_family = AF_INET; //AF_UNSPEC for both IPv4 & IPv6 > hints.ai_socktype = SOCK_STREAM; > >+ if (!initialized) { >+ initialized = 1; >+ res_init(); >+ } > /* prevent from timeouts */ > if (_res.nscount == 0) > return -1;
diff --git a/mdk-stage1/dns.c b/mdk-stage1/dns.c index f711758..0eb7d33 100644 --- a/mdk-stage1/dns.c +++ b/mdk-stage1/dns.c @@ -33,6 +35,8 @@ #include "dns.h" +static int initialized = 0; + int mygethostbyname(char * name, struct in_addr * addr) { struct addrinfo hints, *res, *p; @@ -43,6 +47,10 @@ int mygethostbyname(char * name, struct in_addr * addr) hints.ai_family = AF_INET; //AF_UNSPEC for both IPv4 & IPv6 hints.ai_socktype = SOCK_STREAM; + if (!initialized) { + initialized = 1; + res_init(); + } /* prevent from timeouts */ if (_res.nscount == 0) return -1;
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 13685
:
5262
|
6354
|
6355
|
6363
|
6364
|
6365
|
6366
|
6367
|
6368
|
9207
|
9208
|
9217
|
9218
|
9349