Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
58aafc2a
Commit
58aafc2a
authored
Dec 02, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allocate client IP/port string from sess->ws
parent
6a92b339
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
8 deletions
+12
-8
cache.h
bin/varnishd/cache/cache.h
+2
-2
cache_panic.c
bin/varnishd/cache/cache_panic.c
+2
-1
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+2
-1
cache_session.c
bin/varnishd/cache/cache_session.c
+5
-3
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+1
-1
No files found.
bin/varnishd/cache/cache.h
View file @
58aafc2a
...
@@ -772,8 +772,8 @@ struct sess {
...
@@ -772,8 +772,8 @@ struct sess {
struct
suckaddr
*
local_addr
;
struct
suckaddr
*
local_addr
;
/* formatted ascii client address */
/* formatted ascii client address */
char
addr
[
ADDR_BUFSIZE
]
;
char
*
client_addr_str
;
char
port
[
PORT_BUFSIZE
]
;
char
*
client_port_str
;
struct
acct
acct_ses
;
struct
acct
acct_ses
;
...
...
bin/varnishd/cache/cache_panic.c
View file @
58aafc2a
...
@@ -348,7 +348,8 @@ pan_sess(const struct sess *sp)
...
@@ -348,7 +348,8 @@ pan_sess(const struct sess *sp)
VSB_printf
(
pan_vsp
,
" sp = %p {
\n
"
,
sp
);
VSB_printf
(
pan_vsp
,
" sp = %p {
\n
"
,
sp
);
VSB_printf
(
pan_vsp
,
" fd = %d, vxid = %u,
\n
"
,
VSB_printf
(
pan_vsp
,
" fd = %d, vxid = %u,
\n
"
,
sp
->
fd
,
sp
->
vxid
&
VSL_IDENTMASK
);
sp
->
fd
,
sp
->
vxid
&
VSL_IDENTMASK
);
VSB_printf
(
pan_vsp
,
" client = %s %s,
\n
"
,
sp
->
addr
,
sp
->
port
);
VSB_printf
(
pan_vsp
,
" client = %s %s,
\n
"
,
sp
->
client_addr_str
,
sp
->
client_port_str
);
switch
(
sp
->
sess_step
)
{
switch
(
sp
->
sess_step
)
{
#define SESS_STEP(l, u) case S_STP_##u: stp = "S_STP_" #u; break;
#define SESS_STEP(l, u) case S_STP_##u: stp = "S_STP_" #u; break;
#include "tbl/steps.h"
#include "tbl/steps.h"
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
58aafc2a
...
@@ -674,7 +674,8 @@ cnt_recv(struct worker *wrk, struct req *req)
...
@@ -674,7 +674,8 @@ cnt_recv(struct worker *wrk, struct req *req)
AZ
(
req
->
obj
);
AZ
(
req
->
obj
);
AZ
(
req
->
objcore
);
AZ
(
req
->
objcore
);
VSLb
(
req
->
vsl
,
SLT_ReqStart
,
"%s %s"
,
req
->
sp
->
addr
,
req
->
sp
->
port
);
VSLb
(
req
->
vsl
,
SLT_ReqStart
,
"%s %s"
,
req
->
sp
->
client_addr_str
,
req
->
sp
->
client_port_str
);
if
(
req
->
err_code
)
{
if
(
req
->
err_code
)
{
req
->
req_step
=
R_STP_ERROR
;
req
->
req_step
=
R_STP_ERROR
;
...
...
bin/varnishd/cache/cache_session.c
View file @
58aafc2a
...
@@ -192,12 +192,14 @@ ses_vsl_socket(struct sess *sp, const char *lsockname)
...
@@ -192,12 +192,14 @@ ses_vsl_socket(struct sess *sp, const char *lsockname)
AN
(
VSA_Build
(
sp
->
local_addr
,
&
ss
,
sl
));
AN
(
VSA_Build
(
sp
->
local_addr
,
&
ss
,
sl
));
assert
(
VSA_Sane
(
sp
->
local_addr
));
assert
(
VSA_Sane
(
sp
->
local_addr
));
VTCP_name
(
sp
->
remote_addr
,
VTCP_name
(
sp
->
remote_addr
,
laddr
,
sizeof
laddr
,
lport
,
sizeof
lport
);
sp
->
addr
,
sizeof
sp
->
addr
,
sp
->
port
,
sizeof
sp
->
port
);
sp
->
client_addr_str
=
WS_Copy
(
sp
->
ws
,
laddr
,
-
1
);
sp
->
client_port_str
=
WS_Copy
(
sp
->
ws
,
lport
,
-
1
);
VTCP_name
(
sp
->
local_addr
,
laddr
,
sizeof
laddr
,
lport
,
sizeof
lport
);
VTCP_name
(
sp
->
local_addr
,
laddr
,
sizeof
laddr
,
lport
,
sizeof
lport
);
VSL
(
SLT_Begin
,
sp
->
vxid
,
"sess"
);
VSL
(
SLT_Begin
,
sp
->
vxid
,
"sess"
);
VSL
(
SLT_SessOpen
,
sp
->
vxid
,
"%s %s %s %s %s %.6f %d"
,
VSL
(
SLT_SessOpen
,
sp
->
vxid
,
"%s %s %s %s %s %.6f %d"
,
sp
->
addr
,
sp
->
port
,
lsockname
,
laddr
,
lport
,
sp
->
t_open
,
sp
->
fd
);
sp
->
client_addr_str
,
sp
->
client_port_str
,
lsockname
,
laddr
,
lport
,
sp
->
t_open
,
sp
->
fd
);
}
}
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
...
...
bin/varnishd/cache/cache_vrt_var.c
View file @
58aafc2a
...
@@ -199,7 +199,7 @@ VRT_r_client_identity(const struct vrt_ctx *ctx)
...
@@ -199,7 +199,7 @@ VRT_r_client_identity(const struct vrt_ctx *ctx)
if
(
ctx
->
req
->
client_identity
!=
NULL
)
if
(
ctx
->
req
->
client_identity
!=
NULL
)
return
(
ctx
->
req
->
client_identity
);
return
(
ctx
->
req
->
client_identity
);
else
else
return
(
ctx
->
req
->
sp
->
add
r
);
return
(
ctx
->
req
->
sp
->
client_addr_st
r
);
}
}
void
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment