haproxy/contrib
Willy Tarreau 4bfc6630ba CLEANUP: socket: replace SOL_IP/IPV6/TCP with IPPROTO_IP/IPV6/TCP
Historically we've used SOL_IP/SOL_IPV6/SOL_TCP everywhere as the socket
level value in getsockopt() and setsockopt() but as we've seen over time
it regularly broke the build and required to have them defined to their
IPPROTO_* equivalent. The Linux ip(7) man page says:

   Using the SOL_IP socket options level isn't portable; BSD-based
   stacks use the IPPROTO_IP level.

And it indeed looks like a pure linuxism inherited from old examples and
documentation. strace also reports SOL_* instead of IPPROTO_*, which does
not help... A check to linux/in.h shows they have the same values. Only
SOL_SOCKET and other non-IP values make sense since there is no IPPROTO
equivalent.

Let's get rid of this annoying confusion by removing all redefinitions of
SOL_IP/IPV6/TCP and using IPPROTO_* instead, just like any other operating
system. This also removes duplicated tests for the same value.

Note that this should not result in exposing syscalls to other OSes
as the only ones that were still conditionned to SOL_IPV6 were for
IPV6_UNICAST_HOPS which already had an IPPROTO_IPV6 equivalent, and
IPV6_TRANSPARENT which is Linux-specific.
2021-03-31 08:59:34 +02:00
..
51d/src
base64
debug CONTRIB: debug: address "poll" utility build on non-linux platforms 2020-12-21 08:45:26 +01:00
deviceatlas CONTRIB: da: fix memory leak in dummy function da_atlas_open() 2020-07-12 09:12:07 +02:00
halog CONTRIB: halog: fix signed/unsigned build warnings on counts and timestamps 2020-12-21 08:43:09 +01:00
hpack REORG: include: move hpack*.h to haproxy/ and split hpack-tbl 2020-06-11 10:18:57 +02:00
ip6range
iprange
mod_defender CLEANUP: Apply the coccinelle patch for XXXcmp() on contrib/ 2021-01-04 10:09:02 +01:00
modsecurity CLEANUP: Apply the coccinelle patch for XXXcmp() on contrib/ 2021-01-04 10:09:02 +01:00
netsnmp-perl
opentracing MINOR: opentracing: use pool_alloc(), not pool_alloc_dirty() 2021-03-22 15:35:53 +01:00
plug_qdisc CLEANUP: assorted typo fixes in the code and comments 2020-03-31 17:09:35 +02:00
prometheus-exporter BUG/MEDIUM: contrib/prometheus-exporter: fix segfault in listener name dump 2021-02-25 07:14:08 +01:00
release-estimator CONTRIB: release-estimator: Add release estimating tool 2020-10-24 12:27:17 +02:00
selinux
spoa_example CLEANUP: Apply the coccinelle patch for XXXcmp() on contrib/ 2021-01-04 10:09:02 +01:00
spoa_server BUG/MEDIUM: spoa/python: Fixing references to None 2020-12-09 08:39:31 +01:00
syntax-highlight
systemd BUG/MINOR: systemd: Wait for network to be online 2020-06-19 21:31:10 +02:00
tcploop CLEANUP: socket: replace SOL_IP/IPV6/TCP with IPPROTO_IP/IPV6/TCP 2021-03-31 08:59:34 +02:00
trace
wireshark-dissectors/peers MINOR: contrib: Enhance peers dissector heuristic. 2021-03-02 11:08:45 +01:00
wurfl CLEANUP: assorted typo fixes in the code and comments 2020-03-31 17:09:35 +02:00