]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: sink/log: stop relying on AF_UNSPEC for rings
authorAurelien DARRAGON <adarragon@haproxy.com>
Wed, 13 Sep 2023 17:28:34 +0000 (19:28 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 13 Oct 2023 08:05:06 +0000 (10:05 +0200)
commitcc3dfe89edc8ecef008dec802501195b7b9be98f
tree44504d7e51095aebfb95815b81b6b011c707d85e
parentb218ce3469edc80f1227f5307e884e6d0a72f951
MEDIUM: sink/log: stop relying on AF_UNSPEC for rings

Since a5b325f92 ("MINOR: protocol: add a real family for existing FDs"),
we don't rely anymore on AF_UNSPEC for buffer rings in do_send_log.

But we kept it as a parsing hint to differentiate between implicit and
named rings during ring buffer postparsing.

However it is still a bit confusing and forces us to systematically rely
on target->addr, even for named buffer rings where it doesn't make much
sense anymore.

Now that target->addr was made a pointer in a recent commit, we can
choose not to initialize it when not needed (i.e.: named rings) and use
this as a hint to distinguish implicit rings during init since they rely
on the addr struct to temporarily store the ring's address until the ring
is actually created during postparsing step.
src/log.c
src/sink.c