parent
baf019f32b
commit
2625fb0d5e
32
bz2102493-fix-variable-substitution.patch
Normal file
32
bz2102493-fix-variable-substitution.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 332262ec91f85cd4224816d2803d818015239007 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Quentin Armitage <quentin@armitage.org.uk>
|
||||||
|
Date: Wed, 29 Jun 2022 09:18:15 +0100
|
||||||
|
Subject: [PATCH] parser: optimise fixing recalculating updated line length
|
||||||
|
|
||||||
|
Commit 1ffad9a - "recalculate buffer length inside recheck loop"
|
||||||
|
resolved the issue but calls strlen(buf) more often than necessary.
|
||||||
|
|
||||||
|
This commit only calls strlen(buf) when the line buffer is modified.
|
||||||
|
|
||||||
|
Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
|
||||||
|
---
|
||||||
|
lib/parser.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/parser.c b/lib/parser.c
|
||||||
|
index bcabd07f..2146f38b 100644
|
||||||
|
--- a/lib/parser.c
|
||||||
|
+++ b/lib/parser.c
|
||||||
|
@@ -2809,6 +2809,9 @@ read_line(char *buf, size_t size)
|
||||||
|
recheck = true;
|
||||||
|
if (strchr(buf, '$'))
|
||||||
|
recheck = true;
|
||||||
|
+
|
||||||
|
+ if (recheck)
|
||||||
|
+ len = strlen(buf);
|
||||||
|
}
|
||||||
|
} while (recheck);
|
||||||
|
} while (buf[0] == '\0' || check_include(buf));
|
||||||
|
--
|
||||||
|
2.38.1
|
||||||
|
|
@ -11,7 +11,7 @@
|
|||||||
Name: keepalived
|
Name: keepalived
|
||||||
Summary: High Availability monitor built upon LVS, VRRP and service pollers
|
Summary: High Availability monitor built upon LVS, VRRP and service pollers
|
||||||
Version: 2.2.4
|
Version: 2.2.4
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://www.keepalived.org/
|
URL: http://www.keepalived.org/
|
||||||
|
|
||||||
@ -19,6 +19,7 @@ Source0: http://www.keepalived.org/software/keepalived-%{version}.tar.gz
|
|||||||
Source1: keepalived.service
|
Source1: keepalived.service
|
||||||
|
|
||||||
Patch1: bz2028351-fix-dbus-policy-restrictions.patch
|
Patch1: bz2028351-fix-dbus-policy-restrictions.patch
|
||||||
|
Patch2: bz2102493-fix-variable-substitution.patch
|
||||||
|
|
||||||
Requires(post): systemd
|
Requires(post): systemd
|
||||||
Requires(preun): systemd
|
Requires(preun): systemd
|
||||||
@ -60,6 +61,7 @@ infrastructures.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure \
|
%configure \
|
||||||
@ -110,6 +112,9 @@ mkdir -p %{buildroot}%{_libexecdir}/keepalived
|
|||||||
%{_mandir}/man8/keepalived.8*
|
%{_mandir}/man8/keepalived.8*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 22 2022 Ryan O'Hara <rohara@redhat.com> - 2.2.4-4
|
||||||
|
- Fix variable substitution in consditional lines (#2101493)
|
||||||
|
|
||||||
* Thu Dec 22 2022 Ryan O'Hara <rohara@redhat.com> - 2.2.4-3
|
* Thu Dec 22 2022 Ryan O'Hara <rohara@redhat.com> - 2.2.4-3
|
||||||
- Enable JSON support (#2129819)
|
- Enable JSON support (#2129819)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user