summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfrederik2017-04-06 15:33:00 +0200
committerfrederik2017-04-06 15:33:00 +0200
commitbd3fb1e02936cea7736cdd0ed1eb5286701b22fa (patch)
tree3720799402b782a94c053537a9f78e96e6a5f588
parent512d438b8f36aaac6f538b24a8b81b1b02ebc24b (diff)
downloadaur-bd3fb1e02936cea7736cdd0ed1eb5286701b22fa.tar.gz
fix compilation errors and change upstream to www-x.antd.nist.gov
-rw-r--r--PKGBUILD30
-rw-r--r--sendip-2.5.patch122
2 files changed, 47 insertions, 105 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 82d102df13be..bb27eaa9aa48 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,33 @@
-# Maintainer: Daniel Nagy <danielnagy at gmx de>
+# Maintainer: Frederik Schwan <frederik dot schwan at linux dot com>
+# Contributor: Daniel Nagy <danielnagy at gmx de>
pkgname=sendip
pkgver=2.5
-pkgrel=4
-pkgdesc="A commandline tool to allow sending arbitrary IP packets."
+_pkgver=3
+pkgrel=5
+pkgdesc='A commandline tool to allow sending arbitrary IP packets.'
arch=('i686' 'x86_64' )
+url='https://www-x.antd.nist.gov/ipv6/sendip.html'
license=('GPL')
depends=('glibc')
-url="http://www.earth.li/projectpurple/progs/sendip.html"
-source=("http://www.earth.li/projectpurple/files/sendip-$pkgver.tar.gz" "$pkgname-$pkgver.patch" )
-sha1sums=('478fee7b67134cbcc0f353dbb12dbd54625d7b01'
- '083883400bcf6190131253ca9ea1a12d5362722a')
+source=(https://www-x.antd.nist.gov/ipv6/sendip/sendip-${pkgver}-mec-3a2.tar.gz
+ ${pkgname}-${pkgver}.patch)
+sha512sums=('5ab1a7b58c41f795dde40c46c679e62926f9b9a69ba7a22caedc677a2cd32091b97a554d2f0915dc72aa1c4968daa5b8b080d0b442ee2c6cbbc43eb8ae9845ee'
+ '9696d8489954925d884d6330ff26d3b0cdf6ea37cae93124c0eaaed8913c51355e946c00d573439e30b3427413617c3564ccbf5203da82b38aacdbde4087aa35')
prepare() {
- cd "${srcdir}"/$pkgname-$pkgver
- sed -i "s#-fPIC#& -O2#" Makefile
- # patch the source code
- patch < "$srcdir"/$pkgname-$pkgver.patch
+ cd "${srcdir}/${pkgname}-${pkgver}-mec-${_pkgver}"
+ # reformat some while loops to prevent compilation errors
+ patch < "${srcdir}/${pkgname}-${pkgver}.patch"
sed -i 's|_BSD_SOURCE|_DEFAULT_SOURCE|' csum.c
}
build() {
- cd "${srcdir}"/$pkgname-$pkgver
+ cd "${srcdir}/${pkgname}-${pkgver}-mec-${_pkgver}"
make PREFIX=/usr
}
package() {
- cd "${srcdir}"/$pkgname-$pkgver
- make PREFIX=$pkgdir/usr install
+ cd "${srcdir}/${pkgname}-${pkgver}-mec-${_pkgver}"
+ make PREFIX="${pkgdir}/usr" install
}
diff --git a/sendip-2.5.patch b/sendip-2.5.patch
index a5aedb5d7d76..51bf754a671f 100644
--- a/sendip-2.5.patch
+++ b/sendip-2.5.patch
@@ -1,92 +1,32 @@
-Common subdirectories: sendip-2.5/contrib and sendip-2.5-a/contrib
-diff -up sendip-2.5/ipv4.c sendip-2.5-a/ipv4.c
---- sendip-2.5/ipv4.c 2003-04-21 21:23:22.000000000 +0800
-+++ sendip-2.5-a/ipv4.c 2009-02-11 09:16:13.000000000 +0800
-@@ -204,7 +204,7 @@ bool do_opt(char *opt, char *arg, sendip
- if(!strcmp(opt+2, "num")) {
- /* Other options (auto legnth) */
- u_int8_t cp, cls, num, len;
-- u_int8_t *data = malloc(strlen(arg)+2);
-+ char *data = malloc(strlen(arg)+2);
- if(!data) {
- fprintf(stderr,"Out of memory!\n");
- return FALSE;
-@@ -214,7 +214,7 @@ bool do_opt(char *opt, char *arg, sendip
- cp=(*data&0x80)>>7;
- cls=(*data&0x60)>>5;
- num=(*data&0x1F);
-- addoption(cp,cls,num,len+1,data+1,pack);
-+ addoption(cp,cls,num,len+1,(u_int8_t*)(data+1),pack);
- free(data);
- } else if(!strcmp(opt+2, "eol")) {
- /* End of list */
-@@ -226,7 +226,7 @@ bool do_opt(char *opt, char *arg, sendip
- /* Record route
- * Format is the same as for loose source route
- */
-- char *data = strdup(arg);
-+ char *data = strdup(arg);
- u_int8_t len;
- if(!data) {
- fprintf(stderr,"Out of memory!\n");
-@@ -237,7 +237,7 @@ bool do_opt(char *opt, char *arg, sendip
- free(data);
- return FALSE;
- } else {
-- addoption(0,0,7,len+2,data,pack);
-+ addoption(0,0,7,len+2,(u_int8_t*)data,pack);
- free(data);
- }
- } else if(!strcmp(opt+2, "ts")) {
-@@ -352,7 +352,7 @@ bool do_opt(char *opt, char *arg, sendip
- data_in = next;
- }
+diff --git a/rip.c b/rip.c
+index bda372d..a13a9e2 100644
+--- a/rip.c
++++ b/rip.c
+@@ -63,7 +63,10 @@ bool do_opt(char *opt, char *arg, sendip_data *pack) {
+ ripopt = RIP_OPTION(pack);
+ p=q=arg;
+ /* TODO: if arg is malformed, this could segfault */
+- while(*(q++)!=':') /* do nothing */; *(--q)='\0';
++ while(*(q++)!='/') {
++ /* do nothing */;
++ *(--q)='\0';
++ }
+ rippack->addressFamily= htons((p==q)?2:(u_int16_t)strtoul(p, (char **)0, 0));
+ pack->modified |= RIP_MOD_ADDRFAM;
+ p=++q; while(*(q++)!=':') /* do nothing */; *(--q)='\0';
+diff --git a/ripng.c b/ripng.c
+index 1dab2a1..fec2de6 100644
+--- a/ripng.c
++++ b/ripng.c
+@@ -77,7 +77,10 @@ bool do_opt(char *opt, char *arg, sendip_data *pack) {
+ ripopt = RIPNG_ENTRY(pack);
+ p=q=arg;
+ /* TODO: if arg is malformed, this could segfault */
+- while(*(q++)!='/') /* do nothing */; *(--q)='\0';
++ while(*(q++)!='/') {
++ /* do nothing */;
++ *(--q)='\0';
++ }
+ ripopt->prefix = (p==q)?in6addr_any:inet6_addr(p);
-- addoption(0,2,4,data_out-data+2,data,pack);
-+ addoption(0,2,4,data_out-data+2,(u_int8_t*)data,pack);
- free(data);
- /* End of timestamp parsing */
-
-@@ -377,7 +377,7 @@ bool do_opt(char *opt, char *arg, sendip
- free(data);
- return FALSE;
- } else {
-- addoption(1,0,3,len+2,data,pack);
-+ addoption(1,0,3,len+2,(u_int8_t*)data,pack);
- free(data);
- }
- } else if(!strcmp(opt+2, "sid")) {
-@@ -399,7 +399,7 @@ bool do_opt(char *opt, char *arg, sendip
- free(data);
- return FALSE;
- } else {
-- addoption(1,0,9,len+2,data,pack);
-+ addoption(1,0,9,len+2,(u_int8_t*)data,pack);
- free(data);
- }
- } else {
-Only in sendip-2.5-a: sendip.1
-Only in sendip-2.5-a: sendip.spec
-diff -up sendip-2.5/tcp.c sendip-2.5-a/tcp.c
---- sendip-2.5/tcp.c 2003-06-11 04:15:43.000000000 +0800
-+++ sendip-2.5-a/tcp.c 2009-02-11 09:18:06.000000000 +0800
-@@ -204,8 +204,8 @@ bool do_opt(char *opt, char *arg, sendip
- fprintf(stderr,"Out of memory!\n");
- return FALSE;
- }
-- sprintf(data,"0x%s",arg);
-- len = compact_string(data);
-+ sprintf((char*)data,"0x%s",arg);
-+ len = compact_string((char*)data);
- if(len==1)
- addoption(*data,1,NULL,pack);
- else
-@@ -230,7 +230,7 @@ bool do_opt(char *opt, char *arg, sendip
- addoption(4,2,NULL,pack);
- } else if (!strcmp(opt+2, "sack")) {
- /* Selective Acknowledge rfc1323 */
-- unsigned char *next;
-+ char *next;
- u_int32_t le, re;
- u_int8_t *comb, *c;
- int count=0;
+ p=++q; while(*(q++)!='/') /* do nothing */; *(--q)='\0';