aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-07-16 15:39:17 +0200
committerHarald Welte <laforge@osmocom.org>2020-09-11 23:32:25 +0200
commit42bd018b2020ae0b930f6a2beb5313034abe6f87 (patch)
treec5c2580d65ab1fdaa37313ff2e4b755a56d6cb3c
parent105fa402841f6e83b13f2e558e73dee2d4a2a713 (diff)
L2TP: Add preference to select Ericsson HDLC flavor
At some point over the wireshark last years, the connection between the L2TP dissector and the Ericsson HDLC dissector (packet-ehdlc.c) got broken. I cannot poinpoint the exact change when it broke. However, traces with Ericsson L2TP that used to display correctly no longer do so. The problem with Ericsson L2TP is that they simply re-use the HDLC pseudowire (0x0006), but then have frames completely different than what's specified in the RFCs for that. To address this, let's add a protocol preference to allow the user to choose. Change-Id: Idce022ef0f233c01ecffc67dca7f428bde31ef6b
-rw-r--r--epan/dissectors/packet-l2tp.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c
index 70af7d552c..5b1a4def0e 100644
--- a/epan/dissectors/packet-l2tp.c
+++ b/epan/dissectors/packet-l2tp.c
@@ -325,6 +325,8 @@ static const enum_val_t l2tpv3_l2_specifics[] = {
{NULL, NULL, 0}
};
+static gint l2tpv3_hdlc_ericsson = -1;
+
static gint l2tpv3_cookie = -1;
static gint l2tpv3_l2_specific = -1;
@@ -1371,7 +1373,11 @@ static l2tpv3_session_t *store_pw_type(l2tpv3_session_t *_session,
case 0x0005:
result = L2TPv3_PROTOCOL_ETH; break;
case 0x0006:
- result = L2TPv3_PROTOCOL_CHDLC; break;
+ if (l2tpv3_hdlc_ericsson)
+ result = L2TPv3_PROTOCOL_ERICSSON;
+ else
+ result = L2TPv3_PROTOCOL_CHDLC;
+ break;
case 0x0002:
result = L2TPv3_PROTOCOL_AAL5; break;
case 0x0001:
@@ -3764,6 +3770,12 @@ proto_register_l2tp(void)
l2tpv3_l2_specifics,
FALSE);
+ prefs_register_bool_preference(l2tp_module,
+ "hdlc_ericsson",
+ "Ericsson HDLC",
+ "Use Ericsson HDLC Flavor",
+ &l2tpv3_hdlc_ericsson);
+
prefs_register_obsolete_preference(l2tp_module, "protocol");
prefs_register_string_preference(l2tp_module,"shared_secret","Shared Secret",