No subject



Thu Mar 13 1:14:22 2003
Return-Path: xorp-cvs-admin@icir.org
Delivery-Date: Thu, 13 Mar 2003 01:15:06 -0800
Received: from wyvern.icir.org (wyvern.icir.org [192.150.187.14])
	by tigger.icir.org (8.12.3/8.12.3) with ESMTP id h2D9F6lu025675
	for <atanu@tigger.icir.org>; Thu, 13 Mar 2003 01:15:06 -0800 (PST)
	(envelope-from xorp-cvs-admin@icir.org)
Received: from ICSI.Berkeley.EDU (fruitcake.ICSI.Berkeley.EDU [192.150.186.11])
	by wyvern.icir.org (8.12.3/8.12.3) with ESMTP id h2D9F6fh099951
	for <atanu@icir.org>; Thu, 13 Mar 2003 01:15:06 -0800 (PST)
	(envelope-from xorp-cvs-admin@icir.org)
Received: from fruitcake.icsi.Berkeley.EDU (localhost [127.0.0.1])
	by ICSI.Berkeley.EDU (8.9.0/8.9.0) with ESMTP id BAA06314;
	Thu, 13 Mar 2003 01:15:02 -0800 (PST)
Received: from wyvern.icir.org (wyvern.icir.org [192.150.187.14])
	by ICSI.Berkeley.EDU (8.9.0/8.9.0) with ESMTP id BAA06301
	for <xorp-cvs@icsi.berkeley.edu>; Thu, 13 Mar 2003 01:14:23 -0800 (PST)
Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68])
	by wyvern.icir.org (8.12.3/8.12.3) with ESMTP id h2D9ENfh099922
	for <xorp-cvs@icir.org>; Thu, 13 Mar 2003 01:14:23 -0800 (PST)
	(envelope-from pavlin@xorpc.icir.org)
Received: from xorpc.icir.org (localhost [127.0.0.1])
	by xorpc.icir.org (8.12.3/8.12.3) with ESMTP id h2D9ENAq083747
	for <xorp-cvs@icir.org>; Thu, 13 Mar 2003 01:14:23 -0800 (PST)
	(envelope-from pavlin@xorpc.icir.org)
Received: (from pavlin@localhost)
	by xorpc.icir.org (8.12.3/8.12.3/Submit) id h2D9EMep083746;
	Thu, 13 Mar 2003 01:14:22 -0800 (PST)
	(envelope-from pavlin)
From: Pavlin Radoslavov <pavlin@icir.org>
Message-Id: <200303130914.h2D9EMep083746@xorpc.icir.org>
Date:     Thu, 13 Mar 2003  1:14:22  ()
To: xorp-cvs@icir.org
Reply-To: pavlin@icir.org
Subject: [Xorp-cvs] XORP cvs commit: xorp/mrt/ inet_cksum.c
Sender: xorp-cvs-admin@icir.org
Errors-To: xorp-cvs-admin@icir.org
X-BeenThere: xorp-cvs@icir.org
X-Mailman-Version: 2.0
Precedence: bulk
List-Help: <mailto:xorp-cvs-request@icir.org?subject=help>
List-Post: <mailto:xorp-cvs@icir.org>
List-Subscribe: <http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs>,
	<mailto:xorp-cvs-request@icir.org?subject=subscribe>
List-Id: Mailing list for XORP CVS commit messages <xorp-cvs.icir.org>
List-Unsubscribe: <http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs>,
	<mailto:xorp-cvs-request@icir.org?subject=unsubscribe>

CVSROOT:	/usr/local/share/doc/apache/cvs
Module name:	xorp
Repository:	xorp/mrt/
Changes by:	pavlin@xorpc.icir.org.	03/03/13 01:14:22

Modified files:
	xorp/mrt/: inet_cksum.c 

Log message:
	Bugfix in inet_cksum_add() in computing the result IP checksum
	when the packet is split into two parts, and we know the checksum
	of each part. The solution is rather simple (the very first line
	is the key, the rest is same as in traditional inet_cksum():
	
	int sum = (uint16_t)~sum1 + (uint16_t)~sum2;
	
	sum = (sum >> 16) + (sum & 0xffff);
	sum += (sum >> 16);
	uint16_t answer = ~sum;
	return (answer);

_______________________________________________
Xorp-cvs mailing list
Xorp-cvs@icir.org
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-cvs