Compute the checksum before handing the packet off to IPFilter.

Tested by:  Cy Schubert <Cy.Schubert@uumail.gov.bc.ca>
This commit is contained in:
Jonathan Lemon 2000-05-21 21:26:06 +00:00
parent ca08af854e
commit 1c23847582
3 changed files with 11 additions and 2 deletions

View File

@ -632,6 +632,14 @@ int out;
m->m_flags &= ~M_CANFASTFWD;
# endif /* M_CANFASTFWD */
/*
* disable delayed checksums.
*/
if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
in_delayed_cksum(m);
m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
}
if ((ip->ip_p == IPPROTO_TCP || ip->ip_p == IPPROTO_UDP ||
ip->ip_p == IPPROTO_ICMP)) {
int plen = 0;

View File

@ -96,7 +96,6 @@ static MALLOC_DEFINE(M_IPMOPTS, "ip_moptions", "internet multicast options");
u_short ip_id;
static void in_delayed_cksum(struct mbuf *m);
static struct mbuf *ip_insertoptions __P((struct mbuf *, struct mbuf *, int *));
static void ip_mloopback
__P((struct ifnet *, struct mbuf *, struct sockaddr_in *, int));
@ -954,7 +953,7 @@ ip_output(m0, opt, ro, flags, imo)
goto done;
}
static void
void
in_delayed_cksum(struct mbuf *m)
{
struct ip *ip;

View File

@ -189,6 +189,8 @@ extern u_int16_t ip_divert_cookie;
extern struct sockaddr_in *ip_fw_fwd_addr;
void in_delayed_cksum(struct mbuf *m);
#endif /* _KERNEL */
#endif /* !_NETINET_IP_VAR_H_ */