[master] 429d2a1 Log all received frames, even if we throw them away.

Poul-Henning Kamp phk at FreeBSD.org
Mon Mar 6 16:07:06 CET 2017


commit 429d2a13e3c02012a282db9982a989d34f4e19aa
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Mar 6 08:33:22 2017 +0000

    Log all received frames, even if we throw them away.

diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index 1eb4b6b..3154537 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -675,6 +675,10 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
 	/* XXX: later full DATA will not be rx'ed yet. */
 	HTC_RxPipeline(h2->htc, h2->htc->rxbuf_b + h2->rxf_len + 9);
 
+	Lck_Lock(&h2->sess->mtx);
+	h2_vsl_frame(h2, h2->htc->rxbuf_b, 9L + h2->rxf_len);
+	Lck_Unlock(&h2->sess->mtx);
+
 	if (h2->rxf_type >= H2FMAX) {
 		// rfc7540,l,679,681
 		// XXX: later, drain rest of frame
@@ -709,10 +713,6 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
 		h2->rxf_flags &= h2f->flags;
 	}
 
-	Lck_Lock(&h2->sess->mtx);
-	h2_vsl_frame(h2, h2->htc->rxbuf_b, 9L + h2->rxf_len);
-	Lck_Unlock(&h2->sess->mtx);
-
 	h2e = h2_procframe(wrk, h2, h2f);
 	if (h2e) {
 		vbe32enc(b, h2->highest_stream);



More information about the varnish-commit mailing list