aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2006-04-20 15:01:18 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2006-04-20 15:01:18 +0000
commit14873171c61dc843d09fc69b349c8a08c5fc8bbe (patch)
tree6d0f60c0d1226faeb43c0183502caf89a531f0ec /net-mgmt
parent4a999037a5319dcfb0d344f7be2f41caf9f2f647 (diff)
downloadports-14873171c61dc843d09fc69b349c8a08c5fc8bbe.tar.gz
ports-14873171c61dc843d09fc69b349c8a08c5fc8bbe.zip
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/choparp/Makefile2
-rw-r--r--net-mgmt/choparp/files/patch-choparp.c21
2 files changed, 17 insertions, 6 deletions
diff --git a/net-mgmt/choparp/Makefile b/net-mgmt/choparp/Makefile
index 493535244db6..1e066df0d420 100644
--- a/net-mgmt/choparp/Makefile
+++ b/net-mgmt/choparp/Makefile
@@ -7,7 +7,7 @@
PORTNAME= choparp
PORTVERSION= 20021107
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net-mgmt
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= choparp
diff --git a/net-mgmt/choparp/files/patch-choparp.c b/net-mgmt/choparp/files/patch-choparp.c
index 76c197045fbd..eb0351cdbc73 100644
--- a/net-mgmt/choparp/files/patch-choparp.c
+++ b/net-mgmt/choparp/files/patch-choparp.c
@@ -1,5 +1,5 @@
--- choparp.c.orig Fri Nov 8 07:36:03 2002
-+++ choparp.c Sat Apr 8 14:37:41 2006
++++ choparp.c Thu Apr 20 23:56:38 2006
@@ -42,6 +42,7 @@
#include <string.h>
#include <sys/types.h>
@@ -8,7 +8,18 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include <net/bpf.h>
-@@ -280,13 +281,22 @@
+@@ -239,6 +240,10 @@
+ fprintf(stderr,"checkarp: WARNING: received unknown type ARP request.\n");
+ return(0);
+ }
++ if (ntohl(*(u_int32_t *)(arp->arp_tpa)) == ntohl(*(u_int32_t *)(arp->arp_spa))) {
++ fprintf(stderr,"checkarp: WARNING: sender equal dest.\n");
++ return(0);
++ }
+ target_ip = ntohl(*(u_int32_t *)(arp->arp_tpa));
+ return match(target_ip, targets) && !match(target_ip, excludes);
+ }
+@@ -280,13 +285,22 @@
char *rframe;
char *sframe;
size_t frame_len;
@@ -35,7 +46,7 @@
if (r < 0) {
if (errno == EINTR)
-@@ -295,7 +305,7 @@
+@@ -295,7 +309,7 @@
return;
}
@@ -44,7 +55,7 @@
if (rlen < 0) {
if (errno == EINTR)
continue;
-@@ -307,7 +317,7 @@
+@@ -307,7 +321,7 @@
while((rframe = getarp(p, rlen, &nextp, &nextlen)) != NULL){
if (checkarp(rframe)){
sframe = gen_arpreply(rframe, &frame_len);
@@ -53,7 +64,7 @@
}
p = nextp;
rlen = nextlen;
-@@ -437,6 +447,9 @@
+@@ -437,6 +451,9 @@
#endif
if ((fd = openbpf(ifname, &buf, &buflen)) < 0)
return(-1);