Re: strange cppcheck finding

2018-03-19 Thread Willy Tarreau
On Mon, Mar 19, 2018 at 06:55:46PM +0500, ??? wrote: > (it's master) > > is it in purpose ? > > [src/ssl_sock.c:1553]: (warning) Invalid test for overflow > 'msg+rec_len overflow is UB. The code is : rec_len =

Re: add header into http-request redirect

2018-03-19 Thread Willy Tarreau
On Mon, Mar 19, 2018 at 10:23:47PM +0100, Tim Düsterhus wrote: > Willy, > > Am 19.03.2018 um 22:15 schrieb Willy Tarreau: > > Looks like it indeed. By then there was no "http-request" ruleset > > either. Maybe we could move it to a place where it's generated > > earlier, or maybe we could ensure

Re: add header into http-request redirect

2018-03-19 Thread Tim Düsterhus
Willy, Am 19.03.2018 um 22:15 schrieb Willy Tarreau: > Looks like it indeed. By then there was no "http-request" ruleset > either. Maybe we could move it to a place where it's generated > earlier, or maybe we could ensure that it's computed on the fly > when the associated sample fetch function

Re: add header into http-request redirect

2018-03-19 Thread Willy Tarreau
On Mon, Mar 19, 2018 at 10:04:25PM +0100, Tim Düsterhus wrote: > Willy, > > Am 19.03.2018 um 21:47 schrieb Willy Tarreau: > > Simply because unique-id was created many years before the extensible > > log-format ou know today existed, and that apparently nobody felt the > > need to port it. It may

Re: add header into http-request redirect

2018-03-19 Thread Tim Düsterhus
Willy, Am 19.03.2018 um 21:47 schrieb Willy Tarreau: > Simply because unique-id was created many years before the extensible > log-format ou know today existed, and that apparently nobody felt the > need to port it. It may be as simple as creating a few sample fetches, > I don't know. This was

Re: add header into http-request redirect

2018-03-19 Thread Willy Tarreau
On Mon, Mar 19, 2018 at 09:40:01PM +0100, Tim Düsterhus wrote: > As a side question: Why do I have to do unique-id-header, instead of > http-request set-header for the unique request ID? And why can't I > capture it with capture (request|response) header but instead have to > plug into manually

Re: add header into http-request redirect

2018-03-19 Thread Tim Düsterhus
Willy, Am 19.03.2018 um 11:54 schrieb Willy Tarreau: >> This issue prevents me from submitting one domain to the HSTS preload >> list, as I need to perform a redirect on the zone's apex and that >> redirect does not include the HSTS header. > > I *suspect* that in the end we could simply add a

Re: segfault in haproxy=1.8.4

2018-03-19 Thread William Dauchy
On Mon, Mar 19, 2018 at 08:41:16PM +0100, Willy Tarreau wrote: > For me, "experimental" simply means "we did our best to ensure it works > but we're realist and know that bug-free doesn't exist, so a risk remains > that a bug will be hard enough to fix so as to force you to disable the > feature

Re: segfault in haproxy=1.8.4

2018-03-19 Thread Willy Tarreau
On Mon, Mar 19, 2018 at 08:28:14PM +0100, William Dauchy wrote: > On Mon, Mar 19, 2018 at 07:28:16PM +0100, Willy Tarreau wrote: > > Threading was clearly released with an experimental status, just like > > H2, because we knew we'd be facing some post-release issues in these > > two areas that are

Re: segfault in haproxy=1.8.4

2018-03-19 Thread William Dauchy
Hi Willy, Thank your for your detailed answer. On Mon, Mar 19, 2018 at 07:28:16PM +0100, Willy Tarreau wrote: > Threading was clearly released with an experimental status, just like > H2, because we knew we'd be facing some post-release issues in these > two areas that are hard to get 100% right

Re: segfault in haproxy=1.8.4

2018-03-19 Thread Willy Tarreau
Hi William, On Mon, Mar 19, 2018 at 06:57:50PM +0100, William Dauchy wrote: > > However, be careful. This new implementation should be thread-safe > > (hopefully...). But it is not optimal and in some situations, it could be > > really > > slower in multi-threaded mode than in single-threaded

Re: segfault in haproxy=1.8.4

2018-03-19 Thread William Dauchy
Hi Christopher, On Thu, Mar 15, 2018 at 04:05:04PM +0100, Christopher Faulet wrote: > From 91b1349b6a1a64d43cc41e8546ff1d1ce17a8e14 Mon Sep 17 00:00:00 2001 > From: Christopher Faulet > Date: Wed, 14 Mar 2018 16:18:06 +0100 > Subject: [PATCH] BUG/MAJOR: threads/queue: Fix

strange cppcheck finding

2018-03-19 Thread Илья Шипицин
(it's master) is it in purpose ? [src/ssl_sock.c:1553]: (warning) Invalid test for overflow 'msg+rec_len

Re: [Patch] minor bugfix

2018-03-19 Thread Willy Tarreau
On Sun, Feb 25, 2018 at 09:48:21PM +0100, Thierry Fournier wrote: > Hi, > > This is a lot of minor patches. > > * The 0001 should be backported in 1.7. The backport is done in the >patch v17_0001. > > * The 0002 should be backported in 1.7 and 1.6 > > * The 0003 could be backported in

Re: [PATCH] Feature for substituting header matches

2018-03-19 Thread Willy Tarreau
Hi Darren, On Fri, Feb 23, 2018 at 05:29:47PM +, Darren Demicoli wrote: > Hi all > > Recently I needed to substitute http headers in requests such as the > following: > > From > Referer: https://a-b-c.example.com/x-caliber > To > Referer: https://a.b.c.example.com/x-caliber > > Basically

Re: Fix building without NPN support

2018-03-19 Thread Willy Tarreau
Hi guys, On Sun, Feb 18, 2018 at 11:58:41AM +0300, Dmitry Sivachenko wrote: (...) > > Agree. Updated patch attached. > > > > Bernard. > > > Is this patch good, Lukas? > Any plans to integrate it? Just noticed this one now and took it. I also backported it to 1.8. Thanks! Willy

Re: [PATCH] support CRC32c for proxy protocol v2 (send, accept)

2018-03-19 Thread Willy Tarreau
Hi Manu, On Mon, Feb 05, 2018 at 05:10:05PM +0100, Emmanuel Hocdet wrote: > Hi, > > Series of patches to support CRC32c checksum to proxy protocol v2 header > (as describe in "doc/proxy-protocol.txt ») > . add hash_crc32c function > . add « crc32c » option to proxy-v2-options > . check crc32c

Re: [PATCH] BUG/MINOR: cli: Fix a crash when sending a command with too many arguments

2018-03-19 Thread Willy Tarreau
On Fri, Mar 16, 2018 at 11:02:33AM +0100, Aurélien Nephtali wrote: > Hello, > > This patch fixes a crash when the CLI is fed with too many arguments: > > $ seq -s ' ' 0 64 | socat /tmp/sock1 - Wow, nice one, thanks! Willy

Re: [PATCH] BUG/MINOR: cli: Ensure all command outputs end with a LF

2018-03-19 Thread Willy Tarreau
Hi Aurélien, On Thu, Mar 15, 2018 at 10:27:31PM +0100, Aurélien Nephtali wrote: > Hello, > > This patch adds some missing LF to the outputs of some commands. > It may break some scripts that rely on these broken outputs but it also > breaks the parsing of pipelined commands. Good catch! In fact

Re: [MINOR][PATCH] Fix segfault when trying to use seemless reload with at least an interface bound

2018-03-19 Thread Willy Tarreau
On Thu, Mar 15, 2018 at 05:54:09PM +0100, Olivier Houchard wrote: > > Hi, > > Trying to do a seemless reload while at least one socket has been bound to > a specifig interface will lead to a segfault, because the guy who wrote that > code did it by copying/pasting, and forgot to change an

Re: small cleanup of src/dns.c

2018-03-19 Thread Willy Tarreau
Hi, On Thu, Mar 15, 2018 at 04:43:29PM +0500, ??? wrote: > Hello, > > small issue (no real impact) identified by cppcheck > From 733d99f42d93898232bb8c3c953b662ee889c034 Mon Sep 17 00:00:00 2001 > From: Ilya Shipitsin > Date: Thu, 15 Mar 2018 16:38:38 +0500 >

Re: cppcheck finding

2018-03-19 Thread Willy Tarreau
Hi, On Thu, Mar 15, 2018 at 04:27:43PM +0500, ??? wrote: > [src/51d.c:373]: (error) Invalid number of character '{' when no macros are > defined. Just a small hint, please always mention which version (or ideally commit) you report issues like this. >From what I'm seeing, the program

Re: New 1.8 release ?

2018-03-19 Thread Willy Tarreau
Hi Olivier, On Wed, Mar 14, 2018 at 05:55:33PM +0100, Olivier Doucet wrote: > Hello all, > > I can see several fixes in 1.8 trunk about 100% CPU usage and some other > bugs. > Last release was more than a month ago. Is there a new release expected > soon ? I'm about to start using 1.8 on some

Re: add header into http-request redirect

2018-03-19 Thread Willy Tarreau
Hi Tim, On Tue, Mar 13, 2018 at 12:37:44AM +0100, Tim Düsterhus wrote: > Willy, > > I'd like to bring this issue to your attention again, possibly you are > able to find a solution for haproxy 1.9? I hope so, but we'll need to be sure that someone is assigned to this, otherwise I'll keep being

Re: Need help?

2018-03-19 Thread Willy Tarreau
Hi Nikhil, On Sat, Mar 17, 2018 at 05:39:29PM +, Nikhil Kapoor wrote: > Actually, I just wanted to deeply understand the code of haproxy. So just > wanted to know which tool should i use in order to understand the code. Is it > only gdb that you all use or any other? Well, gdb is not suited

Re: Can HA-Proxy set an header when he "breaks" stick routing

2018-03-19 Thread Willy Tarreau
Hi, On Fri, Mar 16, 2018 at 12:31:47PM +, Gisle Grimen wrote: > Hi, > > We are using HA-Proxy with sticky routing in front of our cluster. Is there a > way to get HA-Proxy to add or set an header on a forwarded request when > HA-Proxy "breaks" sticky routing i.e. when forwarding the request

Re: New HTTP action: DNS resolution at run time

2018-03-19 Thread Willy Tarreau
Hi Jonathan, On Sat, Mar 17, 2018 at 02:46:20PM +, Jonathan Matthews wrote: > On 30 January 2018 at 09:04, Baptiste wrote: > > Hi all, > > > > Please find enclosed a few patches which adds a new HTTP action into > > HAProxy: do-resolve. > > This action can be used to