From f9d31474cf75fea2b7c230270e568b53cc4c7ca2 Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 25 Nov 2010 13:24:49 +0100 Subject: [PATCH 1/2] Initial import (#656855) --- .gitignore | 1 + omping.spec | 39 +++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 41 insertions(+) create mode 100644 omping.spec diff --git a/.gitignore b/.gitignore index e69de29..5730357 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/omping-0.0.1.tar.gz diff --git a/omping.spec b/omping.spec new file mode 100644 index 0000000..1d05dce --- /dev/null +++ b/omping.spec @@ -0,0 +1,39 @@ +Name: omping +Version: 0.0.1 +Release: 2%{?dist} +Summary: Utility to test IP multicast functionality +Group: Applications/Internet +License: ISC +URL: http://fedorahosted.org/omping/ +Source0: http://fedorahosted.org/releases/o/m/omping/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +Omping (Open Multicast Ping) is tool to test IP multicast functionality +primarily in local network. + +%prep +%setup -q + +%build +make %{?_smp_mflags} CFLAGS="%{optflags}" + +%install +rm -rf %{buildroot} +make DESTDIR="%{buildroot}" PREFIX="%{_prefix}" install + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING +%{_bindir}/%{name} +%{_mandir}/man8/* + +%changelog +* Wed Nov 24 2010 Jan Friesse - 0.0.1-2 +- Change hard coded prefix path to macro + +* Fri Nov 19 2010 Jan Friesse - 0.0.1-1 +- Initial package for Fedora diff --git a/sources b/sources index e69de29..8a0463a 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +9d1c4e66ae6f35b4ace6dbcc94eb66cb omping-0.0.1.tar.gz From 23ad6432301ac75ada7da8ca943f10191d21950f Mon Sep 17 00:00:00 2001 From: Jan Friesse Date: Thu, 14 Apr 2011 14:01:55 +0200 Subject: [PATCH 2/2] getifaddrs may return NULL ifa_addr (tt#31) - Resolves rhbz#696509 --- ...-getifaddrs-may-return-NULL-ifa_addr.patch | 32 +++++++++++++++++++ omping.spec | 7 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 omping-001-getifaddrs-may-return-NULL-ifa_addr.patch diff --git a/omping-001-getifaddrs-may-return-NULL-ifa_addr.patch b/omping-001-getifaddrs-may-return-NULL-ifa_addr.patch new file mode 100644 index 0000000..a80a0f0 --- /dev/null +++ b/omping-001-getifaddrs-may-return-NULL-ifa_addr.patch @@ -0,0 +1,32 @@ +From 220749b10250154f95aa05c8b948cbe7015a2daa Mon Sep 17 00:00:00 2001 +From: Jan Friesse +Date: Thu, 14 Apr 2011 13:53:08 +0200 +Subject: [PATCH] getifaddrs may return NULL ifa_addr + +Such ifa_addr is then dereferenced to find out address family. +Proper check is added now. + +Resolves: tt#31 +--- + addrfunc.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/addrfunc.c b/addrfunc.c +index d6aa3cb..77fac4c 100644 +--- a/addrfunc.c ++++ b/addrfunc.c +@@ -260,8 +260,9 @@ af_find_local_ai(const struct ai_list *ai_list, int *ip_ver, struct ifaddrs **if + TAILQ_FOREACH(aip, ai_list, entries) { + for (ai_i = aip->ai; ai_i != NULL; ai_i = ai_i->ai_next) { + for (ifa_i = ifa; ifa_i != NULL; ifa_i = ifa_i->ifa_next) { +- if (ifa_i->ifa_addr->sa_family != AF_INET && +- ifa_i->ifa_addr->sa_family != AF_INET6) { ++ if (ifa_i->ifa_addr == NULL || ++ (ifa_i->ifa_addr->sa_family != AF_INET && ++ ifa_i->ifa_addr->sa_family != AF_INET6)) { + continue ; + } + +-- +1.7.3.4 + diff --git a/omping.spec b/omping.spec index 1d05dce..a10105a 100644 --- a/omping.spec +++ b/omping.spec @@ -1,11 +1,12 @@ Name: omping Version: 0.0.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Utility to test IP multicast functionality Group: Applications/Internet License: ISC URL: http://fedorahosted.org/omping/ Source0: http://fedorahosted.org/releases/o/m/omping/%{name}-%{version}.tar.gz +Patch0: omping-001-getifaddrs-may-return-NULL-ifa_addr.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description @@ -14,6 +15,7 @@ primarily in local network. %prep %setup -q +%patch0 -p1 %build make %{?_smp_mflags} CFLAGS="%{optflags}" @@ -32,6 +34,9 @@ rm -rf %{buildroot} %{_mandir}/man8/* %changelog +* Wed Apr 14 2011 Jan Friesse - 0.0.1-3 +- Resolves rhbz#696509 + * Wed Nov 24 2010 Jan Friesse - 0.0.1-2 - Change hard coded prefix path to macro