diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2000-01-15 07:02:14 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2000-01-15 07:02:14 +0000 |
commit | a045a08192d89eeccd9c86c79e9895e917aefe2a (patch) | |
tree | 294d4eb8ba99b1a42e5995e48df362999cd8f59c /sys/netipx/ipx_input.c | |
parent | bac5cc09ef9f9d46e1ca785cea5c6c4490df8bf5 (diff) |
Remove unneeded mcopy. Add stats for errors in ipx_forward.
Diffstat (limited to 'sys/netipx/ipx_input.c')
-rw-r--r-- | sys/netipx/ipx_input.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c index 3b25e9b0633..f28e9cdaecf 100644 --- a/sys/netipx/ipx_input.c +++ b/sys/netipx/ipx_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipx_input.c,v 1.11 2000/01/13 07:10:36 fgsch Exp $ */ +/* $OpenBSD: ipx_input.c,v 1.12 2000/01/15 07:02:13 fgsch Exp $ */ /*- * @@ -319,7 +319,6 @@ struct mbuf *m; { register struct ipx *ipx = mtod(m, struct ipx *); register int error; - struct mbuf *mcopy = NULL; int agedelta = 1; int flags = IPX_FORWARDING; int ok_there = 0; @@ -395,8 +394,7 @@ struct mbuf *m; ipx_printhost(&ipx->ipx_dna); printf(" hops %d\n", ipx->ipx_tc); } - } else if (mcopy != NULL) { - ipx = mtod(mcopy, struct ipx *); + } else { switch (error) { case ENETUNREACH: @@ -404,15 +402,17 @@ struct mbuf *m; case EHOSTUNREACH: case ENETDOWN: case EPERM: + ipxstat.ipxs_noroute++; break; case EMSGSIZE: + ipxstat.ipxs_mtutoosmall++; break; case ENOBUFS: + ipxstat.ipxs_odropped++; break; } - mcopy = NULL; m_freem(m); } cleanup: @@ -420,8 +420,6 @@ cleanup: ipx_undo_route(&ipx_droute); if (ok_back) ipx_undo_route(&ipx_sroute); - if (mcopy != NULL) - m_freem(mcopy); } int |