Compare commits
No commits in common. "c9-beta" and "c8" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/radvd-2.19.tar.xz
|
SOURCES/radvd-2.17.tar.xz
|
||||||
|
@ -1 +1 @@
|
|||||||
6114cc4678012ce6c615ef3b04e7a06c850cce06 SOURCES/radvd-2.19.tar.xz
|
e6aefd1f94c11c198271622989deefa647a489b5 SOURCES/radvd-2.17.tar.xz
|
||||||
|
65
SOURCES/radvd-crash_if_config_removed.patch
Normal file
65
SOURCES/radvd-crash_if_config_removed.patch
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
From 57295ef0e85640adcc3b85f08b12f09d54aad2d2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomi Salminen <tsalminen@forcepoint.com>
|
||||||
|
Date: Tue, 16 Apr 2019 13:55:39 +0300
|
||||||
|
Subject: [PATCH] Crash on SIGHUP when config file removed.
|
||||||
|
|
||||||
|
Reading config zeroed the returnable configuration only when the
|
||||||
|
config file was opened successfully. If not, the previously read
|
||||||
|
in configuration was returned, which was already freed.
|
||||||
|
|
||||||
|
Moved configuration zeroing to start of readin_config and added
|
||||||
|
unit test to test zero return.
|
||||||
|
---
|
||||||
|
gram.y | 2 +-
|
||||||
|
test/util.c | 15 +++++++++++++++
|
||||||
|
2 files changed, 16 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/gram.y b/gram.y
|
||||||
|
index 20af2f3..4115390 100644
|
||||||
|
--- a/gram.y
|
||||||
|
+++ b/gram.y
|
||||||
|
@@ -947,10 +947,10 @@ static void cleanup(void)
|
||||||
|
|
||||||
|
struct Interface * readin_config(char const *path)
|
||||||
|
{
|
||||||
|
+ IfaceList = 0;
|
||||||
|
FILE * in = fopen(path, "r");
|
||||||
|
if (in) {
|
||||||
|
filename = path;
|
||||||
|
- IfaceList = 0;
|
||||||
|
num_lines = 1;
|
||||||
|
iface = 0;
|
||||||
|
|
||||||
|
diff --git a/test/util.c b/test/util.c
|
||||||
|
index b74b301..7124475 100644
|
||||||
|
--- a/test/util.c
|
||||||
|
+++ b/test/util.c
|
||||||
|
@@ -259,6 +259,20 @@ START_TEST(test_rand_between)
|
||||||
|
}
|
||||||
|
END_TEST
|
||||||
|
|
||||||
|
+START_TEST(test_cfg_removal_with_sighup)
|
||||||
|
+{
|
||||||
|
+ struct Interface *tmpIface = NULL;
|
||||||
|
+
|
||||||
|
+ tmpIface = readin_config("test/test1.conf");
|
||||||
|
+ ck_assert(tmpIface);
|
||||||
|
+
|
||||||
|
+ free_ifaces(tmpIface);
|
||||||
|
+
|
||||||
|
+ tmpIface = readin_config("test/file_that_should_not_exists.conf");
|
||||||
|
+ ck_assert(!tmpIface);
|
||||||
|
+}
|
||||||
|
+END_TEST
|
||||||
|
+
|
||||||
|
Suite *util_suite(void)
|
||||||
|
{
|
||||||
|
TCase *tc_safe_buffer = tcase_create("safe_buffer");
|
||||||
|
@@ -288,6 +302,7 @@ Suite *util_suite(void)
|
||||||
|
|
||||||
|
TCase *tc_misc = tcase_create("misc");
|
||||||
|
tcase_add_test(tc_misc, test_rand_between);
|
||||||
|
+ tcase_add_test(tc_misc, test_cfg_removal_with_sighup);
|
||||||
|
|
||||||
|
Suite *s = suite_create("util");
|
||||||
|
suite_add_tcase(s, tc_safe_buffer);
|
23
SOURCES/radvd-double_free_dupiface.patch
Normal file
23
SOURCES/radvd-double_free_dupiface.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From fb1529d0573d3d9744a0e9fea8dd0becfc91ad85 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
|
Date: Thu, 24 Jan 2019 13:21:55 +0100
|
||||||
|
Subject: [PATCH] Fix double-free scenario in case if duplicate interface was
|
||||||
|
specified (Fixes #100).
|
||||||
|
|
||||||
|
Signed-off-by: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
|
---
|
||||||
|
gram.y | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/gram.y b/gram.y
|
||||||
|
index 5db3bde..20af2f3 100644
|
||||||
|
--- a/gram.y
|
||||||
|
+++ b/gram.y
|
||||||
|
@@ -958,6 +958,7 @@ struct Interface * readin_config(char const *path)
|
||||||
|
if (yyparse() != 0) {
|
||||||
|
free_ifaces(iface);
|
||||||
|
iface = 0;
|
||||||
|
+ IfaceList = 0;
|
||||||
|
} else {
|
||||||
|
dlog(LOG_DEBUG, 1, "config file, %s, syntax ok", path);
|
||||||
|
}
|
14
SOURCES/radvd.service
Normal file
14
SOURCES/radvd.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Router advertisement daemon for IPv6
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
EnvironmentFile=/etc/sysconfig/radvd
|
||||||
|
ExecStart=/usr/sbin/radvd $OPTIONS
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/var/run/radvd/radvd.pid
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -1,3 +0,0 @@
|
|||||||
#Type Name ID GECOS Home directory Shell
|
|
||||||
g radvd 75
|
|
||||||
u radvd 75 "radvd user" / /sbin/nologin
|
|
25
SOURCES/radvd_add_ra_memleak.patch
Normal file
25
SOURCES/radvd_add_ra_memleak.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 5ad279f48c0f3d94573e3f3c887f86cd10476c2d Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Hallas <david@davidhallas.dk>
|
||||||
|
Date: Wed, 4 Apr 2018 06:36:12 +0200
|
||||||
|
Subject: [PATCH] Fixes memory leak in add_ra_options_dnssl
|
||||||
|
|
||||||
|
The add_ra_options_dnssl function failed to free memory before
|
||||||
|
returning.
|
||||||
|
---
|
||||||
|
send.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/send.c b/send.c
|
||||||
|
index 0a4951a..4b83d57 100644
|
||||||
|
--- a/send.c
|
||||||
|
+++ b/send.c
|
||||||
|
@@ -527,8 +527,8 @@ static struct safe_buffer_list *add_ra_options_dnssl(struct safe_buffer_list *sb
|
||||||
|
|
||||||
|
dnssl = dnssl->next;
|
||||||
|
}
|
||||||
|
- return sbl;
|
||||||
|
safe_buffer_free(serialized_domains);
|
||||||
|
+ return sbl;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
18
SOURCES/radvd_tmpfiles.patch
Normal file
18
SOURCES/radvd_tmpfiles.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
From 30198b37dd9d8cb3b15c90663145d06e2531d87f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Zhukov <pzhukov@redhat.com>
|
||||||
|
Date: Tue, 26 Feb 2019 14:37:16 +0100
|
||||||
|
Subject: [PATCH] packaging: Change location of tmpfiles to /run to avoid
|
||||||
|
warnings
|
||||||
|
|
||||||
|
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1678147
|
||||||
|
---
|
||||||
|
redhat/systemd/radvd-tmpfs.conf | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/redhat/systemd/radvd-tmpfs.conf b/redhat/systemd/radvd-tmpfs.conf
|
||||||
|
index 590652c..26f203d 100644
|
||||||
|
--- a/redhat/radvd-tmpfs.conf
|
||||||
|
+++ b/redhat/radvd-tmpfs.conf
|
||||||
|
@@ -1 +1 @@
|
||||||
|
-d /var/run/radvd 0755 radvd radvd
|
||||||
|
+d /run/radvd 0755 radvd radvd
|
108
SPECS/radvd.spec
108
SPECS/radvd.spec
@ -1,15 +1,14 @@
|
|||||||
Summary: A Router Advertisement daemon
|
Summary: A Router Advertisement daemon
|
||||||
Name: radvd
|
Name: radvd
|
||||||
Version: 2.19
|
Version: 2.17
|
||||||
Release: 5%{?dist}
|
Release: 15%{?dist}
|
||||||
|
|
||||||
# The code includes the advertising clause, so it's GPL-incompatible
|
# The code includes the advertising clause, so it's GPL-incompatible
|
||||||
License: BSD with advertising
|
License: BSD with advertising
|
||||||
|
Group: System Environment/Daemons
|
||||||
URL: http://www.litech.org/radvd/
|
URL: http://www.litech.org/radvd/
|
||||||
Source0: %{url}dist/%{name}-%{version}.tar.xz
|
Source0: %{url}dist/%{name}-%{version}.tar.xz
|
||||||
Source1: radvd.sysusers
|
Source1: radvd.service
|
||||||
|
|
||||||
BuildRequires: make
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
@ -17,9 +16,13 @@ BuildRequires: flex-static
|
|||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: check-devel
|
BuildRequires: check-devel
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
BuildRequires: systemd-rpm-macros
|
|
||||||
%{?systemd_requires}
|
%{?systemd_requires}
|
||||||
%{?sysusers_requires_compat}
|
Requires(pre): shadow-utils
|
||||||
|
|
||||||
|
Patch0: radvd_add_ra_memleak.patch
|
||||||
|
Patch1: radvd_tmpfiles.patch
|
||||||
|
Patch2: radvd-double_free_dupiface.patch
|
||||||
|
Patch3: radvd-crash_if_config_removed.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
radvd is the router advertisement daemon for IPv6. It listens to router
|
radvd is the router advertisement daemon for IPv6. It listens to router
|
||||||
@ -33,7 +36,7 @@ Install radvd if you are setting up IPv6 network and/or Mobile IPv6
|
|||||||
services.
|
services.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
for F in CHANGES; do
|
for F in CHANGES; do
|
||||||
iconv -f iso-8859-1 -t utf-8 < "$F" > "${F}.new"
|
iconv -f iso-8859-1 -t utf-8 < "$F" > "${F}.new"
|
||||||
@ -42,31 +45,30 @@ for F in CHANGES; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -fPIE "
|
export CFLAGS="$RPM_OPT_FLAGS -fPIE"
|
||||||
export LDFLAGS='-pie -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen'
|
export LDFLAGS='-pie -Wl,-z,relro,-z,now,-z,noexecstack,-z,nodlopen'
|
||||||
%configure \
|
%configure \
|
||||||
--with-check \
|
|
||||||
--disable-silent-rules \
|
--disable-silent-rules \
|
||||||
--with-pidfile=/run/radvd/radvd.pid
|
--with-pidfile=/run/radvd/radvd.pid
|
||||||
%make_build
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
make DESTDIR=%{buildroot} install
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
|
||||||
mkdir -p %{buildroot}/run/radvd
|
mkdir -p %{buildroot}/run/radvd
|
||||||
mkdir -p %{buildroot}%{_unitdir}
|
mkdir -p %{buildroot}%{_unitdir}
|
||||||
|
|
||||||
install -m 644 redhat/SysV/radvd.conf.empty %{buildroot}%{_sysconfdir}/radvd.conf
|
install -m 644 redhat/radvd.conf.empty %{buildroot}%{_sysconfdir}/radvd.conf
|
||||||
install -m 644 redhat/SysV/radvd.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/radvd
|
install -m 644 redhat/radvd.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/radvd
|
||||||
|
|
||||||
install -d -m 755 %{buildroot}%{_tmpfilesdir}
|
install -d -m 755 %{buildroot}%{_tmpfilesdir}
|
||||||
install -p -m 644 redhat/systemd/radvd-tmpfs.conf %{buildroot}%{_tmpfilesdir}/radvd.conf
|
install -p -m 644 redhat/radvd-tmpfs.conf %{buildroot}%{_tmpfilesdir}/radvd.conf
|
||||||
install -m 644 redhat/systemd/radvd.service %{buildroot}%{_unitdir}
|
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}
|
||||||
install -p -D -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/radvd.conf
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
make check
|
# The tests don't work, see https://github.com/reubenhwk/radvd/issues/30
|
||||||
|
#make check
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%systemd_postun_with_restart radvd.service
|
%systemd_postun_with_restart radvd.service
|
||||||
@ -77,8 +79,12 @@ make check
|
|||||||
%preun
|
%preun
|
||||||
%systemd_preun radvd.service
|
%systemd_preun radvd.service
|
||||||
|
|
||||||
|
# Static UID and GID defined by /usr/share/doc/setup-*/uidgid
|
||||||
%pre
|
%pre
|
||||||
%sysusers_create_compat %{SOURCE1}
|
getent group radvd >/dev/null || groupadd -r -g 75 radvd
|
||||||
|
getent passwd radvd >/dev/null || \
|
||||||
|
useradd -r -u 75 -g radvd -d / -s /sbin/nologin -c "radvd user" radvd
|
||||||
|
exit 0
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc CHANGES COPYRIGHT INTRO.html README TODO
|
%doc CHANGES COPYRIGHT INTRO.html README TODO
|
||||||
@ -86,7 +92,6 @@ make check
|
|||||||
%config(noreplace) %{_sysconfdir}/radvd.conf
|
%config(noreplace) %{_sysconfdir}/radvd.conf
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/radvd
|
%config(noreplace) %{_sysconfdir}/sysconfig/radvd
|
||||||
%{_tmpfilesdir}/radvd.conf
|
%{_tmpfilesdir}/radvd.conf
|
||||||
%{_sysusersdir}/radvd.conf
|
|
||||||
%dir %attr(755,radvd,radvd) /run/radvd/
|
%dir %attr(755,radvd,radvd) /run/radvd/
|
||||||
%doc radvd.conf.example
|
%doc radvd.conf.example
|
||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
@ -94,63 +99,18 @@ make check
|
|||||||
%{_sbindir}/radvdump
|
%{_sbindir}/radvdump
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Nov 03 2022 Martin Osvald <mosvald@redhat.com> - 2.19-5
|
* Wed Apr 15 2020 Pavel Zhukov <pzhukov@redhat.com> - 2.17-15
|
||||||
- Use systemd-sysusers for radvd user and group (#2095457)
|
- Fix double-free scenario (#1669177)
|
||||||
|
|
||||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.19-4
|
* Fri Oct 25 2019 Pavel Zhukov <pzhukov@redhat.com> - 2.17-14
|
||||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
- Resolves: #1710787 - Change location of tmpfiles
|
||||||
Related: rhbz#1991688
|
- Use tmpfile config from tarball
|
||||||
|
|
||||||
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.19-3
|
* Tue Dec 4 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-12
|
||||||
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
- Resolves: #1652459 - Wait for all devices to be initialized
|
||||||
|
|
||||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.19-2
|
* Tue Aug 28 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-11
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
- Related: #1602675 - Fix memory leak in add_ra flow
|
||||||
|
|
||||||
* Mon Oct 19 2020 Pavel Zhukov <pzhukov@redhat.com> - 2.19-1
|
|
||||||
- new version v2.19
|
|
||||||
|
|
||||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.18-6
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 2.18-5
|
|
||||||
- Use make macros
|
|
||||||
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
|
|
||||||
|
|
||||||
* Fri Apr 3 2020 Pavel Zhukov <pzhukov@redhat.com> - 2.18-4
|
|
||||||
- Update pidfile path (#1785862)
|
|
||||||
|
|
||||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.18-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.18-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Feb 20 2019 Pavel Zhukov <pzhukov@redhat.com> - 2.17-19
|
|
||||||
- change tmpfiles location (#1678147)
|
|
||||||
|
|
||||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.17-18
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Jan 27 2019 Pavel Zhukov <pzhukov@redhat.com> - 2.17-17
|
|
||||||
- Fix double-free in InterfaceList
|
|
||||||
|
|
||||||
* Tue Nov 27 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-16
|
|
||||||
- Depends on network-online target (#1652459)
|
|
||||||
|
|
||||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.17-15
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jun 13 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-14
|
|
||||||
- Log to stderr in non-daemon mode
|
|
||||||
- Add nodaemon option into manpage
|
|
||||||
- Re-enable test again
|
|
||||||
|
|
||||||
* Mon Jun 04 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-12
|
|
||||||
- Enable tests and fix them on big endian arches
|
|
||||||
|
|
||||||
* Thu Apr 12 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-11
|
|
||||||
- Enable Werror=all
|
|
||||||
|
|
||||||
* Mon Feb 19 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-10
|
* Mon Feb 19 2018 Pavel Zhukov <pzhukov@redhat.com> - 2.17-10
|
||||||
- Add gcc BR
|
- Add gcc BR
|
||||||
|
Loading…
Reference in New Issue
Block a user