summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/hdlc.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-03-29 08:21:28 +0000
committerbrian <brian@FreeBSD.org>1999-03-29 08:21:28 +0000
commit539d220871d789543afc7e3744e712d33128ca1b (patch)
tree22cddce0f60f9ee116dd5d869726e4f1b301b5ee /usr.sbin/ppp/hdlc.c
parent1d23653385b701e6ef13bbbe4fb216bab202b990 (diff)
downloadFreeBSD-src-539d220871d789543afc7e3744e712d33128ca1b.zip
FreeBSD-src-539d220871d789543afc7e3744e712d33128ca1b.tar.gz
Ensure that the thing we're casting to struct ip
is aligned for non-i386 architectures.
Diffstat (limited to 'usr.sbin/ppp/hdlc.c')
-rw-r--r--usr.sbin/ppp/hdlc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.sbin/ppp/hdlc.c b/usr.sbin/ppp/hdlc.c
index ff509b8..894b2b3 100644
--- a/usr.sbin/ppp/hdlc.c
+++ b/usr.sbin/ppp/hdlc.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: hdlc.c,v 1.38 1999/02/06 02:54:45 brian Exp $
+ * $Id: hdlc.c,v 1.39 1999/02/11 10:14:08 brian Exp $
*
* TODO:
*/
@@ -174,7 +174,7 @@ hdlc_Output(struct link *l, int pri, u_short proto, struct mbuf *bp)
mhp->cnt += 2;
}
- mhp->next = bp;
+ mhp->next = bp = mbuf_Contiguous(bp);
if (!p) {
/*
@@ -188,11 +188,7 @@ hdlc_Output(struct link *l, int pri, u_short proto, struct mbuf *bp)
return;
}
- /* Tack mfcs onto the end, then set bp back to the start of the data */
- while (bp->next != NULL)
- bp = bp->next;
- bp->next = mfcs;
- bp = mhp->next;
+ bp->next = mfcs; /* Tack mfcs onto the end */
p->hdlc.lqm.OutOctets += mbuf_Length(mhp) + 1;
p->hdlc.lqm.OutPackets++;
OpenPOWER on IntegriCloud