]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: fix listening IP address storage for frontends (cont)
authorVincent Bernat <vincent@bernat.im>
Thu, 19 May 2016 09:29:43 +0000 (11:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 May 2016 19:53:10 +0000 (21:53 +0200)
Commit 6e6158 was incomplete. There was an additional aggregate copy
that may trigger a similar case in the future.

src/cfgparse.c

index 48e584cf73e7173ae99618d0f5324dd52b77419b..9b7646523de9becb0909134fb495b456d7ea0977 100644 (file)
@@ -298,7 +298,7 @@ int str2listener(char *str, struct proxy *curproxy, struct bind_conf *bind_conf,
                        l->bind_conf = bind_conf;
 
                        l->fd = fd;
-                       l->addr = ss;
+                       memcpy(&l->addr, &ss, sizeof(ss));
                        l->xprt = &raw_sock;
                        l->state = LI_INIT;