summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2008-05-07 13:45:36 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2008-05-07 13:45:36 +0000
commite29678e8d6012a490a39e3a085fd78310d02ba8d (patch)
tree57e0988c128762346ac112e665995c90f29a2671 /sys/net
parent88f807347c751984afac27fa53bd5a278beba7e8 (diff)
enable tx mitigation when putting packets on the wire by switching from
calls to ifp->if_start to if_start(). these are the obviously right cases where we can do that, the less obvious ones may follow as theyre figured out. deraadt@ said to go for it
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bridgestp.c10
-rw-r--r--sys/net/if_atmsubr.c5
-rw-r--r--sys/net/if_bridge.c5
-rw-r--r--sys/net/if_fddisubr.c5
-rw-r--r--sys/net/if_gif.c5
-rw-r--r--sys/net/if_trunk.c5
-rw-r--r--sys/net/if_vlan.c5
7 files changed, 17 insertions, 23 deletions
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c
index 85a92695454..4d453eca00b 100644
--- a/sys/net/bridgestp.c
+++ b/sys/net/bridgestp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bridgestp.c,v 1.30 2007/11/26 09:28:33 martynas Exp $ */
+/* $OpenBSD: bridgestp.c,v 1.31 2008/05/07 13:45:35 dlg Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
@@ -402,8 +402,8 @@ bstp_transmit_tcn(struct bstp_state *bs, struct bstp_port *bp)
s = splnet();
bp->bp_txcount++;
IFQ_ENQUEUE(&ifp->if_snd, m, NULL, error);
- if (error == 0 && (ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
+ if (error == 0)
+ if_start(ifp);
splx(s);
}
@@ -535,8 +535,8 @@ bstp_send_bpdu(struct bstp_state *bs, struct bstp_port *bp,
bp->bp_txcount++;
IFQ_ENQUEUE(&ifp->if_snd, m, NULL, error);
- if (error == 0 && (ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
+ if (error == 0)
+ if_start(ifp);
done:
splx(s);
}
diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c
index 0594b071359..c9e9f9e28e1 100644
--- a/sys/net/if_atmsubr.c
+++ b/sys/net/if_atmsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atmsubr.c,v 1.26 2006/03/04 22:40:15 brad Exp $ */
+/* $OpenBSD: if_atmsubr.c,v 1.27 2008/05/07 13:45:35 dlg Exp $ */
/*
*
@@ -240,8 +240,7 @@ atm_output(ifp, m0, dst, rt0)
return (error);
}
ifp->if_obytes += len;
- if ((ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
+ if_start(ifp);
splx(s);
return (error);
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 1ab9e440f26..732f5433e23 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.167 2008/04/24 11:36:38 dlg Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.168 2008/05/07 13:45:35 dlg Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -2716,8 +2716,7 @@ bridge_ifenqueue(struct bridge_softc *sc, struct ifnet *ifp, struct mbuf *m)
ifp->if_obytes += len;
if (mflags & M_MCAST)
ifp->if_omcasts++;
- if ((ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
+ if_start(ifp);
return (0);
}
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 0bffb098838..e33adfb9a0a 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fddisubr.c,v 1.53 2007/10/13 14:21:01 fgsch Exp $ */
+/* $OpenBSD: if_fddisubr.c,v 1.54 2008/05/07 13:45:35 dlg Exp $ */
/* $NetBSD: if_fddisubr.c,v 1.5 1996/05/07 23:20:21 christos Exp $ */
/*
@@ -354,8 +354,7 @@ fddi_output(ifp0, m0, dst, rt0)
#endif /* NCARP > 0 */
if (mflags & M_MCAST)
ifp->if_omcasts++;
- if ((ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
+ if_start(ifp);
splx(s);
return (error);
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index 67249c1e99d..57509c9888d 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gif.c,v 1.48 2008/04/26 01:24:01 brad Exp $ */
+/* $OpenBSD: if_gif.c,v 1.49 2008/05/07 13:45:35 dlg Exp $ */
/* $KAME: if_gif.c,v 1.43 2001/02/20 08:51:07 itojun Exp $ */
/*
@@ -308,8 +308,7 @@ gif_output(ifp, m, dst, rt)
splx(s);
return (error);
}
- if ((ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
+ if_start(ifp);
splx(s);
return (error);
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c
index a30f2dc1ad9..89df84459e9 100644
--- a/sys/net/if_trunk.c
+++ b/sys/net/if_trunk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.c,v 1.41 2008/01/10 09:52:04 brad Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.42 2008/05/07 13:45:35 dlg Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -933,8 +933,7 @@ trunk_enqueue(struct ifnet *ifp, struct mbuf *m)
IFQ_ENQUEUE(&ifp->if_snd, m, NULL, error);
if (error)
return (error);
- if ((ifp->if_flags & IFF_OACTIVE) == 0)
- (*ifp->if_start)(ifp);
+ if_start(ifp);
ifp->if_obytes += m->m_pkthdr.len;
if (m->m_flags & M_MCAST)
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index b1b727e05d8..3fbcb96b89c 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan.c,v 1.72 2007/12/20 02:53:02 brad Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.73 2008/05/07 13:45:35 dlg Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
@@ -257,8 +257,7 @@ vlan_start(struct ifnet *ifp)
}
ifp->if_opackets++;
- if ((p->if_flags & (IFF_RUNNING|IFF_OACTIVE)) == IFF_RUNNING)
- p->if_start(p);
+ if_start(p);
}
ifp->if_flags &= ~IFF_OACTIVE;