]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: backend: Fallback on RR algo if balance on source is impossible
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Jul 2022 15:07:32 +0000 (17:07 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 22 Jul 2022 15:07:34 +0000 (17:07 +0200)
If the loadbalancing is performed on the source IP address, an internal
error was returned on error. So for an applet on the client side (for
instance an SPOE applet) or for a client connected to a unix socket, an
internal error is returned.

However, when other LB algos fail, a fallback on round-robin is
performed. There is no reson to not do the same here.

This patch should fix the issue #1797. It must be backported to all
supported versions.

src/backend.c

index ce170af9f77130cce58a228187a2bf39a1a0ebfb..2ae76002b163b541457a860003fa61cd2523f863 100644 (file)
@@ -744,11 +744,6 @@ int assign_server(struct stream *s)
                                                            (void *)&((struct sockaddr_in6 *)src)->sin6_addr,
                                                            16, prev_srv);
                                }
-                               else {
-                                       /* unknown IP family */
-                                       err = SRV_STATUS_INTERNAL;
-                                       goto out;
-                               }
                                break;
 
                        case BE_LB_HASH_URI: