diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-01-11 04:19:43 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-01-11 04:19:43 +0000 |
commit | 7cd691d5b46ba0063d953db42a3542c5702d90b6 (patch) | |
tree | 50a67007054c0b7092dc6eb9fed23b2619f76755 | |
parent | 10775916fc82903953b9f60326a262d62d194a03 (diff) |
only set Ok flag for RX checksums.
-rw-r--r-- | sys/dev/ic/xl.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index 56f9068a052..2f1a6793624 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.68 2006/01/11 04:15:20 brad Exp $ */ +/* $OpenBSD: xl.c,v 1.69 2006/01/11 04:19:42 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -1312,19 +1312,16 @@ again: #endif if (sc->xl_type == XL_TYPE_905B) { - if (rxstat & XL_RXSTAT_IPCKERR) - sumflags |= M_IPV4_CSUM_IN_BAD; - else if (rxstat & XL_RXSTAT_IPCKOK) + if (!(rxstat & XL_RXSTAT_IPCKERR) && + (rxstat & XL_RXSTAT_IPCKOK)) sumflags |= M_IPV4_CSUM_IN_OK; - if (rxstat & XL_RXSTAT_TCPCKERR) - sumflags |= M_TCP_CSUM_IN_BAD; - else if (rxstat & XL_RXSTAT_TCPCKOK) + if (!(rxstat & XL_RXSTAT_TCPCKERR) && + (rxstat & XL_RXSTAT_TCPCKOK)) sumflags |= M_TCP_CSUM_IN_OK; - if (rxstat & XL_RXSTAT_UDPCKERR) - sumflags |= M_UDP_CSUM_IN_BAD; - else if (rxstat & XL_RXSTAT_UDPCKOK) + if (!(rxstat & XL_RXSTAT_UDPCKERR) && + (rxstat & XL_RXSTAT_UDPCKOK)) sumflags |= M_UDP_CSUM_IN_OK; m->m_pkthdr.csum_flags = sumflags; |