Re: [PATCH] dns: Handle SRV record weights correctly

2018-01-09 Thread Willy Tarreau
On Tue, Jan 09, 2018 at 03:39:29PM +0100, Olivier Houchard wrote: > Updated patch attached. cool, now applied, thanks! Willy

Re: [PATCH] dns: Handle SRV record weights correctly

2018-01-09 Thread Olivier Houchard
Hi, On Tue, Jan 09, 2018 at 03:28:22PM +0100, Olivier Houchard wrote: > Hi Willy, > > On Tue, Jan 09, 2018 at 03:17:24PM +0100, Willy Tarreau wrote: > > Hi Olivier, > > > > On Mon, Jan 08, 2018 at 04:35:35PM +0100, Olivier Houchard wrote: > > > Hi, > > > > > > The attached patch attempts to

Re: [PATCH] dns: Handle SRV record weights correctly

2018-01-09 Thread Willy Tarreau
On Tue, Jan 09, 2018 at 03:28:22PM +0100, Olivier Houchard wrote: > Hi Willy, > > On Tue, Jan 09, 2018 at 03:17:24PM +0100, Willy Tarreau wrote: > > Hi Olivier, > > > > On Mon, Jan 08, 2018 at 04:35:35PM +0100, Olivier Houchard wrote: > > > Hi, > > > > > > The attached patch attempts to map SRV

Re: [PATCH] dns: Handle SRV record weights correctly

2018-01-09 Thread Olivier Houchard
Hi Willy, On Tue, Jan 09, 2018 at 03:17:24PM +0100, Willy Tarreau wrote: > Hi Olivier, > > On Mon, Jan 08, 2018 at 04:35:35PM +0100, Olivier Houchard wrote: > > Hi, > > > > The attached patch attempts to map SRV record weight to haproxy weight > > correctly, > > SRV weight goes from 0 to 65536

Re: [PATCH] dns: Handle SRV record weights correctly

2018-01-09 Thread Willy Tarreau
Hi Olivier, On Mon, Jan 08, 2018 at 04:35:35PM +0100, Olivier Houchard wrote: > Hi, > > The attached patch attempts to map SRV record weight to haproxy weight > correctly, > SRV weight goes from 0 to 65536 while haproxy uses 0 to 256, so we have to > divide it by 256, and a SRV weight of 0

[PATCH] dns: Handle SRV record weights correctly

2018-01-08 Thread Olivier Houchard
Hi, The attached patch attempts to map SRV record weight to haproxy weight correctly, SRV weight goes from 0 to 65536 while haproxy uses 0 to 256, so we have to divide it by 256, and a SRV weight of 0 doesn't mean the server shouldn't be used, so we use a minimum weight of 1. Regards, Olivier