Revision: 14912
Author:   adrian.chadd
Date:     Mon Jul 11 02:48:33 2011
Log:      This is one of the silly issues with my approach to doing
multi-protocol connection handling: the hierarchy note
can't be set on a connection failure because the source
address could be either v4/v6.


http://code.google.com/p/lusca-cache/source/detail?r=14912

Modified:
 /playpen/LUSCA_HEAD_ipv6/src/forward.c

=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/forward.c      Sun Jul 10 07:10:45 2011
+++ /playpen/LUSCA_HEAD_ipv6/src/forward.c      Mon Jul 11 02:48:33 2011
@@ -354,7 +354,16 @@
        return;
     }

- if (Config.onoff.log_ip_on_direct && status != COMM_ERR_DNS && fs->code == HIER_DIRECT)
+    /*
+     * server_fd may now not exist at this point; so we can't set the
+     * 'ipaddrstr'. We should likely store a copy of the v4/v6 decisions
+     * so it can be logged.
+     *
+     * But then on a connection failure, we don't know what the ipaddrstr
+     * should be as multiple sources may have been tried. Le sigh.
+     */
+    if (server_fd != -1 && Config.onoff.log_ip_on_direct &&
+      status != COMM_ERR_DNS && fs->code == HIER_DIRECT)
hierarchyNote(&fwdState->request->hier, fs->code, fd_table[server_fd].ipaddrstr);
     if (status == COMM_ERR_DNS) {
        /*

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to