diff options
Diffstat (limited to 'usr/src/uts/common/inet/ip/ip_input.c')
| -rw-r--r-- | usr/src/uts/common/inet/ip/ip_input.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/usr/src/uts/common/inet/ip/ip_input.c b/usr/src/uts/common/inet/ip/ip_input.c index 88f80a926b..22c1c74391 100644 --- a/usr/src/uts/common/inet/ip/ip_input.c +++ b/usr/src/uts/common/inet/ip/ip_input.c @@ -57,6 +57,7 @@ #include <sys/vtrace.h> #include <sys/isa_defs.h> #include <sys/mac.h> +#include <sys/mac_client.h> #include <net/if.h> #include <net/if_arp.h> #include <net/route.h> @@ -659,11 +660,13 @@ ill_input_short_v4(mblk_t *mp, void *iph_arg, void *nexthop_arg, } /* - * If there is a good HW IP header checksum we clear the need + * If the packet originated from a same-machine sender or + * there is a good HW IP header checksum, we clear the need * look at the IP header checksum. */ - if ((DB_CKSUMFLAGS(mp) & HCK_IPV4_HDRCKSUM) && - ILL_HCKSUM_CAPABLE(ill) && dohwcksum) { + if ((DB_CKSUMFLAGS(mp) & HW_LOCAL_MAC) || + ((DB_CKSUMFLAGS(mp) & HCK_IPV4_HDRCKSUM) && + ILL_HCKSUM_CAPABLE(ill) && dohwcksum)) { /* Header checksum was ok. Clear the flag */ DB_CKSUMFLAGS(mp) &= ~HCK_IPV4_HDRCKSUM; ira->ira_flags &= ~IRAF_VERIFY_IP_CKSUM; @@ -2256,12 +2259,13 @@ ip_input_cksum_v4(iaflags_t iraflags, mblk_t *mp, ipha_t *ipha, * We apply this for all ULP protocols. Does the HW know to * not set the flags for SCTP and other protocols. */ - hck_flags = DB_CKSUMFLAGS(mp); - if (hck_flags & HCK_FULLCKSUM_OK) { + if ((hck_flags & HCK_FULLCKSUM_OK) || (hck_flags & HW_LOCAL_MAC)) { /* - * Hardware has already verified the checksum. + * Either the hardware already verified the checksum + * or the packet is from a same-machine sender in + * which case we assume data integrity. */ return (B_TRUE); } |
