update to lksctp-tools-1.0.17
This commit is contained in:
parent
5b1a424be4
commit
3a98b9e962
@ -1,10 +1,10 @@
|
|||||||
--- lksctp-tools-1.0.16/src/withsctp/withsctp.in.orig 2014-02-18 10:42:49.000000000 +0000
|
--- lksctp-tools-1.0.17/src/withsctp/withsctp.in.orig 2014-02-18 10:42:49.000000000 +0000
|
||||||
+++ lksctp-tools-1.0.16/src/withsctp/withsctp.in 2014-05-06 12:24:12.931873787 +0100
|
+++ lksctp-tools-1.0.17/src/withsctp/withsctp.in 2014-05-06 12:24:12.931873787 +0100
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- sh -*-
|
# -*- sh -*-
|
||||||
-LIBDIR=@libdir@/@PACKAGE@
|
-LIBDIR=@libdir@/@PACKAGE@
|
||||||
+LIBDIR=`rpm --eval "%{_libdir}"`/@PACKAGE@
|
+LIBDIR=`rpm --eval "%{_libdir}"`/@PACKAGE@
|
||||||
BINDIR=@bindir@
|
BINDIR=@bindir@
|
||||||
export LD_PRELOAD=${LIBDIR}/libwithsctp.so.1.0.16
|
export LD_PRELOAD=${LIBDIR}/libwithsctp.so.1.0.17
|
||||||
if ! ${BINDIR}/checksctp 2> /dev/null
|
if ! ${BINDIR}/checksctp 2> /dev/null
|
||||||
|
|||||||
Binary file not shown.
117
lksctp-tools-1.0.17-sctp_status-fix-hostname-resolution.patch
Normal file
117
lksctp-tools-1.0.17-sctp_status-fix-hostname-resolution.patch
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
From 18272a1f3cf8c3fe287c1bf8a007d0ef4de4cf2f Mon Sep 17 00:00:00 2001
|
||||||
|
Message-Id: <18272a1f3cf8c3fe287c1bf8a007d0ef4de4cf2f.1467043686.git.marcelo.leitner@gmail.com>
|
||||||
|
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
|
||||||
|
Date: Thu, 23 Jun 2016 18:27:26 -0300
|
||||||
|
Subject: [PATCH] sctp_status: fix hostname resolution
|
||||||
|
|
||||||
|
getaddrinfo already returns the IP address in binary format for the
|
||||||
|
given hostname/IP address, so there is no need to use inet_pton()
|
||||||
|
afterwards.
|
||||||
|
|
||||||
|
Such usage, actually, was causing localhost6 to be evaluated as ::.
|
||||||
|
|
||||||
|
Also, fix a leak on getaddrinfo results.
|
||||||
|
|
||||||
|
Signed-off-by: Marcelo R. Leitner <marcelo.leitner@gmail.com>
|
||||||
|
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
|
||||||
|
---
|
||||||
|
src/apps/sctp_status.c | 38 +++++++++++++++++++++++---------------
|
||||||
|
1 file changed, 23 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/apps/sctp_status.c b/src/apps/sctp_status.c
|
||||||
|
index 5bb48efc18074cb706112b10aa0d4a098954c3cd..46e9ca2af08ade626517a2d52bf0289d6be362e6 100644
|
||||||
|
--- a/src/apps/sctp_status.c
|
||||||
|
+++ b/src/apps/sctp_status.c
|
||||||
|
@@ -280,11 +280,12 @@ int main(int argc, char *argv[]) {
|
||||||
|
case AF_INET:
|
||||||
|
t_addr = (struct sockaddr_in *)&s_rem;
|
||||||
|
|
||||||
|
- t_addr->sin_family = AF_INET;
|
||||||
|
+ memcpy(t_addr, res->ai_addr,
|
||||||
|
+ res->ai_addrlen);
|
||||||
|
+ t_addr->sin_family = res->ai_family;
|
||||||
|
t_addr->sin_port = htons(remote_port);
|
||||||
|
- inet_pton(AF_INET, remote_host, &t_addr->sin_addr);
|
||||||
|
|
||||||
|
- r_len = sizeof (struct sockaddr_in);
|
||||||
|
+ r_len = res->ai_addrlen;
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
t_addr->sin_len = r_len;
|
||||||
|
#endif
|
||||||
|
@@ -292,13 +293,14 @@ int main(int argc, char *argv[]) {
|
||||||
|
case AF_INET6:
|
||||||
|
t_addr6 = (struct sockaddr_in6 *)&s_rem;
|
||||||
|
|
||||||
|
+ memcpy(t_addr6, res->ai_addr,
|
||||||
|
+ res->ai_addrlen);
|
||||||
|
+ t_addr6->sin6_family = res->ai_family;
|
||||||
|
+ t_addr6->sin6_port = htons(remote_port);
|
||||||
|
if (interface)
|
||||||
|
t_addr6->sin6_scope_id = if_nametoindex(interface);
|
||||||
|
- t_addr6->sin6_family = AF_INET6;
|
||||||
|
- t_addr6->sin6_port = htons(remote_port);
|
||||||
|
- inet_pton(AF_INET6, remote_host, &t_addr6->sin6_addr);
|
||||||
|
|
||||||
|
- r_len = sizeof (struct sockaddr_in6);
|
||||||
|
+ r_len = res->ai_addrlen;
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
t_addr6->sin6_len = r_len;
|
||||||
|
@@ -311,6 +313,8 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
DEBUG_PRINT(DEBUG_MAX, "remote:addr=%s, port=%s, family=%d\n",
|
||||||
|
host_s, serv_s, res->ai_family);
|
||||||
|
+
|
||||||
|
+ freeaddrinfo(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (local_host != NULL) {
|
||||||
|
@@ -342,11 +346,13 @@ int main(int argc, char *argv[]) {
|
||||||
|
switch (res->ai_family) {
|
||||||
|
case AF_INET:
|
||||||
|
t_addr = (struct sockaddr_in *)&s_loc;
|
||||||
|
- t_addr->sin_family = AF_INET;
|
||||||
|
+
|
||||||
|
+ memcpy(t_addr, res->ai_addr,
|
||||||
|
+ res->ai_addrlen);
|
||||||
|
+ t_addr->sin_family = res->ai_family;
|
||||||
|
t_addr->sin_port = htons(local_port);
|
||||||
|
- inet_pton(AF_INET, local_host, &t_addr->sin_addr);
|
||||||
|
|
||||||
|
- l_len = sizeof (struct sockaddr_in);
|
||||||
|
+ l_len = res->ai_addrlen;
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
t_addr->sin_len = l_len;
|
||||||
|
#endif
|
||||||
|
@@ -354,14 +360,14 @@ int main(int argc, char *argv[]) {
|
||||||
|
case AF_INET6:
|
||||||
|
t_addr6 = (struct sockaddr_in6 *)&s_loc;
|
||||||
|
|
||||||
|
+ memcpy(t_addr6, res->ai_addr,
|
||||||
|
+ res->ai_addrlen);
|
||||||
|
+ t_addr6->sin6_family = res->ai_family;
|
||||||
|
+ t_addr6->sin6_port = htons(local_port);
|
||||||
|
if (interface)
|
||||||
|
t_addr6->sin6_scope_id = if_nametoindex(interface);
|
||||||
|
- t_addr6->sin6_family = AF_INET6;
|
||||||
|
- t_addr6->sin6_port = htons(local_port);
|
||||||
|
|
||||||
|
- inet_pton(AF_INET6, local_host, &t_addr6->sin6_addr);
|
||||||
|
-
|
||||||
|
- l_len = sizeof (struct sockaddr_in6);
|
||||||
|
+ l_len = res->ai_addrlen;
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
t_addr6->sin6_len = l_len;
|
||||||
|
@@ -377,6 +383,8 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
DEBUG_PRINT(DEBUG_MAX, "local:addr=%s, port=%s, family=%d\n",
|
||||||
|
host_s, serv_s, res->ai_family);
|
||||||
|
+
|
||||||
|
+ freeaddrinfo(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Let the testing begin. */
|
||||||
|
--
|
||||||
|
2.5.5
|
||||||
|
|
||||||
BIN
lksctp-tools-1.0.17.tar.gz
Normal file
BIN
lksctp-tools-1.0.17.tar.gz
Normal file
Binary file not shown.
@ -1,83 +1,95 @@
|
|||||||
Name: lksctp-tools
|
Summary: User-space access to Linux Kernel SCTP
|
||||||
Version: 1.0.16
|
Name: lksctp-tools
|
||||||
Release: 11
|
Version: 1.0.17
|
||||||
Summary: Linux Kernel Stream Control Transmission Protocol Tools
|
Release: 1%{?dist}
|
||||||
|
# src/apps/bindx_test.C is GPLv2, I've asked upstream for clarification
|
||||||
License: GPLv2 and GPLv2+ and LGPLv2 and MIT
|
License: GPLv2 and GPLv2+ and LGPLv2 and MIT
|
||||||
URL: http://lksctp.sourceforge.net
|
Group: System Environment/Libraries
|
||||||
Source0: https://downloads.sourceforge.net/project/lksctp/lksctp-tools/%{name}-%{version}.tar.gz
|
URL: http://lksctp.sourceforge.net
|
||||||
|
Source0: http://downloads.sourceforge.net/lksctp/%{name}-%{version}.tar.gz
|
||||||
BuildRequires: make gcc libtool autoconf automake
|
Patch0: lksctp-tools-1.0.16-libdir.patch
|
||||||
|
Patch1: lksctp-tools-1.0.17-sctp_status-fix-hostname-resolution.patch
|
||||||
|
BuildRequires: libtool, automake, autoconf
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The lksctp-tools project provides a Linux user space library for SCTP (libsctp)
|
This is the lksctp-tools package for Linux Kernel SCTP (Stream Control
|
||||||
including C language header files (netinet/sctp.h) for accessing SCTP specific
|
Transmission Protocol) Reference Implementation.
|
||||||
application programming interfaces not provided by the standard sockets,
|
|
||||||
and also some helper utilities around SCTP.
|
|
||||||
|
|
||||||
For more information on the features and functions currently supported by
|
This package is intended to supplement the Linux Kernel SCTP Reference
|
||||||
lksctp, please refer to the documentation in the Linux kernel resp. in the
|
Implementation now available in the Linux kernel source tree in
|
||||||
lksctp-tools package. The lksctp-tools source contains a set of test programs
|
versions 2.5.36 and following. For more information on LKSCTP see the
|
||||||
which would also serve as example applications.
|
package documentation README file, section titled "LKSCTP - Linux
|
||||||
|
Kernel SCTP."
|
||||||
|
|
||||||
|
This package contains the base run-time library and command-line tools.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for %{name}
|
Summary: Development files for lksctp-tools
|
||||||
Requires: %{name} = %{version}-%{release}
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Development files for %{name} which include header files and dynamic
|
Development files for lksctp-tools which include man pages, header files,
|
||||||
libraries.
|
static libraries, symlinks to dynamic libraries and some tutorial source code.
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
Summary: Documents pertaining to SCTP
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
%package_help
|
%description doc
|
||||||
|
Documents pertaining to LKSCTP & SCTP in general (IETF RFC's & Internet
|
||||||
|
Drafts).
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version} -p1
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
rm -rf configure && sh bootstrap
|
[ ! -x ./configure ] && sh bootstrap
|
||||||
%configure --disable-static
|
%configure --disable-static
|
||||||
%disable_rpath
|
# remove rpath from libtool
|
||||||
%make_build
|
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||||
|
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||||
|
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
rm -f doc/rfc2960.txt doc/states.txt
|
||||||
%delete_la
|
make install DESTDIR="$RPM_BUILD_ROOT" INSTALL="install -p"
|
||||||
|
|
||||||
|
find $RPM_BUILD_ROOT/%{_libdir}/ -name "*.la" | xargs rm -f
|
||||||
|
|
||||||
%pre
|
|
||||||
%preun
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
%files
|
%defattr(-,root,root,-)
|
||||||
%defattr(-,root,root)
|
%doc AUTHORS ChangeLog COPYING* README
|
||||||
%license COPYING*
|
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_libdir}/libsctp.so.*
|
%{_libdir}/libsctp.so.*
|
||||||
|
%dir %{_libdir}/lksctp-tools/
|
||||||
%{_libdir}/lksctp-tools/libwithsctp.so.*
|
%{_libdir}/lksctp-tools/libwithsctp.so.*
|
||||||
|
%{_mandir}/man7/*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
%{_includedir}/*
|
%{_includedir}/*
|
||||||
%{_libdir}/libsctp.so
|
%{_libdir}/libsctp.so
|
||||||
%{_libdir}/lksctp-tools/libwithsctp.so
|
%{_libdir}/lksctp-tools/libwithsctp.so
|
||||||
|
%{_libdir}/pkgconfig/libsctp.pc
|
||||||
%{_datadir}/lksctp-tools/
|
%{_datadir}/lksctp-tools/
|
||||||
|
|
||||||
|
|
||||||
%files help
|
|
||||||
%doc AUTHORS ChangeLog README doc/*.txt
|
|
||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
%{_mandir}/man7/*
|
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc doc/*.txt
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Jun 30 2020 hanhui <hanhui15@huawei.com> - 1.0.17-1
|
||||||
|
- openEuler Mainline Update to 1.0.17
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Thu Nov 28 2019 Qianbiao.NG <Qianbiao.NG@turnbig.net> - 1.0.16-11
|
* Thu Nov 28 2019 Qianbiao.NG <Qianbiao.NG@turnbig.net> - 1.0.16-11
|
||||||
- Repackage for openEuler OS
|
- repackage for openEuler OS
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user