# HG changeset patch # User Roamer # Date 1254282089 25200 # Node ID a067a728d36904bb38d277383a8bf937f99c61cf # Parent d09279551f9455451ab980d18652541ee725f249 6876238 Snoop should not warn of packet length against di_max_sdu which might be stale diff -r d09279551f94 -r a067a728d369 usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.h --- a/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.h Tue Sep 29 18:46:22 2009 -0700 +++ b/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop.h Tue Sep 29 20:41:29 2009 -0700 @@ -65,8 +65,6 @@ #define MAXLINE (1088) /* max len of detail line */ -#define MAX_HDRTRAILER (64) /* max hdr/trailer packet slack */ - /* * The RPC XID cache structure. * When analyzing RPC protocols we diff -r d09279551f94 -r a067a728d369 usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_capture.c --- a/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_capture.c Tue Sep 29 18:46:22 2009 -0700 +++ b/usr/src/cmd/cmd-inet/usr.sbin/snoop/snoop_capture.c Tue Sep 29 20:41:29 2009 -0700 @@ -69,7 +69,6 @@ void convert_from_network(); static void convert_old(struct ohdr *); extern sigjmp_buf jmp_env, ojmp_env; -static dlpi_info_t dlinfo; static char *bufp; /* pointer to read buffer */ static int strioctl(int, int, int, int, void *); @@ -119,6 +118,7 @@ int retval; int flags = DLPI_PASSIVE | DLPI_RAW; dlpi_walk_arg_t dwa; + dlpi_info_t dlinfo; if (linkname == NULL) { /* @@ -162,10 +162,6 @@ "not supported\n", dlinfo.di_mactype); } - /* for backward compatibility, allow known interface mtu_sizes */ - if (interface->mtu_size > dlinfo.di_max_sdu) - dlinfo.di_max_sdu = interface->mtu_size; - return (interface->try_kernel_filter); } @@ -417,19 +413,6 @@ goto err; } - if (nhdrp->sbh_totlen > - (dlinfo.di_max_sdu + MAX_HDRTRAILER)) { - if (cap) - (void) fprintf(stderr, "(warning) packet length" - " greater than MTU in capture file"); - else - (void) fprintf(stderr, "(warning) packet length" - " greater than MTU in buffer"); - - (void) fprintf(stderr, " offset %d: length=%d\n", - bp - buf, nhdrp->sbh_totlen); - } - /* * Check for incomplete packet. We are conservative here, * since we don't know how good the checking is in other @@ -689,7 +672,6 @@ if (mprotect(cap_buffp, cap_len, PROT_READ | PROT_WRITE) < 0) pr_err("mprotect: %s: %m", name); } - dlinfo.di_max_sdu = MAXINT; /* Decode any stored packet. */ } void