mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
Remove unused and unnecessary CSUM_IP_FRAGS checksumming capability.
Checksumming the IP header of fragments is no different from doing normal IP headers. Discussed with: yongari MFC after: 1 week
This commit is contained in:
parent
b29bf00c95
commit
da2299c5c7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243624
sys
@ -9880,7 +9880,7 @@ bce_dump_mbuf(struct bce_softc *sc, struct mbuf *m)
|
||||
"\15M_FIRSTFRAG\16M_LASTFRAG\21M_VLANTAG"
|
||||
"\22M_PROMISC\23M_NOFREE",
|
||||
mp->m_pkthdr.csum_flags,
|
||||
"\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP\4CSUM_IP_FRAGS"
|
||||
"\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP"
|
||||
"\5CSUM_FRAGMENT\6CSUM_TSO\11CSUM_IP_CHECKED"
|
||||
"\12CSUM_IP_VALID\13CSUM_DATA_VALID"
|
||||
"\14CSUM_PSEUDO_HDR");
|
||||
|
@ -16281,7 +16281,7 @@ void bxe_dump_mbuf(struct bxe_softc *sc, struct mbuf *m)
|
||||
"\15M_FIRSTFRAG\16M_LASTFRAG\21M_VLANTAG"
|
||||
"\22M_PROMISC\23M_NOFREE",
|
||||
m->m_pkthdr.csum_flags,
|
||||
"\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP\4CSUM_IP_FRAGS"
|
||||
"\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP"
|
||||
"\5CSUM_FRAGMENT\6CSUM_TSO\11CSUM_IP_CHECKED"
|
||||
"\12CSUM_IP_VALID\13CSUM_DATA_VALID"
|
||||
"\14CSUM_PSEUDO_HDR");
|
||||
|
@ -1493,7 +1493,7 @@ vlan_capabilities(struct ifvlan *ifv)
|
||||
p->if_capenable & IFCAP_VLAN_HWTAGGING) {
|
||||
ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM;
|
||||
ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP |
|
||||
CSUM_UDP | CSUM_SCTP | CSUM_IP_FRAGS | CSUM_FRAGMENT);
|
||||
CSUM_UDP | CSUM_SCTP | CSUM_FRAGMENT);
|
||||
} else {
|
||||
ifp->if_capenable = 0;
|
||||
ifp->if_hwassist = 0;
|
||||
|
@ -722,14 +722,12 @@ ip_fragment(struct ip *ip, struct mbuf **m_frag, int mtu,
|
||||
* If the interface will not calculate checksums on
|
||||
* fragmented packets, then do it here.
|
||||
*/
|
||||
if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA &&
|
||||
(if_hwassist_flags & CSUM_IP_FRAGS) == 0) {
|
||||
if (m0->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
|
||||
in_delayed_cksum(m0);
|
||||
m0->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
|
||||
}
|
||||
#ifdef SCTP
|
||||
if (m0->m_pkthdr.csum_flags & CSUM_SCTP &&
|
||||
(if_hwassist_flags & CSUM_IP_FRAGS) == 0) {
|
||||
if (m0->m_pkthdr.csum_flags & CSUM_SCTP) {
|
||||
sctp_delayed_cksum(m0, hlen);
|
||||
m0->m_pkthdr.csum_flags &= ~CSUM_SCTP;
|
||||
}
|
||||
|
@ -279,7 +279,6 @@ struct mbuf {
|
||||
#define CSUM_IP 0x0001 /* will csum IP */
|
||||
#define CSUM_TCP 0x0002 /* will csum TCP */
|
||||
#define CSUM_UDP 0x0004 /* will csum UDP */
|
||||
#define CSUM_IP_FRAGS 0x0008 /* will csum IP fragments */
|
||||
#define CSUM_FRAGMENT 0x0010 /* will do IP fragmentation */
|
||||
#define CSUM_TSO 0x0020 /* will do TSO */
|
||||
#define CSUM_SCTP 0x0040 /* will csum SCTP */
|
||||
|
Loading…
Reference in New Issue
Block a user