diff options
author | frederik | 2018-02-22 16:54:08 +0100 |
---|---|---|
committer | frederik | 2018-02-22 16:54:08 +0100 |
commit | 4ff287a3ec9ea0a06f06a8110fd1261c5349c004 (patch) | |
tree | 03e765d96ae13b5c6de0e74393e251cc670b77f4 | |
parent | 04116c86b630e6cf458fb9fa841d641e526d432c (diff) | |
download | aur-4ff287a3ec9ea0a06f06a8110fd1261c5349c004.tar.gz |
fix patch
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | sendip-2.5.patch | 28 |
3 files changed, 23 insertions, 17 deletions
@@ -1,9 +1,7 @@ -# Generated by mksrcinfo v8 -# Thu Apr 6 13:41:41 UTC 2017 pkgbase = sendip pkgdesc = A commandline tool to allow sending arbitrary IP packets. pkgver = 2.5 - pkgrel = 6 + pkgrel = 7 url = https://www-x.antd.nist.gov/ipv6/sendip.html arch = i686 arch = x86_64 @@ -12,7 +10,7 @@ pkgbase = sendip source = https://www-x.antd.nist.gov/ipv6/sendip/sendip-2.5-mec-3a2.tar.gz source = sendip-2.5.patch sha512sums = 5ab1a7b58c41f795dde40c46c679e62926f9b9a69ba7a22caedc677a2cd32091b97a554d2f0915dc72aa1c4968daa5b8b080d0b442ee2c6cbbc43eb8ae9845ee - sha512sums = 3a6ed290e3e9ca4094e399885930d90e072ab44837d2474e8c662c5a60d82749e084a157dcc46ce613d4f768f960dbbd73b43f0babfc2fe8385c1e424f09c884 + sha512sums = 8e198c18042e7d2fc3559315196ee0899738d2483ec2349f0f5e449e9a94758281900fd95bdb24c14a7b9e874c9452076ff5ab51ed573634e850655bbde48faa pkgname = sendip @@ -4,7 +4,7 @@ pkgname=sendip pkgver=2.5 _pkgver=3 -pkgrel=6 +pkgrel=7 pkgdesc='A commandline tool to allow sending arbitrary IP packets.' arch=('i686' 'x86_64' ) url='https://www-x.antd.nist.gov/ipv6/sendip.html' @@ -13,12 +13,12 @@ depends=('glibc') source=(https://www-x.antd.nist.gov/ipv6/sendip/sendip-${pkgver}-mec-3a2.tar.gz ${pkgname}-${pkgver}.patch) sha512sums=('5ab1a7b58c41f795dde40c46c679e62926f9b9a69ba7a22caedc677a2cd32091b97a554d2f0915dc72aa1c4968daa5b8b080d0b442ee2c6cbbc43eb8ae9845ee' - '3a6ed290e3e9ca4094e399885930d90e072ab44837d2474e8c662c5a60d82749e084a157dcc46ce613d4f768f960dbbd73b43f0babfc2fe8385c1e424f09c884') + '8e198c18042e7d2fc3559315196ee0899738d2483ec2349f0f5e449e9a94758281900fd95bdb24c14a7b9e874c9452076ff5ab51ed573634e850655bbde48faa') prepare() { cd "${srcdir}/${pkgname}-${pkgver}-mec-${_pkgver}" # reformat some while loops to prevent compilation errors - patch < "${srcdir}/${pkgname}-${pkgver}.patch" + patch -p1 < "${srcdir}/${pkgname}-${pkgver}.patch" sed -i 's|_BSD_SOURCE|_DEFAULT_SOURCE|' csum.c } diff --git a/sendip-2.5.patch b/sendip-2.5.patch index 8b25ec850f67..59eb5ae1fa77 100644 --- a/sendip-2.5.patch +++ b/sendip-2.5.patch @@ -1,16 +1,26 @@ +diff --git a/mec/protoname.c b/mec/protoname.c +index 4fee90e..f4183b4 100644 +--- a/mec/protoname.c ++++ b/mec/protoname.c +@@ -14,6 +14,7 @@ + #include <string.h> + #include <netdb.h> + #include <sys/types.h> ++#include <ctype.h> + + #include "mec/ipv6ext.h" + 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) { +@@ -63,7 +63,8 @@ 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'; -+ } ++ 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'; @@ -18,15 +28,13 @@ 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) { +@@ -77,7 +77,8 @@ 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'; -+ } ++ while(*(q++)!='/') /* do nothing */; ++ *(--q)='\0'; ripopt->prefix = (p==q)?in6addr_any:inet6_addr(p); p=++q; while(*(q++)!='/') /* do nothing */; *(--q)='\0'; |