New package: udptunnel-1.1

all patches from current ubuntu were picked
https://launchpad.net/ubuntu/+source/udptunnel/1.1-5
This commit is contained in:
Piraty 2019-07-22 00:37:23 +02:00 committed by Piraty
parent 719faa3bf9
commit de24010a75
4 changed files with 106 additions and 0 deletions

View file

@ -0,0 +1,16 @@
# src: ubuntu
Description: Fix issue where udptunnel was failing to receive packets sent to a multicast address. (See #254834).
Author: singh_chinmay@extenprise.net
--- udptunnel.c
+++ udptunnel.c
@@ -217,7 +217,7 @@
(*relays)[i].udpaddr.sin_port = htons(udpport + i);
(*relays)[i].udpaddr.sin_family = AF_INET;
(*relays)[i].udp_ttl = udpttl;
- (*relays)[i].multicast_udp = IN_MULTICAST(htons(udpaddr.s_addr));
+ (*relays)[i].multicast_udp = IN_MULTICAST(htonl(udpaddr.s_addr));
(*relays)[i].tcpaddr.sin_addr = tcpaddr;
(*relays)[i].tcpaddr.sin_port = htons(tcpport + i);

View file

@ -0,0 +1,16 @@
# src: ubuntu
Description: Include string.h header for strlen prototype for GCC 4.4. compatibility.
Author: Chris Lamb <chris@chris-lamb.co.uk>
diff -urNad /tmp/bp-build/udptunnel-1.1.orig.orig/host2ip.c /tmp/bp-build/udptunnel-1.1.orig/host2ip.c
--- host2ip.c 2008-08-28 07:50:41.000000000 +0100
+++ host2ip.c 2008-08-28 07:50:49.000000000 +0100
@@ -6,6 +6,7 @@
#include <arpa/inet.h> /* inet_addr() */
#include <rpcsvc/ypclnt.h> /* YP */
#include <ctype.h> /* isspace() */
+#include <string.h> /* strlen() */
#include "host2ip.h"

View file

@ -0,0 +1,54 @@
# reason: rpcsvc/ypclnt.h is only present in glibc, so check for it
--- configure.in
+++ configure.in
@@ -19,6 +19,7 @@
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
+AC_CHECK_HEADERS(rpcsvc/ypclnt.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_SIZEOF(short)
--- host2ip.c
+++ host2ip.c
@@ -4,7 +4,9 @@
#include <netdb.h> /* gethostbyname() */
#include <netinet/in.h> /* sockaddr_in */
#include <arpa/inet.h> /* inet_addr() */
+#ifdef HAVE_RPCSVC_YPCLNT_H
#include <rpcsvc/ypclnt.h> /* YP */
+#endif
#include <ctype.h> /* isspace() */
#include <string.h> /* strlen() */
@@ -27,6 +29,8 @@
while (*host && isspace((int)*host)) host++;
}
+ /* pre-set */
+ in.s_addr = INADDR_ANY;
/* Check whether this is a dotted decimal. */
if (!host) {
in.s_addr = INADDR_ANY;
@@ -38,6 +42,7 @@
else if ((hep = gethostbyname(host))) {
in = *(struct in_addr *)(hep->h_addr_list[0]);
}
+#ifdef HAVE_RPCSVC_YPCLNT_H && USE_NIS
/* As a last resort, try YP. */
else {
static char *domain = 0; /* YP domain */
@@ -47,10 +52,8 @@
if (!domain) yp_get_default_domain(&domain);
if (yp_match(domain, "hosts.byname", host, strlen(host), &value, &value_len) == 0) {
in.s_addr = inet_addr(value);
- } else {
- /* Everything failed */
- in.s_addr = INADDR_ANY;
}
}
+#endif
return in;
} /* host2ip */

View file

@ -0,0 +1,20 @@
# Template file for 'udptunnel'
pkgname=udptunnel
version=1.1
revision=1
build_style=gnu-configure
hostmakedepends="automake"
short_desc="Tunnel UDP packets over a TCP connection"
maintainer="Piraty <piraty1@inbox.ru>"
license="BSD-3-Clause"
homepage="http://www.cs.columbia.edu/~lennox/udptunnel/"
distfiles="http://www.cs.columbia.edu/~lennox/udptunnel/udptunnel-${version}.tar.gz"
checksum=45c0e12045735bc55734076ebbdc7622c746d1fe4e6f7267fa122e2421754670
pre_configure() {
autoreconf -vfi
}
post_install() {
vlicense COPYRIGHT
vdoc udptunnel.html
}