]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
xinetd: use monotonic time
authorLi Wang <li.wang@windriver.com>
Fri, 4 Apr 2025 05:21:06 +0000 (13:21 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Apr 2025 16:59:29 +0000 (17:59 +0100)
commite4bfd2cc66c4b5614513ec50806492efc8df75be
treec9a82d69af68027f5cba5eb1451a871b6038e572
parent5200dcb39834790542c429d70cf54db07ff7a378
xinetd: use monotonic time

When using xinet.d to limit rsync connections, it can't handle changes
in system time. When time is set back, the connection limit is reached
very quickly and rsync gets deactivated, if time is changed again, rsync
is never reactivated.

The current timer of xinet.d is based on the time() and is affected by
the system time. Use clock_gettime() with CLOCK_MONOTONIC as the new
timer because CLOCK_MONOTONIC clock is not affected by discontinuous
jumps in the system time.

Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/xinetd/xinetd/0001-Use-monotonic-time.patch [new file with mode: 0644]
meta/recipes-extended/xinetd/xinetd_2.3.15.4.bb