]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: applet: Forward <kip> to applets
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 10 Oct 2025 09:11:43 +0000 (11:11 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 10 Oct 2025 09:11:44 +0000 (11:11 +0200)
For now, no applets are using the <kop> value when consuming data. At least,
as far as I know. But it remains a good idea to keep the applet API
compatible. So now, the <kip> of the opposite side is properly forwarded to
applets.

src/applet.c
src/stconn.c

index c7d5b4b410845debc4bd1bd96b1c6b9f2c5501e3..b71096ae9266c3c4856c7cead20225aff7895e6a 100644 (file)
@@ -834,6 +834,8 @@ struct task *task_run_applet(struct task *t, void *context, unsigned int state)
 
        channel_check_idletimer(ic);
 
+       sc_ep_fwd_kip(sco, sc);
+
        input  = ic->total;
        output = co_data(oc);
        app->applet->fct(app);
index a899648f0193e7fd70621456ccf1dbbb4998cb4d..4b27e5314e1a26b8dbd4b894fda62660bf0bbbe3 100644 (file)
@@ -2247,6 +2247,8 @@ int sc_applet_send(struct stconn *sc)
        if (se_fl_test(sc->sedesc, SE_FL_ORPHAN))
                return 0;
 
+       sc_ep_fwd_kip(sco, sc);
+
        /* TODO: Splicing is not supported, so it is not possible to have FF data stuck into the I/O buf */
        BUG_ON(sc_ep_have_ff_data(sc));