summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_divert.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2004-08-03 12:31:38 +0000
committerandre <andre@FreeBSD.org>2004-08-03 12:31:38 +0000
commitfd961632464d6804f3fe478dba325cdfc4cc2e30 (patch)
tree8b4ba610fc0294632ab0b3b0f74762ddb2e4d817 /sys/netinet/ip_divert.c
parent8d14ac3ae01961e2e0819c370a584442520fe050 (diff)
downloadFreeBSD-src-fd961632464d6804f3fe478dba325cdfc4cc2e30.zip
FreeBSD-src-fd961632464d6804f3fe478dba325cdfc4cc2e30.tar.gz
o Move all parts of the IP reassembly process into the function ip_reass() to
make it fully self-contained. o ip_reass() now returns a new mbuf with the reassembled packet and ip->ip_len including the IP header. o Computation of the delayed checksum is moved into divert_packet(). Reviewed by: silby
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r--sys/netinet/ip_divert.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 3a96177..afd455e 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -168,6 +168,14 @@ divert_packet(struct mbuf *m, int incoming)
return;
ip = mtod(m, struct ip *);
+ /* Delayed checksums are currently not compatible with divert. */
+ if (m->m_pkthdr.csum_flags & CSUM_DELAY_DATA) {
+ ip->ip_len = ntohs(ip->ip_len);
+ in_delayed_cksum(m);
+ m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA;
+ ip->ip_len = htons(ip->ip_len);
+ }
+
/*
* Record receive interface address, if any.
* But only for incoming packets.
OpenPOWER on IntegriCloud