diff options
author | emax <emax@FreeBSD.org> | 2005-05-04 18:55:03 +0000 |
---|---|---|
committer | emax <emax@FreeBSD.org> | 2005-05-04 18:55:03 +0000 |
commit | a52b6c9ce3aa7dd40c5d127ac564eff86c4b0aa9 (patch) | |
tree | 23d014d52a31e5e55ad4c1184ad09e522e889e51 /sys/net | |
parent | 40a0d434da94827c13d74391779c80cde4aa9b35 (diff) | |
download | FreeBSD-src-a52b6c9ce3aa7dd40c5d127ac564eff86c4b0aa9.zip FreeBSD-src-a52b6c9ce3aa7dd40c5d127ac564eff86c4b0aa9.tar.gz |
Change m_uiotombuf so it will accept offset at which data should be copied
to the mbuf. Offset cannot exceed MHLEN bytes. This is currently used to
fix Ethernet header alignment problem on alpha and sparc64. Also change all
users of m_uiotombuf to pass proper offset.
Reviewed by: jmg, sam
Tested by: Sten Spans "sten AT blinkenlights DOT nl"
MFC after: 1 week
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_tap.c | 2 | ||||
-rw-r--r-- | sys/net/if_tun.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index cc07baf..2f7474b 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -827,7 +827,7 @@ tapwrite(dev, uio, flag) return (EIO); } - if ((m = m_uiotombuf(uio, M_DONTWAIT, 0)) == NULL) { + if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, ETHER_ALIGN)) == NULL) { ifp->if_ierrors ++; return (error); } diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 6fe7b10..cd209cb 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -761,7 +761,7 @@ tunwrite(struct cdev *dev, struct uio *uio, int flag) return (EIO); } - if ((m = m_uiotombuf(uio, M_DONTWAIT, 0)) == NULL) { + if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, 0)) == NULL) { ifp->if_ierrors++; return (error); } |