[Xorp-cvs] XORP cvs commit: xorp/bgp

Atanu Ghosh atanu at icir.org
Thu Sep 28 08:19:45 PDT 2006


CVSROOT:	/usr/local/www/data/cvs
Module name:	xorp
Changes by:	atanu at xorpc.icir.org	2006-09-28 15:19:45 UTC

XORP CVS repository


Modified files:
	bgp           test_packet_coding.cc update_attrib.cc 

Log message:
	The network layer reachability information in a BGP update packet is
	coded as one or more 2-tuples, the first is the length in bits and the
	second is the IP prefix itself. The default route 0.0.0.0/0 has a zero
	in the length part of the tuple and no prefix.
	
	The BGPUpdateAttrib class which is responsible for parsing an NLRI
	was unconditionally reading the prefix byte and shifting it left 24
	bits. BGP receiving a default route could end up with an NLRI of the
	form 42.0.0.0/0, this is obviously illegal and should not be possible,
	however, the BGPUpdateAttrib class inherits from IPv4Net and directly
	writes to its member variables bypassing any sanity checking. The
	member variable of IPv4Net should be made private to prevent this
	problem in the future, see <http://www.xorp.org/bugzilla/show_bug.cgi?id=654>.
	
	This problem was first seen when BGP received a default route and an
	assert was hit in the ref trie code due to the illegal nature of the
	prefix and prefix length.
	
	A test function test_announce_packet2 has also been added.

Revision  Changes                                Path
1.18      +218 -4;  commitid: 6e73451be8107ea6;  xorp/bgp/test_packet_coding.cc
1.15      +2 -2;  commitid: 6e73451be8107ea6;    xorp/bgp/update_attrib.cc



More information about the Xorp-cvs mailing list