aboutsummaryrefslogtreecommitdiffstats
path: root/packet-llc.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-01-12 20:00:19 +0000
committerGuy Harris <guy@alum.mit.edu>2000-01-12 20:00:19 +0000
commit8c09da31c864d61c07552cc21ed2c1ad29477304 (patch)
treeba3d959fdd483914793e7efdc3223c5cf2722eda /packet-llc.c
parent3db486ab748a6f5c8f5c1aeeb1e3710c85694f36 (diff)
For the Cisco OUI, always add the protocol ID to the tree if we're
constructing a protocol tree. Don't add the protocol ID for unknown OUIs unless we're constructing a protocol tree. svn path=/trunk/; revision=1453
Diffstat (limited to 'packet-llc.c')
-rw-r--r--packet-llc.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/packet-llc.c b/packet-llc.c
index 5768c11c66..66aa6fc356 100644
--- a/packet-llc.c
+++ b/packet-llc.c
@@ -2,7 +2,7 @@
* Routines for IEEE 802.2 LLC layer
* Gilbert Ramirez <gramirez@tivoli.com>
*
- * $Id: packet-llc.c,v 1.38 2000/01/12 19:37:23 guy Exp $
+ * $Id: packet-llc.c,v 1.39 2000/01/12 20:00:19 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -376,22 +376,23 @@ dissect_llc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
protocol ID of 0x2000, or
are some of them raw or encapsulated
Ethernet? */
+ if (tree) {
+ proto_tree_add_item(llc_tree,
+ hf_llc_pid, offset+6, 2, etype);
+ }
switch (etype) {
case 0x2000:
- if (tree) {
- proto_tree_add_item(llc_tree,
- hf_llc_pid, offset+6,
- 2, etype);
- }
dissect_cdp(pd, offset+8, fd, tree);
break;
}
break;
default:
- proto_tree_add_item(llc_tree, hf_llc_pid,
- offset+6, 2, etype);
+ if (tree) {
+ proto_tree_add_item(llc_tree,
+ hf_llc_pid, offset+6, 2, etype);
+ }
dissect_data(pd, offset+8, fd, tree);
break;
}