Commit Graph

123 Commits

Author SHA1 Message Date
Jörg Mayer f9a57f08d1 Bill Meier:
Spelling fixes.

svn path=/trunk/; revision=16956
2006-01-05 13:01:08 +00:00
Luis Ontanon 5ff580e14f From: Graeme Hewson
Decryption of the RADIUS User-Password attribute is currently broken.


svn path=/trunk/; revision=16920
2005-12-30 18:41:56 +00:00
Jörg Mayer 9575877bb7 packet-radius.c, packet-xml.c:
Fix a memory leak found by valgrind:
        Although dir isn't a directory it may still use memory

packet-xml.c:
        Reformat the relevant function in packet-xml.c to be readable on systems
        where a tab is 8 spaces.

svn path=/trunk/; revision=16865
2005-12-20 08:35:53 +00:00
Luis Ontanon 54695fec80 propperly initialize vendor->ett if the vendor is not found while radius_register_avp_dissector().
fixes bug 488.


svn path=/trunk/; revision=16064
2005-10-01 11:16:17 +00:00
Guy Harris 13c7fec8f5 Give more details about too-short AVPs, give up immediately for AVPs
shorter than 2 bytes, and make the item for an AVP with a length < 2 a
generated item.

Put the top-level item for an AVP into the tree the same way regardless
of whether it's Vendor-Specific or not, and skip past the type and
length right after that, before we check for Vendor-Specific.  (This
means we no longer treat "vendor ID = 0" as an indication that this
isn't Vendor-Specific - nothing prevents a packet from getting onto the
wire with a vendor ID of 0; this fixes bug 485.)

Don't require a Vendor-Specific AVP to be at least 6 bytes long; it
might not be particularly useful to have one that has a vendor ID and
nothing else, but we might as well dissect the vendor ID portion.

Do some other cleanups.

svn path=/trunk/; revision=16015
2005-09-27 00:03:45 +00:00
Guy Harris a997ee591b Add a new "ipxnet" type for the RADIUS dictionary, for IPX network
numbers.  (Currently, we don't have any dictionary entries with that
type, although we have an attribute with special code to handle it that
uses that type.)

Specially handle Framed-IP-Address, Login-IP-Host, and
Framed-IPX-Network, so that the special values are displayed specially.

Clean up indentation.

Don't specify a number base for IPv4 or IPv6 addresses; the number base
is ignored.

svn path=/trunk/; revision=16008
2005-09-26 08:48:19 +00:00
Luis Ontanon 35cfa4c11c test the avp_vsa_len not the avp_lenght!
svn path=/trunk/; revision=15999
2005-09-25 02:50:03 +00:00
Luis Ontanon 32c673552c Don't ASSERT if a VSA is too short, add an item reporting the error and leave.
svn path=/trunk/; revision=15998
2005-09-25 02:48:53 +00:00
Luis Ontanon 993e209b7f - There can be '/' in attribute names as well
- 140Kb of leaks less.


svn path=/trunk/; revision=15986
2005-09-24 15:07:38 +00:00
Ronnie Sahlberg 44fb2d3d56 Dont decrement the length by 2 if it is already less than two
since then the length will wrap and become +4G or so.

This fixes bug 479


svn path=/trunk/; revision=15982
2005-09-23 20:51:09 +00:00
Luis Ontanon fbc222f41a Change "Value" into "VSA" for Vendor SPecific Attributes
svn path=/trunk/; revision=15873
2005-09-19 19:36:32 +00:00
Luis Ontanon a6ff6fb97c - allow multiple attributes inside one VSA (fixes bug 438)
- preference to choose whether to add the AVP's payload length items
- preference to add an alternate UDP port


svn path=/trunk/; revision=15870
2005-09-19 17:42:02 +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
Ronnie Sahlberg 7ddc41a925 sprintf removal
svn path=/trunk/; revision=15556
2005-08-27 01:05:14 +00:00
Guy Harris e965cb849c Clean up some more const issues.
svn path=/trunk/; revision=15151
2005-07-30 02:22:22 +00:00
Guy Harris 66a2801dfa Use "PROTO_ITEM_SET_GENERATED()" to mark generated items as such; it
takes care of the square brackets, etc..

svn path=/trunk/; revision=15140
2005-07-29 07:28:07 +00:00
Gerald Combs de2803bc52 Don't add a new data source if we don't have any data.
svn path=/trunk/; revision=15089
2005-07-26 15:59:54 +00:00
Luis Ontanon caa15f2906 Get rid of a unused variable
svn path=/trunk/; revision=15065
2005-07-25 19:19:34 +00:00
Luis Ontanon 28de1cec4d Fix the IP address representation string (was inverted on little endians)
svn path=/trunk/; revision=15063
2005-07-25 19:03:57 +00:00
Gerald Combs 4d666be4b8 Break out of an infinite loop. Fixes bugs 296 and 297.
svn path=/trunk/; revision=15054
2005-07-25 15:43:38 +00:00
Guy Harris 255b302a82 Fix some typoes.
Call "dissect_attribute_value_pairs()" regardless of whether we're
building a protocol tree, so the EAP subdissector is always called.

"dissect_attribute_value_pairs()" is only called when the length of AVPs
in the packet is non-zero; don't bother checking for a zero length.

Don't put two items in for each AVP - one is sufficient.

Add some more length checks when processing AVPs.  Don't require AVPs to
be at least 3 bytes long - they might have just a type and length; let
an exception be thrown if that's a problem.

Don't require that the entire AVP be available in the tvbuff before
processing it; let an exception be thrown as we're processing the AVP if
we don't have all the data, so the stuff before the end is processed.

Give the tvbuff for the AVP data a length that reflects the length of
data left in the tvbuff, so that the appropriate exception is thrown if
the packet was cut short by a snapshot length.

Don't have a fixed-length buffer for reassembled EAP messages; grow it
as necessary.

Don't special-case the initial part of the processing of EAP messages;
put in the standard length item, as well as, for fragments, an item for
the fragment data.

Check for non-consecutive EAP-Message attributes.

Set the columns non-writable while dissecting the EAP message, so
Protocol and Info reflect the RADIUS packet.

Doing the reassembly by gluing together all the consecutive EAP-Message
attributes means we don't need help from the EAP dissector, returning
the total length of the EAP message.  Get rid of the no-longer-needed
eap_fragment dissector; just call the regular EAP dissector.

svn path=/trunk/; revision=15046
2005-07-24 20:39:19 +00:00
Guy Harris 554f620001 Constify to remove a bunch of warnings. Add some casts to squelch
(presumably-)harmless-but-otherwise-unremovable const-to-nonconst
warnings.

In the TACACS dissector, clean up the variables used in option parsing
to avoid some const-to-nonconst warnings.

Clean up some white space.

svn path=/trunk/; revision=15043
2005-07-24 19:01:28 +00:00
Luis Ontanon e9ec2c51aa - change the report_failure dialog for a less painful g_warning
- use ep_alloc for reassemling eap fragments instead of a static buffer
- use ep_strdup_printf() instead of a static buffe to return the cosine's VP/VC AVP label
- add few TODO comments


svn path=/trunk/; revision=15028
2005-07-24 02:53:09 +00:00
Gerald Combs 210deaf2cd Tweak the previous fix.
svn path=/trunk/; revision=14947
2005-07-17 22:30:56 +00:00
Gerald Combs 141f8341af Make the recent RADIUS changes work on IA64.
svn path=/trunk/; revision=14946
2005-07-17 22:16:59 +00:00
Guy Harris 9859c05fbc Get rid of the newline between "radius:" and the error when trying to
read the RADIUS directory.

The error string from "radius_load_dictionary()" is g_malloced; free it,
and g_strdup the "Could not find the radius directory" error, so we
don't have to worry about constant vs. g_malloced strings.

svn path=/trunk/; revision=14937
2005-07-16 01:55:58 +00:00
Luis Ontanon 9c341a333d Radius Dictionary Support
Part 2: the code

svn path=/trunk/; revision=14925
2005-07-15 21:12:27 +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
Anders Broman 2524713192 Add some Cisco AVP:s
svn path=/trunk/; revision=14705
2005-06-19 21:16:04 +00:00
Anders Broman 03bae827fc Change "radius type" on some vendor AVP:s and add some more ones.
svn path=/trunk/; revision=14673
2005-06-16 22:07:38 +00:00
Anders Broman e430a0b6f0 Add vendor AVP:s for T-Mobile and T-Systems Nova International GmbH.
svn path=/trunk/; revision=14629
2005-06-14 21:46:51 +00:00
Ulf Lamping fdb5b1af02 just to get things straight: a dissector should *never* do any g_assert() calls!
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED()

this will replace application crash by showing a dissector bug, which is the desired behaviour

there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too

one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain.

svn path=/trunk/; revision=14608
2005-06-10 18:28:22 +00:00
Anders Broman 1db20f1782 Fix a typo.
svn path=/trunk/; revision=14584
2005-06-08 05:03:36 +00:00
Gerald Combs bcd1c5b9fa From Steve Grubb: Fix buffer and array length checks. Fixes part of bug 217.
svn path=/trunk/; revision=14498
2005-05-30 21:01:52 +00:00
Jörg Mayer b6db235c77 Change 802.11f -> F, 802.1d -> D, 802.1x -> X, 802.1q -Q, 802.1P -> p
svn path=/trunk/; revision=14321
2005-05-05 17:07:58 +00:00
Gerald Combs e0224c5286 Check an AVP length. Fixes bug 128.
svn path=/trunk/; revision=14210
2005-04-28 03:31:20 +00:00
Guy Harris 9ce4ff20ef Tagged integers have 4 bytes of data (1 byte of tag, 3 bytes of
integer), not 5 bytes.

svn path=/trunk/; revision=13753
2005-03-14 20:23:11 +00:00
Guy Harris 0c70225fc6 Comment changes.
svn path=/trunk/; revision=13750
2005-03-14 10:45:46 +00:00
Luis Ontanon 8b481b2ab9 From Florian Lohoff:
Add Netscreen vendor specific attributes


svn path=/trunk/; revision=13650
2005-03-07 11:35:52 +00:00
Anders Broman aae42374bc Change the RADIUS ATTRIBUTES for some 3GPP AVP:s to display them as (UTF8)Strings, also
added some more AVP:s from a later spec.

svn path=/trunk/; revision=13554
2005-02-28 20:51:23 +00:00
Anders Broman b956a7c0a8 From LEGO
patch adding few more fields to RADIUS (I and O Packets and Octets)

svn path=/trunk/; revision=13351
2005-02-08 18:51:27 +00:00
Anders Broman f2c5299014 From LEGO:
- remove duplicate fields from VSAs (every defined field in VSAs was set twice)
 - dissect radius packet with avplen == 0 (did not decode authenticator when no AVPs were present)

svn path=/trunk/; revision=13216
2005-01-31 21:36:31 +00:00
Guy Harris ce604cf8f0 From Luis Ontanon: add more filterable fields to DNS, PGM, GTP, and RADIUS.
svn path=/trunk/; revision=12835
2004-12-26 00:22:16 +00:00
Guy Harris 9e176608c5 RFC 2868 says that the length of a "tagged string" field must be at
least 3 - 2 for type+length and 1 for the tag - so treat a "tagged
string" field as bad if there isn't at least one byte of data.  (It's a
bit odd that the RFC says that the tag must be in the range 0x01-0x1F -
that sounds suspiciously as if they're saying "printable characters
aren't valid tags", to allow untagged strings, which might suggest that
a field with a length of 2 should be interpreted as an empty string.)

svn path=/trunk/; revision=12817
2004-12-22 19:27:09 +00:00
Guy Harris d7ba617f71 In the "rdconvertXXXtostr()" routines, check that the length passed in
is >= 0 (if it's not, that's a bug), and make the buffer index and total
length variables int as well, to match the length.

svn path=/trunk/; revision=12811
2004-12-22 01:51:00 +00:00
Guy Harris 88cbf869eb Move the RADIUS_TIMESTAMP, RADIUS_INTEGER4_TAGGED, and RADIUS_UNKNOWN
case branches up, so the case branches are in the same order as the
elements of the enum are, and add length checks to RADIUS_TIMESTAMP and
RADIUS_INTEGER4_TAGGED.

svn path=/trunk/; revision=12810
2004-12-22 01:42:54 +00:00
Guy Harris 7402efa058 Add some checks to make sure the AVP length is large enough for the item
we're fetching from the AVP.

In the case of a tagged string, if the length is 2 (meaning the data
length is 0), assume there's no tag.

svn path=/trunk/; revision=12808
2004-12-22 00:23:55 +00:00
Gerald Combs 8e36c366f8 Remove an unneeded "ntohl()" call.
svn path=/trunk/; revision=12790
2004-12-20 16:15:29 +00:00
Gerald Combs 6c8707b255 Add PacketCable Event Message information to the "Info" column.
svn path=/trunk/; revision=12702
2004-12-09 21:06:03 +00:00
Anders Broman ec085fdae9 Add a value string for 3gpp2 Service option values.
svn path=/trunk/; revision=12696
2004-12-08 19:43:21 +00:00
Gerald Combs 9283135b8b Check for an invalid header length.
svn path=/trunk/; revision=12693
2004-12-08 15:19:10 +00:00
Guy Harris fee19e1413 Squelch some compiler warnings.
svn path=/trunk/; revision=12632
2004-12-01 06:48:52 +00:00
Anders Broman a8487d1bc3 add some 3gpp2 AVP:s to packet-radius.c and use "vendor" table packet-3g-a11.c
svn path=/trunk/; revision=12595
2004-11-24 12:25:37 +00:00
Gerald Combs 75ce5ae404 Fix a cut/paste error.
svn path=/trunk/; revision=12533
2004-11-16 23:29:09 +00:00
Gerald Combs d2de064046 Actually use radius_vendor_packetcable_policy_decision_status_vals.
svn path=/trunk/; revision=12207
2004-10-05 17:44:03 +00:00
Guy Harris f92d96db93 Add checks in "rd_add_field_to_tree()" for the length of the field.
Fix a compiler warning.

Clean up white space.

svn path=/trunk/; revision=12200
2004-10-05 08:27:21 +00:00
Guy Harris 85859a2aac Put in the radius-types URL but don't list it as a reference.
svn path=/trunk/; revision=12199
2004-10-05 08:09:58 +00:00
Gerald Combs 4e1906787f De-@-ify email addresses.
svn path=/trunk/; revision=12196
2004-10-04 20:15:38 +00:00
Gerald Combs cb6193c1e9 Add support for the PacketCable Event Message Specification
(PKT-SP-EM-I09-040402).  Code contributed by CableLabs.


svn path=/trunk/; revision=12195
2004-10-04 20:13:35 +00:00
Guy Harris 8d24ff694a From Kestutis Kupciunas: add new vendor enterprise codes for Gemtek
Systems and the Wi-Fi Alliance, and add Radius vendor-specific
attributes for them.

svn path=/trunk/; revision=12164
2004-10-01 07:01:53 +00:00
Guy Harris 915ebf2ca3 Move the #defines for SMI Network Management Private Enterprise Codes
for organizations to an <epan/sminmpec.h> header, and add in the ones
that were used (without #defines) in the Diameter dissector.

Merge the value_string tables for them from the Diameter and Radius
dissectors into epan/sminmpec.c and merge them.

Use that value_string table in the Diameter and Radius dissectors.

Constify some stuff in the Diameter dissector.

svn path=/trunk/; revision=12159
2004-09-30 20:27:47 +00:00
Anders Broman 1e20f02ab9 Don't undo the last changes
svn path=/trunk/; revision=12152
2004-09-30 18:26:35 +00:00
Anders Broman 209146e7f6 Add some vendor ID:s
svn path=/trunk/; revision=12151
2004-09-30 18:18:39 +00:00
Guy Harris d3f5261971 Move the DES, MD4, MD5, and RC4 source files and headers into epan, and
make the source files all include the corresponding header files (so
that the declarations in the headers have to match the definitions in
the source files in order for compilation to succeed).

svn path=/trunk/; revision=12116
2004-09-27 23:29:22 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Anders Broman 6f60bd99c3 Update some RADIUS value strings
svn path=/trunk/; revision=12054
2004-09-20 19:20:05 +00:00
Guy Harris 0893c8cec9 Add to the "radius_attr_info" structure a pointer to an hf_ value, and,
if that pointer is non-null, put the field in question into the protocol
tree under the top-level item for that attribute/value pair, rather than
hardcoding particular fields for particular attribute codes.

Use BASE_NONE, not BASE_DEC, for FT_STRING, FT_BYTES, and FT_IPv4
fields.

svn path=/trunk/; revision=12048
2004-09-19 11:39:48 +00:00
Anders Broman d3d9e6b2bb From: Luis Ontanon
1. As you said visible fileds are much better.

 2. As they became visible I noticed the length and offset of the fields
    were wrong, I fixed them.

 3. I added few more "essential" fields (as a colleague told me as soon
    as you move away from 3G some fileds like username become the most
    important) 

svn path=/trunk/; revision=11991
2004-09-13 18:21:28 +00:00
Guy Harris 9e0405f612 From Nathan Alger: update the JUNOS (Juniper) Radius VSA decodes to
JUNOS 5.3.

svn path=/trunk/; revision=11982
2004-09-13 07:43:22 +00:00
Guy Harris 46edf2a910 Newer version of Luis Ontanon's patch.
svn path=/trunk/; revision=11832
2004-08-25 05:51:14 +00:00
Anders Broman ed93214bc5 From Luis Ontanon:
add some fields for filtering on radius attributes. 

svn path=/trunk/; revision=11830
2004-08-25 05:14:17 +00:00
Guy Harris 3a583aeb59 From Albert Chin: rename resolv.{ch} to addr_resolv.{ch}, so that an
include of <resolv.h> in any system header file gets the system
<resolv.h> (needed for builds on Tru64 with GTK+ 1.2[.x]).

svn path=/trunk/; revision=11615
2004-08-06 19:57:49 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00