Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/traceroute Factor out common code in the fragmentat...
details: https://anonhg.NetBSD.org/src/rev/2d2f76b1e023
branches: trunk
changeset: 473716:2d2f76b1e023
user: is <is%NetBSD.org@localhost>
date: Wed Jun 16 20:10:07 1999 +0000
description:
Factor out common code in the fragmentation required branch.
diffstat:
usr.sbin/traceroute/traceroute.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diffs (50 lines):
diff -r 67c3c74cd58b -r 2d2f76b1e023 usr.sbin/traceroute/traceroute.c
--- a/usr.sbin/traceroute/traceroute.c Wed Jun 16 19:34:24 1999 +0000
+++ b/usr.sbin/traceroute/traceroute.c Wed Jun 16 20:10:07 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: traceroute.c,v 1.33 1999/06/16 13:52:58 is Exp $ */
+/* $NetBSD: traceroute.c,v 1.34 1999/06/16 20:10:07 is Exp $ */
/*
* Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997
@@ -29,7 +29,7 @@
#else
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997\n\
The Regents of the University of California. All rights reserved.\n");
-__RCSID("$NetBSD: traceroute.c,v 1.33 1999/06/16 13:52:58 is Exp $");
+__RCSID("$NetBSD: traceroute.c,v 1.34 1999/06/16 20:10:07 is Exp $");
#endif
#endif
@@ -1479,25 +1479,23 @@
int i;
if (nextmtu > 0) {
- Printf("\nfragmentation required and DF set, next hop MTU = %d\n
-",
+ Printf("\nfragmentation required and DF set, "
+ "next hop MTU = %d\n",
nextmtu);
packlen = nextmtu;
- outudp->uh_ulen =
- htons((u_short)(packlen - (sizeof(*outip) + optlen)));
for (i = 0; mtus[i] > 0; i++) {
if (mtus[i] < nextmtu) {
mtuptr = &mtus[i]; /* next one to try */
- return;
+ break;
}
}
} else {
packlen = *mtuptr++;
- outudp->uh_ulen =
- htons((u_short)(packlen - (sizeof(*outip) + optlen)));
- Printf("fragmentation required and DF set, "
+ Printf("\nfragmentation required and DF set, "
"trying new MTU = %d\n", packlen);
}
+ outudp->uh_ulen =
+ htons((u_short)(packlen - (sizeof(*outip) + optlen)));
}
int
Home |
Main Index |
Thread Index |
Old Index