diff options
author | brian <brian@FreeBSD.org> | 1999-06-02 15:59:09 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-06-02 15:59:09 +0000 |
commit | 424e32a4e7c02e7d5783e442834efc3956b3c9b9 (patch) | |
tree | 0b2a42f17bd7f967733eaf5f44d7a14ad8da23fb /usr.sbin/ppp/nat_cmd.c | |
parent | f45463e353039436955b563e295ed6eabeab0a6c (diff) | |
download | FreeBSD-src-424e32a4e7c02e7d5783e442834efc3956b3c9b9.zip FreeBSD-src-424e32a4e7c02e7d5783e442834efc3956b3c9b9.tar.gz |
o Alter the mbuf type as it's processed by different layers.
o Show more information about missing MP fragments in ``show mp''.
o Do away with mbuf_Log(). It was showing mbuf stats twice on
receipt of LCP/CCP/IPCP packets.... ???!!?
o Pre-allocate a bit extra when creating LQR packets to avoid having
to allocate another mbuf in mbuf_Prepend().
Diffstat (limited to 'usr.sbin/ppp/nat_cmd.c')
-rw-r--r-- | usr.sbin/ppp/nat_cmd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/ppp/nat_cmd.c b/usr.sbin/ppp/nat_cmd.c index 07180a6..f823ff4 100644 --- a/usr.sbin/ppp/nat_cmd.c +++ b/usr.sbin/ppp/nat_cmd.c @@ -2,7 +2,7 @@ * The code in this file was written by Eivind Eklund <perhaps@yes.no>, * who places it in the public domain without restriction. * - * $Id: alias_cmd.c,v 1.24 1999/05/08 11:05:59 brian Exp $ + * $Id: alias_cmd.c,v 1.25 1999/05/12 09:48:39 brian Exp $ */ #include <sys/param.h> @@ -313,6 +313,7 @@ alias_PadMbuf(struct mbuf *bp, int type) struct mbuf **last; int len; + mbuf_SetType(bp, type); for (last = &bp, len = 0; *last != NULL; last = &(*last)->next) len += (*last)->cnt; @@ -330,7 +331,7 @@ alias_LayerPush(struct bundle *bundle, struct link *l, struct mbuf *bp, return bp; log_Printf(LogDEBUG, "alias_LayerPush: PROTO_IP -> PROTO_IP\n"); - bp = mbuf_Contiguous(alias_PadMbuf(bp, MB_IPQ)); + bp = mbuf_Contiguous(alias_PadMbuf(bp, MB_ALIASOUT)); PacketAliasOut(MBUF_CTOP(bp), bp->cnt); bp->cnt = ntohs(((struct ip *)MBUF_CTOP(bp))->ip_len); @@ -350,7 +351,7 @@ alias_LayerPull(struct bundle *bundle, struct link *l, struct mbuf *bp, return bp; log_Printf(LogDEBUG, "alias_LayerPull: PROTO_IP -> PROTO_IP\n"); - bp = mbuf_Contiguous(alias_PadMbuf(bp, MB_IPIN)); + bp = mbuf_Contiguous(alias_PadMbuf(bp, MB_ALIASIN)); pip = (struct ip *)MBUF_CTOP(bp); piip = (struct ip *)((char *)pip + (pip->ip_hl << 2)); @@ -383,7 +384,7 @@ alias_LayerPull(struct bundle *bundle, struct link *l, struct mbuf *bp, last = &bp->pnext; while ((fptr = PacketAliasGetFragment(MBUF_CTOP(bp))) != NULL) { PacketAliasFragmentIn(MBUF_CTOP(bp), fptr); - *last = mbuf_Alloc(ntohs(((struct ip *)fptr)->ip_len), MB_IPIN); + *last = mbuf_Alloc(ntohs(((struct ip *)fptr)->ip_len), MB_ALIASIN); memcpy(MBUF_CTOP(*last), fptr, (*last)->cnt); free(fptr); last = &(*last)->pnext; |