Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 604102 Details for
Bug 847892
CNTLM : Parent proxy drop connection
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patchfile that solve the problem
cntlm-0.92-forward.c.patch (text/plain), 2.12 KB, created by
Fabiano Martins
on 2012-08-13 22:31:49 UTC
(
hide
)
Description:
Patchfile that solve the problem
Filename:
MIME Type:
Creator:
Fabiano Martins
Created:
2012-08-13 22:31:49 UTC
Size:
2.12 KB
patch
obsolete
>--- cntlm-0.92.orig/forward.c 2011-11-28 11:55:15.000000000 -0200 >+++ cntlm-0.92-paradigma/forward.c 2012-08-13 12:32:06.912518994 -0300 >@@ -297,6 +297,7 @@ > * thread_data is NOT freed > * request is NOT freed > */ >+#define MAX_RETRYS 5 > rr_data_t forward_request(void *thread_data, rr_data_t request) { > int i, w, loop, plugin, retry = 0; > int *rsocket[2], *wsocket[2]; >@@ -314,6 +315,7 @@ > int sd; > int cd = ((struct thread_arg_s *)thread_data)->fd; > struct sockaddr_in caddr = ((struct thread_arg_s *)thread_data)->addr; >+ int retry_count = 0; > > beginning: > sd = was_cached = noauth = authok = conn_alive = proxy_alive = 0; >@@ -322,7 +324,20 @@ > rsocket[1] = wsocket[0] = &sd; > > if (debug) { >- printf("Thread processing%s...\n", retry ? " (retry)" : ""); >+ if (!retry) >+ printf("Thread processing...\n"); >+ /* >+ * retry_count will be 0 when proxy response is "407 denied" >+ * in this case no retry limit >+ */ >+ else if (retry_count == 0) >+ printf("Thread processing (retry)...\n"); >+ /* >+ * retry_count will be not 0 when a buggy proxy drop connection >+ * in this case, the retry times occur MAX_RETRYS times >+ */ >+ else >+ printf("Thread processing (retry %d/%d)...\n", retry_count, MAX_RETRYS); > plist_dump(connection_list); > } > >@@ -613,11 +628,30 @@ > * the 3rd, final, NTLM message. > */ > if (!headers_send(*wsocket[loop], data[loop])) { >- free_rr_data(data[0]); >- free_rr_data(data[1]); >- rc = (void *)-1; >- /* error page */ >- goto bailout; >+ >+ /* >+ * some parent proxies drop connection: on several cases auto retry solve >+ * it problem the first retry wait 200ms, second 400ms, and so on >+ */ >+ if ( retry_count <= MAX_RETRYS ) { >+ retry_count++; >+ if (tcreds) >+ free(tcreds); >+ retry = 1; >+ request = data[0]; >+ free_rr_data(data[1]); >+ close(sd); >+ usleep(200 * retry_count); >+ goto beginning; >+ } >+ else { >+ printf("max retrys reached: aborting..."); >+ free_rr_data(data[0]); >+ free_rr_data(data[1]); >+ rc = (void *)-1; >+ /* error page */ >+ goto bailout; >+ } > } > } >
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 847892
: 604102