aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/menu.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2007-07-23 20:18:01 +0000
committerUlf Lamping <ulf.lamping@web.de>2007-07-23 20:18:01 +0000
commit6cae0b219375fa2b026e7de76b1cc3078c5e7355 (patch)
tree8ae0ad3e79cb92f44ea4193f3569855a821ea22e /gtk/menu.c
parent87ee5c1a52a905c1592411b01680a94caa1f78e2 (diff)
for the Ethernet conversation filter, don't use ethertype but the data link address type being Ethernet. If the ethertype field is a length (0-1500), it will contain 0 - and the filter wouldn't work that way
svn path=/trunk/; revision=22389
Diffstat (limited to 'gtk/menu.c')
-rw-r--r--gtk/menu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/menu.c b/gtk/menu.c
index 6dca0cc9b0..ee707ec0e3 100644
--- a/gtk/menu.c
+++ b/gtk/menu.c
@@ -342,7 +342,9 @@ conversation_cb(GtkWidget * w, gpointer data _U_, int action)
break;
case(CONV_ETHER):
/* XXX - is this the right way to check for Ethernet? */
- if (cfile.edt->pi.ethertype == 0x0) {
+ /* check for the data link address type */
+ /* (ethertype will be 0 when used as length field) */
+ if (cfile.edt->pi.dl_src.type != 1) {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
"Error filtering conversation. Please make\n"
"sure you have a Ethernet packet selected.");
@@ -2408,7 +2410,7 @@ set_menus_for_selected_packet(capture_file *cf)
set_menu_sensitivity(tree_view_menu_factory, "/Follow SSL Stream",
cf->current_frame != NULL ? is_ssl : FALSE);
set_menu_sensitivity(packet_list_menu_factory, "/Conversation Filter/Ethernet",
- cf->current_frame != NULL ? (cf->edt->pi.ethertype != 0) : FALSE);
+ cf->current_frame != NULL ? (cf->edt->pi.dl_src.type == 1) : FALSE);
set_menu_sensitivity(packet_list_menu_factory, "/Conversation Filter/IP",
cf->current_frame != NULL ? (cf->edt->pi.ethertype == 0x800) : FALSE);
set_menu_sensitivity(packet_list_menu_factory, "/Conversation Filter/TCP",