aboutsummaryrefslogtreecommitdiff
path: root/net/aoe
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2014-10-02 16:23:31 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2014-10-02 16:23:31 +0000
commit4f3b9e29112f0159994055482d0ad8c76cc4b53b (patch)
tree7f671fde2def0f556ebde0cd4d916a25bce5b58d /net/aoe
parent77eccc73f87c77e11b5c1d42cc8c02cdb715827f (diff)
downloadports-4f3b9e29112f0159994055482d0ad8c76cc4b53b.tar.gz
ports-4f3b9e29112f0159994055482d0ad8c76cc4b53b.zip
Notes
Diffstat (limited to 'net/aoe')
-rw-r--r--net/aoe/Makefile2
-rw-r--r--net/aoe/files/patch-aoenet.c74
2 files changed, 70 insertions, 6 deletions
diff --git a/net/aoe/Makefile b/net/aoe/Makefile
index 0f881b84a406..756933489d08 100644
--- a/net/aoe/Makefile
+++ b/net/aoe/Makefile
@@ -3,7 +3,7 @@
PORTNAME= aoe
PORTVERSION= 1.2.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net kld
MASTER_SITES= http://www.son.org/download/
DISTNAME= ${PORTNAME}-freebsd-${PORTVERSION}
diff --git a/net/aoe/files/patch-aoenet.c b/net/aoe/files/patch-aoenet.c
index a8d7dcd0d4ef..56eec89d559b 100644
--- a/net/aoe/files/patch-aoenet.c
+++ b/net/aoe/files/patch-aoenet.c
@@ -1,5 +1,5 @@
---- aoenet.c.orig 2006-05-25 23:10:11.000000000 +0700
-+++ aoenet.c 2014-09-14 02:02:02.000000000 +0700
+--- aoenet.c.orig 2006-05-25 20:10:11.000000000 +0400
++++ aoenet.c 2014-10-02 20:18:23.000000000 +0400
@@ -77,8 +77,11 @@
#define NECODES (sizeof(aoe_errlist) / sizeof(char *) - 1)
#if (__FreeBSD_version < 600000)
@@ -103,7 +103,31 @@
}
-@@ -384,9 +416,9 @@
+@@ -362,7 +394,11 @@
+ */
+ if ((m->m_flags & M_PKTHDR) == 0) {
+ if_printf(ifp, "discard frame w/o packet header\n");
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
++#else
+ ifp->if_ierrors++;
++#endif
+ m_freem(m);
+ return;
+ }
+@@ -371,7 +407,11 @@
+ if_printf(ifp, "discard frame w/o leading ethernet "
+ "header (len %u pkt len %u)\n",
+ m->m_len, m->m_pkthdr.len);
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
++#else
+ ifp->if_ierrors++;
++#endif
+ m_freem(m);
+ return;
+ }
+@@ -384,17 +424,25 @@
if (m->m_pkthdr.len >
ETHER_MAX_FRAME(ifp, etype, m->m_flags & M_HASFCS)) {
if_printf(ifp, "discard oversize frame "
@@ -113,9 +137,49 @@
- ETHER_MAX_FRAME(ifp, etype,
+ (int) ETHER_MAX_FRAME(ifp, etype,
m->m_flags & M_HASFCS));
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
++#else
ifp->if_ierrors++;
++#endif
m_freem(m);
-@@ -472,7 +504,11 @@
+ return;
+ }
+ if (m->m_pkthdr.rcvif == NULL) {
+ if_printf(ifp, "discard frame w/o interface pointer\n");
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
++#else
+ ifp->if_ierrors++;
++#endif
+ m_freem(m);
+ return;
+ }
+@@ -417,7 +465,11 @@
+ m->m_flags &= ~M_HASFCS;
+ }
+
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len);
++#else
+ ifp->if_ibytes += m->m_pkthdr.len;
++#endif
+
+ if (ETHER_IS_MULTICAST(eh->ether_dhost)) {
+ if (bcmp(etherbroadcastaddr, eh->ether_dhost,
+@@ -427,7 +479,11 @@
+ m->m_flags |= M_MCAST;
+ }
+ if (m->m_flags & (M_BCAST|M_MCAST))
++#if __FreeBSD_version >= 1100036
++ if_inc_counter(ifp, IFCOUNTER_IMCASTS, 1);
++#else
+ ifp->if_imcasts++;
++#endif
+
+ aoeintr(m);
+ /* netisr_dispatch(NETISR_AOE, m); */
+@@ -472,7 +528,11 @@
IFNET_RLOCK();
TAILQ_FOREACH(ifp, &ifnet, if_link) {
@@ -127,7 +191,7 @@
case IFT_ETHER:
case IFT_FASTETHER:
case IFT_GIGABITETHERNET:
-@@ -501,7 +537,11 @@
+@@ -501,7 +561,11 @@
IFNET_RLOCK();
TAILQ_FOREACH(ifp, &ifnet, if_link) {