-
Notifications
You must be signed in to change notification settings - Fork 1
/
packet-http.c.patch
49 lines (42 loc) · 1.92 KB
/
packet-http.c.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
diff --git a/epan/dissectors/packet-http.c b/epan/dissectors/packet-http.c
index 1a4ce6e..f37448e 100644
--- a/epan/dissectors/packet-http.c
+++ b/epan/dissectors/packet-http.c
@@ -272,6 +272,7 @@ static gboolean http_decompress_body = FALSE;
*/
#define TCP_DEFAULT_RANGE "80,3128,3132,5985,8080,8088,11371,1900,2869,2710"
+#define SCTP_DEFAULT_RANGE "80"
#define SSL_DEFAULT_RANGE "443"
#define UPGRADE_WEBSOCKET 1
@@ -279,9 +280,11 @@ static gboolean http_decompress_body = FALSE;
#define UPGRADE_SSTP 3
static range_t *global_http_tcp_range = NULL;
+static range_t *global_http_sctp_range = NULL;
static range_t *global_http_ssl_range = NULL;
static range_t *http_tcp_range = NULL;
+static range_t *http_sctp_range = NULL;
static range_t *http_ssl_range = NULL;
typedef void (*ReqRespDissector)(tvbuff_t*, proto_tree*, int, const guchar*,
@@ -3103,6 +3106,11 @@ static void reinit_http(void) {
http_tcp_range = range_copy(global_http_tcp_range);
dissector_add_uint_range("tcp.port", http_tcp_range, http_handle);
+ dissector_delete_uint_range("sctp.port", http_sctp_range, http_handle);
+ g_free(http_sctp_range);
+ http_sctp_range = range_copy(global_http_sctp_range);
+ dissector_add_uint_range("sctp.port", http_sctp_range, http_handle);
+
range_foreach(http_ssl_range, range_delete_http_ssl_callback);
g_free(http_ssl_range);
http_ssl_range = range_copy(global_http_ssl_range);
@@ -3437,6 +3445,12 @@ proto_register_http(void)
"TCP Ports range",
&global_http_tcp_range, 65535);
+ range_convert_str(&global_http_sctp_range, SCTP_DEFAULT_RANGE, 65535);
+ http_sctp_range = range_empty();
+ prefs_register_range_preference(http_module, "sctp.port", "SCTP Ports",
+ "SCTP Ports range",
+ &global_http_sctp_range, 65535);
+
range_convert_str(&global_http_ssl_range, SSL_DEFAULT_RANGE, 65535);
http_ssl_range = range_empty();
prefs_register_range_preference(http_module, "ssl.port", "SSL/TLS Ports",