]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: compat: fix segfault on FreeBSD
authorJoris Dedieu <joris.dedieu@gmail.com>
Fri, 12 Jun 2015 23:05:11 +0000 (01:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 13 Jun 2015 06:25:36 +0000 (08:25 +0200)
commit9dd44ba5d672883a45f2dd9f715d3910b52fe941
treeb2817c37c34fbb4394b166a58c6f6fa39ac1cb92
parent3054880e09bbff8a885d44f2a304db9a63da4d53
BUG/MEDIUM: compat: fix segfault on FreeBSD

Since commit 65d805fd witch removes standard.h from compat.h some
values were not properly set on FreeBSD. This caused a segfault
at startup when smp_resolve_args is called.

As FreeBSD have IP_BINDANY, CONFIG_HAP_TRANSPARENT is define. This
cause struct conn_src to be extended with some fields. The size of
this structure was incorrect. Including netinet/in.h fix this issue.

While diving in code preprocessing, I found that limits.h was require
to properly set MAX_HOSTNAME_LEN, ULONG_MAX, USHRT_MAX and others
system limits on FreeBSD.
include/common/compat.h