Commit Graph

120 Commits

Author SHA1 Message Date
Hannes Gredler
56a0f0167c from Anantharamu Suryanarayana: add 4-byte AS support to the BGP printer 2009-01-20 21:40:22 +01:00
Hannes Gredler
6a65cbb4b8 from Elmar Kirchner: add support for the MDT SAFI 66 BG printer 2009-01-20 21:12:42 +01:00
hannes
31428da165 from Ananth Suryanarayana <anantha@juniper.net>:
add full support for 4-byte AS parsing to the bgp printer
2007-12-07 15:54:52 +00:00
guy
0754715317 From Marc Binderberger:
Certain BGP implementations support 4-byte ASN (see
	draft-ietf-idr-as4bytes-13.txt) in the AS_PATH attribute.
	Unfortunately there is nothing indicating if 2- or 4-byte ASN
	are in use when capturing BGP update packets only; this is
	agreed on during the BGP session setup between the peers.

	Have modified print-bgp.c in the 3.9.5 tcpdump to use a simple
	heuristics:

		First check the AS_PATH segments assuming 2-byte ASN.
		The check looks at the segment type - which must be a
		known one - and uses the segment length to skip to the
		next segment.  If the overall AS_PATH attribute length
		is exactly reached after skipping over all path segments
		then the check is passed.  In case the 2-byte check
		fails we repeat the check assuming a 4-byte ASN.  When
		this check passes We use 4-byte ASN for the decoding of
		the AS_PATH.  In all other cases, even a failed/failed
		for 2-/4-byte checks, we assume 2-byte ASN for the
		decoding.

	The procedure for this heuristic check is "check_asnbytes".

	In case of 4-byte ASN the ASN is printed in the form
	<16-bit>.<16-bit> to provide a clear indication that 4-byte ASN
	are in use.

(The draft in question was published as RFC 4893.)
2007-10-05 02:00:11 +00:00
hannes
10f8b99266 print RD type 0 and extd-comm type 0 both in as:number and as:ip-address format 2007-07-24 13:16:48 +00:00
guy
c69047c1ec From Francois-Xavier Le Bail: #ifdef INET6-out some code that only
builds if the platform supports IPv6.
2007-07-22 02:42:53 +00:00
guy
1c617b856c Fix problem found by the folks at www.digit-labs.org. Process all the
TLVs in decode_labeled_vpn_l2(), but don't format them unless there's
buffer space left.  If snprintf() returns a negative value, assume we've
filled up the buffer - I think some platforms used to work that way.  If
it returns a value greater than the amount of space left, also assume
we've filled up the buffer.

Fix a typo in a comment.
2007-07-14 22:24:54 +00:00
hannes
a8d38a6e87 backout the cisco prop. mdt group extd comm as it clashes with the IANA assigned source-as codepoint 2007-06-21 06:06:29 +00:00
hannes
6e11d7ae58 update mvpn related cpodepoints as per IANA #84264 early assignment 2007-06-20 13:29:50 +00:00
hannes
1bf846fb37 apply bit rather than byte arithmetics for printing mvpn route-types 2007-06-18 13:24:25 +00:00
hannes
9926640242 suppress printing of source and group addresses for zero-sized address length 2007-05-24 23:21:28 +00:00
hannes
0b10890d61 do not forget to call into the multicast vpn printer inside the MP unreach printer, and yes there is V6 as well 2007-05-24 23:13:18 +00:00
hannes
f2d3533672 correct the codepoint for the PMSI attribute 2007-05-23 22:24:49 +00:00
hannes
63c7adef04 print per route-type information inside the SAFI 139 printer 2007-05-21 15:42:33 +00:00
hannes
4ff7212246 complete the tunnel-type printer inside the PMSI attribute printer 2007-05-16 14:35:35 +00:00
hannes
11dbcc8b73 add support for the source-as and vrf-import extended communities as per draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt 2007-05-16 14:02:51 +00:00
hannes
6433bb1b36 add basic support for next-gen mvpn as per draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt 2007-05-16 08:04:50 +00:00
hannes
165d8db403 bugfix from Aaron Campbel <aaron@arbor.net>:
The expression (BGP_OSPF_RTYPE_EXT ||BGP_OSPF_RTYPE_NSSA) will always evaluate to 1.
2006-10-06 06:25:06 +00:00
hannes
6354506df4 from Gino Barille <barille@yahoo.com>:
add support for printing notification subcode 7 as per rfc3392.
2006-06-13 17:15:28 +00:00
hannes
50b4920bc5 move AF specific stuff to dedicated files 2006-02-21 10:27:40 +00:00
hannes
d198f14d38 add support for BGP signaled VPLS 2006-02-02 12:36:09 +00:00
hannes
a11596df2c add cisco prop. eigrp related, extd. communities 2005-10-19 09:24:08 +00:00
guy
9e349e88a7 Before subtracting a value from a prefix length, make sure the prefix
length is >= the value.  (In theory, if that check isn't done, the
prefix length will overflow, and, as it's unsigned, that'd make it very
large, and rejected by the other sanity check - but it's cleaner to
check explicitly.)

In decode_rt_routing_info(), fix the checks for the prefix length -
according to draft-marques-ppvpn-rt-constrain-01, the default route
target has a 0-length prefix, and all others have a length between 32
and 96.
2005-10-16 18:14:55 +00:00
hannes
8bf0956a98 bugfix: we truncate the iso nsap strings by one byte, print next-hop length in the MP_REACH attribute 2005-06-03 07:28:24 +00:00
hannes
7a063a52a4 copy&paste error: decode_labeled_clnp_ was intended to be decode_clnp_ 2005-05-18 19:58:36 +00:00
guy
9bd9227c32 Add bounds checking and other sanity checking.
If "decode_prefix4()" returns -1, quit any loop using it to return the
length of an item.
2005-05-05 22:49:17 +00:00
guy
2fd4391eb9 Check for a negative "advance" value, which indicates an error.
Don't make the last statement in a loop a break statement, as that means
the body of the loop will be executed at most once.

When looping over the data in a TCP segment containing BGP packets, loop
until we reach the first of the end of the captured data or the end of
the segment, not just the end of the captured data.
2005-04-20 20:45:34 +00:00
guy
000d739130 Get rid of an unused variable (the length from the BGP header is passed
as the "length" argument).
2005-04-20 20:22:11 +00:00
guy
fa08b40c1a Move some statements before the case's "break;" statement, so that
they're executed; if they shouldn't be executed, they shouldn't be in
the code.
2005-04-20 10:29:39 +00:00
guy
2340cefe2e Protect some IPv6 code with #ifdef INET6/#endif. 2005-03-27 01:31:25 +00:00
hannes
28a778829d extra printing for IPv6 transcoded CLNP next-hops in the MP-REACH printer 2005-03-23 09:22:58 +00:00
hannes
973c5c75be -add support for CLNP and CLNP-VPN NLRIs
-treat the AFI/SAFI field as a composite 24-Bit entity
 and not as seperate 8/16-Bit entity
2005-03-22 19:30:59 +00:00
hannes
65ff785f67 add support for graceful-restart end-of-rib marker 2004-06-22 15:04:51 +00:00
hannes
9974f43f2f import latest definition for Pseudowires from draft-ietf-pwe3-iana-allocation-04
and put it to its new home l2vpn.{c|h}
rework bgp, ldp, lsp-ping to use the common l2vpn_encaps tokenlist
update FILES list to acommodate the recent file additions
2004-06-15 09:42:40 +00:00
hannes
d44d003db5 expose bgp_l2vpn_encaps_values[] to the outside world 2004-06-12 08:52:21 +00:00
hannes
3b17aa68d1 expose bgp_vpn_rd_print() to the outside world 2004-06-12 08:17:50 +00:00
guy
f5ad5cff18 From Steiner Haug: handle LDP-over-TCP, and do more complete LDP
decoding.
2004-05-27 21:20:49 +00:00
hannes
bc84c5c5ec print the capcode when dissecting capabilities 2004-05-17 12:10:05 +00:00
mcr
0d208ebd8b use new tok2strbuf() API. 2004-04-29 02:16:01 +00:00
guy
5c2f39fbdd Add bounds checking. 2004-03-24 00:01:00 +00:00
hannes
35f23d144c add recent IANA SAFI and CAP codepoints - FIXME: add decoder 2004-03-18 11:14:45 +00:00
hannes
5947e8f138 print type 2 route distinguishers in IP adress format 2004-03-16 11:39:59 +00:00
hannes
b285a49d96 add support for the cisco proprietary MDT Group Extended Community 2004-03-14 21:10:37 +00:00
hannes
c519841be2 - bugfix: rework the AS_PATH decoder per draft-ietf-idr-rfc3065bis:
CONFED_AS_SET and CONFED_AS_SEQUENCE codepoints have changed;
- rework the SEQ and SET display output in accordance with contemporary
    routing software
     ( AS )  indicates an CONFED AS SEQUENCE segment
     { AS }  indicates an AS SET segment
    ({ AS }) indicates an CONFED AS SET segment
2004-01-15 18:59:15 +00:00
hannes
bd4ee43fba forgot to break 2003-12-23 22:18:35 +00:00
hannes
28146cdebd add support for the ATTR SET attribute per draft-marques-ppvpn-ibgp
TODO boundary and recursion check
add reference (draft-marques-ppvpn-rt-constrain)
  to the Route Target Information SAFI
2003-12-23 22:07:56 +00:00
guy
bbc1cfa669 Have the configure script arrange that the Makefile define _U_
appropriately, and that GNUmakefile and the MSVC++ project file define
it apppriately, as we do with libpcap, rather than defining it in
"interface.h".

Undo the rcsid-shuffling and addition of extra #includes, as we no
longer need to arrange that "interface.h" be included before using _U_
in an RCS ID or copyright.
2003-11-16 09:36:07 +00:00
guy
3824a6c041 From Neil Spring:
use "_U_" in the definitions of "rcsid[]", to eliminate
	complaints about those variables being unused;

	move the definitions after the include of "interface.h", or add
	an include of "interface.h", so that "_U_" is defined.

Include "config.h" before including "tcpdump-stdinc.h" in
"missing/datalinks.c".
2003-11-15 00:39:12 +00:00
hannes
5534ed4ad1 fix for last commit: pass the correct pointer for the route target buffer 2003-10-27 08:18:57 +00:00
hannes
859d3eb8b9 - support for the route target information SAFI #132 defined in draft-marques-ppvpn-rt-constrain-01.txt
- support for 32-bit AS number route-target (type 2) format
2003-10-27 08:04:52 +00:00