Recalculate ip_sum before passing a

re-assembled packet to a divert port.
Pointed-out by:	Ari Suutari <ari@suutari.iki.fi>
VS:   then name the system in this line, otherwise delete it.
This commit is contained in:
Brian Somers 1997-07-25 03:58:21 +00:00
parent 4e1bdb51a7
commit af782f1c59
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=27669

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
* $Id: ip_input.c,v 1.62 1997/05/11 18:05:37 tegge Exp $
* $Id: ip_input.c,v 1.63 1997/06/02 05:02:36 julian Exp $
* $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
*/
@ -512,6 +512,20 @@ ip_input(struct mbuf *m)
return;
ipstat.ips_reassembled++;
m = dtom(ip);
#ifdef IPDIVERT
if (frag_divert_port) {
ip->ip_len += hlen;
HTONS(ip->ip_len);
HTONS(ip->ip_off);
HTONS(ip->ip_id);
ip->ip_sum = 0;
ip->ip_sum = in_cksum_hdr(ip);
NTOHS(ip->ip_id);
NTOHS(ip->ip_off);
NTOHS(ip->ip_len);
ip->ip_len -= hlen;
}
#endif
} else
if (fp)
ip_freef(fp);