]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: dns: Handle SRV record weight correctly.
authorOlivier Houchard <ohouchard@haproxy.com>
Mon, 8 Jan 2018 15:28:57 +0000 (16:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 9 Jan 2018 14:43:11 +0000 (15:43 +0100)
commit2ec2db9725fb54a76c726c5b8cc502071c575d28
tree0517cb2f1a51e99b6461256fb940b61846b3efad
parent119a5f10e47f3507e58116002583e1226473485d
MINOR: dns: Handle SRV record weight correctly.

A SRV record weight can range from 0 to 65535, while haproxy weight goes
from 0 to 256, so we have to divide it by 256 before handing it to haproxy.
Also, a SRV record with a weight of 0 doesn't mean the server shouldn't be
used, so use a minimum weight of 1.

This should probably be backported to 1.8.
include/types/dns.h
src/dns.c