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:
parent
ca08af854e
commit
1c23847582
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user