aboutsummaryrefslogtreecommitdiffstats
path: root/capture_ui_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'capture_ui_utils.c')
-rw-r--r--capture_ui_utils.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/capture_ui_utils.c b/capture_ui_utils.c
index 1d4b523dc6..aaa20eeb79 100644
--- a/capture_ui_utils.c
+++ b/capture_ui_utils.c
@@ -319,11 +319,13 @@ get_if_name(const char *if_text)
* it'll be followed by a blank if it separates the description
* and the interface name. (We don't wire in "rpcap", in case we
* support other protocols in the same syntax.)
+ * Unfortunately, another colon can be used in "rpcap://host:port/"
+ * before port. Check if colon is followed by digit.
*/
- if (strncmp(if_name, "://", 3) != 0) {
+ if ((strncmp(if_name, "://", 3) != 0) && !isdigit(if_name[1])) {
/*
- * OK, we've found a colon not followed by "//". Skip blanks
- * following it.
+ * OK, we've found a colon followed neither by "//" nor by digit.
+ * Skip blanks following it.
*/
if_name++;
while (*if_name == ' ')