Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 221799 Details for
Bug 307489
net-dialup/xl2tpd gethostbyname patch
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
gethostbyname patch
xl2tpd-1.2.3-gethostbyname.patch (text/plain), 1.37 KB, created by
Ivan Ponomarev
on 2010-03-02 14:26:04 UTC
(
hide
)
Description:
gethostbyname patch
Filename:
MIME Type:
Creator:
Ivan Ponomarev
Created:
2010-03-02 14:26:04 UTC
Size:
1.37 KB
patch
obsolete
>--- xl2tpd-1.2.3/xl2tpd.c.orig 2007-10-20 08:22:55.000000000 +0400 >+++ xl2tpd-1.2.3/xl2tpd.c 2008-06-30 20:58:14.000000000 +0400 >@@ -584,9 +584,33 @@ > hp = gethostbyname (host); > if (!hp) > { >- l2tp_log (LOG_WARNING, "Host name lookup failed for %s.\n", >- host); >- return NULL; >+ if ( lac->redial ) >+ { >+ int imax=lac->rmax; >+ if ( lac->rmax == 0 ) >+ imax = 1; >+ while ( imax > 0 ) >+ { >+ hp = gethostbyname ( host ); >+ if ( hp ) >+ break; >+ l2tp_log ( LOG_WARNING, "Y: Host name lookup failed for %s. Trying to look again in %d seconds.\n", host, lac->rtimeout ); >+ if ( lac->rtimeout > 0 ) >+ sleep ( lac->rtimeout ); >+ if ( lac->rmax > 0 ) >+ imax--; >+ } >+ if ( ( imax == 0 ) && ( lac->rmax > 0 ) ) >+ { >+ l2tp_log ( LOG_WARNING, "Y: Host name lookup failed for %s after %d tries. Lookup stops now.\n", host, lac->rmax ); >+ return NULL; >+ } >+ } >+ else >+ { >+ l2tp_log (LOG_WARNING, "Host name lookup failed for %s.\n", host); >+ return NULL; >+ } > } > bcopy (hp->h_addr, &addr, hp->h_length); > /* Force creation of a new tunnel
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 307489
: 221799 |
221801