-/* $OpenBSD: re.c,v 1.171 2015/01/20 04:46:11 brad Exp $ */
+/* $OpenBSD: re.c,v 1.172 2015/01/21 09:52:55 brad Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
nsegs = map->dm_nsegs;
pad = 0;
- if ((sc->rl_flags & RL_FLAG_DESCV2) == 0 &&
- m->m_pkthdr.len <= RL_IP4CSUMTX_PADLEN &&
- (csum_flags & RL_TDESC_CMD_IPCSUM) != 0) {
+ if ((sc->rl_flags & RL_FLAG_AUTOPAD) == 0 &&
+ m->m_pkthdr.len < RL_IP4CSUMTX_PADLEN &&
+ (m->m_pkthdr.csum_flags & M_IPV4_CSUM_OUT) != 0) {
pad = 1;
nsegs++;
}