Commit Graph

56 Commits

Author SHA1 Message Date
Alexis La Goutte 21e7a7a277 Enhance support of RD Type 2 (FORMAT_AS4_LOC) (RFC4364)
svn path=/trunk/; revision=38600
2011-08-18 12:51:30 +00:00
Alexis La Goutte 2c649f7b78 From Sergey V. Lobanov via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6128
Wireshark doesn't decode BGP.MP_REACH_NLRI.NLRI when RD type is 2(defined in
RFC4364:4.2)

From me:
 Add RD type 2 (FORMAT_AS4_LOC) (not tested... based only on RFC spec..)

svn path=/trunk/; revision=38589
2011-08-17 18:09:27 +00:00
Guy Harris 464778ed69 More misspellings of "unknown", for bug 6244.
svn path=/trunk/; revision=38565
2011-08-16 16:26:50 +00:00
Bill Meier e777d9e375 From Yaniv Kaul:
Some fixes for 'set but not used' errors that GCC 4.6 emits.
From me:
  #include <stdlib.h> not req'd;
  Do some whitespace cleanup.

svn path=/trunk/; revision=36906
2011-04-27 17:15:57 +00:00
Bill Meier 7d8633af66 Don't assign to a proto_item* if the value won't be used: Coverity 852,854;
Add a hidden item to the correct subtree: Coverity 853.

svn path=/trunk/; revision=36334
2011-03-25 21:09:28 +00:00
Jeff Morriss cc6fc23812 From Didier via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3055 :
Apply rev 25869 to most of the rest of the TCP-desegmenting dissectors.
(The SSL dissector was already updated in one of two spots with bug 4535/rev
32456.)

A couple of the patches had to be manually applied.

From me: Fix the comments to match the change (including in the TCP and SSL
dissectors.)

svn path=/trunk/; revision=36332
2011-03-25 19:02:18 +00:00
Anders Broman ed66081a4d From Alexis La Goutte:
Cleanup packet-ipv6.h and dependency.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5713

svn path=/trunk/; revision=36031
2011-02-23 13:51:49 +00:00
Chris Maynard e867b10b98 Properly define and dissect BGP_EXT_COM_LINKBAND. Fixes bug 4409 reported by
Max Ivanov.

svn path=/trunk/; revision=35260
2010-12-24 13:53:26 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Jeff Morriss 33f116a46d Restore pinfo->private_data after an exception was thrown by a subdissector.
This is necessary in case a subdissector had changed it but was unable to
restore it (due to the exception).

Remove check_col().

svn path=/trunk/; revision=34436
2010-10-08 17:48:22 +00:00
Stig Bjørlykke f4955fcae2 Avoid a possible dereference of null pointer.
svn path=/trunk/; revision=33708
2010-08-04 13:32:44 +00:00
Bill Meier 0fc9115705 Use consistent indentation; Whitesapce & formatting cleanup.
svn path=/trunk/; revision=32755
2010-05-11 16:54:55 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Jaap Keuter 3d84667a34 Fix for bug 4410:
Adding two more SSA types.

svn path=/trunk/; revision=31631
2010-01-23 11:58:53 +00:00
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +00:00
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Jaap Keuter 78a3a653f9 From Thomas M. Knoll:
The CoS Capability extended community has been changed to a transitive ext. community 
and was reassigned an IANA type number. It has changed from 0x40 to 0x05. 
see: http://www.iana.org/assignments/bgp-extended-communities

svn path=/trunk/; revision=28467
2009-05-25 06:48:40 +00:00
Bill Meier 871c9c7152 ep_strbuf usage: ep_strbuf_new_label("") --> ep_strbuf_new_label(NULL);
ep_strbuf_append() --> ep_strbuf_append_c() in a few cases.

svn path=/trunk/; revision=28052
2009-04-14 18:31:02 +00:00
Gerald Combs a76381c40e Fix a couple items from the last checkin.
svn path=/trunk/; revision=27874
2009-03-28 00:35:02 +00:00
Gerald Combs 21e87a963f Replace a lot of pointer tracking and some GStrings with emem_strbufs. Add
ep_strbuf_printf and ep_strbuf_append_c.

svn path=/trunk/; revision=27873
2009-03-28 00:27:03 +00:00
Jaap Keuter 5d9a041d91 Fix for bug 3247:
Incorrect index adjustment causes failure to dissect multiple capabilities in optional parameters.

svn path=/trunk/; revision=27529
2009-02-23 22:07:19 +00:00
Jaap Keuter 1be7c5c1a4 From Thomas M. Knoll:
- New dissector for CoS Capability attributes added
- tiny changes in my committed dissector for QoS Marking attributes

svn path=/trunk/; revision=27232
2009-01-14 22:01:10 +00:00
Jaap Keuter fa9fc03b4f From Thomas M. Knoll:
Added a new dissector for BGP QoS Marking extended community attributes as
defined in http://tools.ietf.org/id/draft-knoll-idr-qos-attribute.

svn path=/trunk/; revision=27206
2009-01-10 11:06:50 +00:00
Stig Bjørlykke 9a0020f2f9 From Peter (bug 2942):
Allow optimalization with -ftracer.

svn path=/trunk/; revision=26822
2008-11-22 15:55:01 +00:00
Bill Meier 7aaadd9bec Fix some warnings reported by gcc -Wshadow ...
svn path=/trunk/; revision=25616
2008-06-27 04:52:56 +00:00
Anders Broman e623809550 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25264
2008-05-09 13:59:10 +00:00
Anders Broman 45b8ffd1ec Remove depreciated functions g_string_sprint, g_string_sprintfa.
svn path=/trunk/; revision=25238
2008-05-05 19:52:59 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Stig Bjørlykke 4024a6e592 Swapped block-size and block-offset in BGP VPLS NLRI - fixes bug 1907.
svn path=/trunk/; revision=23151
2007-10-11 22:04:32 +00:00
Jaap Keuter a061f172d1 Clean up the code.
- Move add. info from header
- Remove excess comma's
- Use plurality macro
- NULL pointer for field descriptions

svn path=/trunk/; revision=22607
2007-08-23 20:42:27 +00:00
Jaap Keuter 902737dfff From David Helder:
The MP_REACH_NLRI (and MP_UNREACH_NLRI) parser incorrectly increments a buffer
offset.  Any attributes following will be skipped and/or parsed incorrectly. 
No security problem I see - the bounds are checked before parsing each attribute.

svn path=/trunk/; revision=22598
2007-08-23 09:16:31 +00:00
Bill Meier 0775839c11 fix compiler warning
svn path=/trunk/; revision=19991
2006-11-26 18:20:51 +00:00
Jaap Keuter 004cb06d90 From Aaron Campbell:
The expression (BGP_OSPF_RTYPE_EXT ||BGP_OSPF_RTYPE_NSSA) will always
evaluate to 1.  As well, neither of these constants are defined as flag
values, so a bitwise op was probably not intended either.

svn path=/trunk/; revision=19444
2006-10-06 19:18:55 +00:00
Jaap Keuter 3e2659699e From: Hannes Gredler
attached a patch for the BGP dissector for correct display of
VPLS NLRIs as per the latest spec (draft-ietf-l2vpn-vpls-bgp-08).

svn path=/trunk/; revision=18638
2006-07-03 08:38:30 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Anders Broman c26db21d54 From RABRET Laurent RD-MAPS-ISS:
Please find enclosed a patch for the BGP dissector.
A 0 length IP address is valid in NLRI dissection. It just means "0/0 address".

svn path=/trunk/; revision=17634
2006-03-15 18:53:54 +00:00
Ronnie Sahlberg 3cd2777adc fix minor bug coverity 74
length_remaining could become -1 and if so the next tvb access (tvb_memcpy()) would cause an exception.    not really an ethereal since it would have no ill effects in reality.



change !=0   to >0    to make it more clear what we actually test.




svn path=/trunk/; revision=17528
2006-03-08 11:09:02 +00:00
Jörg Mayer a052b3a98b packet-bgp.c: Fix incorrect use of g_snprintf return value
mp_addr_to_str was unnecessary 'complex' - simplified it
packet-dns.c: Fix incorrect use of g_snprintf return value
packet-dcm.c: Fix incorrect use of g_snprintf return value
        Someone who understands the protocol should look at the
        "vr, tr might be used uninitialized..." warning.
packet-x11.c: Fix incorrect use of g_snprintf return value
packet-kerberos.c: Fix incorrect use of g_snprintf return value
        Someone should take a look at the
        "longjump might clobber ..." messages
packet-diameter.c: Fix incorrect use of g_snprintf return value
        Get rid of unsigned < 0 check
packet-pgm.c: Fix incorrect use of g_snprintf return value
packet-nbns.c: Fix incorrect use of g_snprintf return value
packet-winsrepl.c: Collateral damage to packet-nbns.c fix
packet-netbios.c: Collateral damage to packet-nbns.c fix
packet-netbios.h: Collateral damage to packet-nbns.c fix
packet-kerberos.c: Collateral damage to packet-nbns.c fix
packet-nbipx.c: Collateral damage to packet-nbns.c fix


svn path=/trunk/; revision=17065
2006-01-20 21:18:18 +00:00
Ronnie Sahlberg 7cde2cd67a get rid of one stack buffer and some strcpy() and strcat()
svn path=/trunk/; revision=16233
2005-10-15 23:59:56 +00:00
Anders Broman b854132495 From Hannes Gredler:
fixes the AF/SAFI codepoints
for BGP Layer-2 VPNs from  a Juniper pre-standard implementation to the new "official" IANA assigned codepoints.

From Julian Onions
packet-rmt-norm.ch Decode more oif the protocol

svn path=/trunk/; revision=16183
2005-10-11 05:23:27 +00:00
Guy Harris 973920e91d Convert some more "tvb_memcpy()"s fetching IPv4 and IPv6 addresses to
calls to "tvb_get_ipv4()" and "tvb_get_ipv6()".

Fix a call in the BGP dissector to properly fetch an IEEE floating-point
number.

Update some I-D info.

svn path=/trunk/; revision=15774
2005-09-13 00:50:43 +00:00
Guy Harris 39fd819fb4 Don't collide with the "regular" IPv6 defintions in at least some
platforms in ipv6-utils.h.

svn path=/trunk/; revision=15764
2005-09-12 06:21:35 +00:00
Guy Harris 25c4bc9379 Replace tvb_memcpy() calls that extract IPv4 addresses into a guint32,
and that extract IPv6 addresses into a "struct e_in6_addr", with
tvb_get_ipv4() and tvb_get_ipv6() calls - except for some that we
remove, by using proto_tree_add_item(), rather than replacing.

Have epan/tvbuff.h include epan/ipv6-utils.h, to define "struct
e_in6_addr" (not necessary to declare the tvbuff routines, but including
it there means "struct e_in6_addr" is guaranteed to be defined before
those declarations, so we don't get compiler complaints if we define it
*after* those declarations).

svn path=/trunk/; revision=15758
2005-09-11 21:25:37 +00:00
Guy Harris 69ce025a0b Get rid of a trailing comma.
svn path=/trunk/; revision=15654
2005-09-01 09:56:23 +00:00
Ronnie Sahlberg c7cb2cf0d2 remove some g_string_printf[a]() and replace with g_snprintf()
svn path=/trunk/; revision=15632
2005-08-31 08:49:10 +00:00
Ronnie Sahlberg cb14c85728 add missing value_string termination
svn path=/trunk/; revision=15575
2005-08-28 01:42:51 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Jörg Mayer 34493e8f9e char -> const char warning fixes
svn path=/trunk/; revision=15126
2005-07-28 07:53:38 +00:00
Guy Harris ab797734dd Get rid of the private "my_match_strval()" routine in many dissectors;
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.

Make those routines, and "val_to_str()", return a "const" pointer. 
Update dissectors as necessary to squelch compiler warnings produced by
that.

Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string.  Clean up some other
"match_strval()"/"val_to_str()" usages.

Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.

Make some global variables in the AFS4INT dissector local.

Make some routines not used outside the module they're in static.

Make some tables "static const".

Clean up white space.

Fix Gerald's address in some files.

svn path=/trunk/; revision=14786
2005-06-26 19:56:52 +00:00