summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2017-03-13 15:12:50 +0100
committerMichael Mann <mmann78@netscape.net>2017-03-14 00:58:53 +0000
commitf94509c140b8cd72d041f3925be9c8af3b38ffb7 (patch)
tree64245080f4d4d9acf33e6350468f987c3ca23d60 /epan
parenta6f7e16859b35d1d0b680eb04caabc82f7cc70e7 (diff)
downloadwireshark-f94509c140b8cd72d041f3925be9c8af3b38ffb7.tar.gz
bootp: Add Captive-Portal option (160)
Thanks to David Bird for pcap Bug: 13483 Change-Id: Id53eadd5faa7599c3864840aa80a8770099baac3 Reviewed-on: https://code.wireshark.org/review/20531 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-bootp.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c
index a3c70a92ce..1b23428317 100644
--- a/epan/dissectors/packet-bootp.c
+++ b/epan/dissectors/packet-bootp.c
@@ -53,6 +53,7 @@
* RFC 5417: CAPWAP Access Controller DHCP Option
* RFC 5969: IPv6 Rapid Deployment on IPv4 Infrastructures (6rd)
* RFC 6607: Virtual Subnet Selection Options for DHCPv4 and DHCPv6
+ * RFC 7710: Captive-Portal Identification Using DHCP or Router Advertisements (RAs)
* draft-ietf-dhc-fqdn-option-07.txt
* TFTP Server Address Option for DHCPv4 [draft-raj-dhc-tftp-addr-option-06.txt: http://tools.ietf.org/html/draft-raj-dhc-tftp-addr-option-06]
* BOOTP and DHCP Parameters
@@ -534,6 +535,7 @@ static int hf_bootp_option_subnet_selection_option = -1; /* 118 */
static int hf_bootp_option_lost_server_domain_name = -1; /* 137 */
static int hf_bootp_option_capwap_access_controller = -1; /* 138 */
static int hf_bootp_option_tftp_server_address = -1; /* 150 */
+static int hf_bootp_option_captive_portal = -1; /* 160 */
static int hf_bootp_option_mudurl = -1; /* 161 */
static int hf_bootp_option_pxe_config_file = -1; /* 209 */
static int hf_bootp_option_pxe_path_prefix = -1; /* 210 */
@@ -1377,7 +1379,7 @@ static struct opt_info default_bootp_opt[BOOTP_OPT_NUM] = {
/* 157 */ { "Unassigned", opaque, NULL },
/* 158 */ { "Unassigned", opaque, NULL },
/* 159 */ { "Unassigned", opaque, NULL },
-/* 160 */ { "Unassigned", opaque, NULL },
+/* 160 */ { "DHCP Captive-Portal", special, NULL },
/* 161 */ { "Manufacturer Usage Description", string, &hf_bootp_option_mudurl},
/* 162 */ { "Unassigned", opaque, NULL },
/* 163 */ { "Unassigned", opaque, NULL },
@@ -2911,6 +2913,14 @@ bootp_option(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bp_tree, proto_item
break;
}
+ case 160: { /* DHCP Captive-Portal */
+ proto_item *ti_cp;
+ ti_cp = proto_tree_add_item(v_tree, hf_bootp_option_captive_portal, tvb, optoff, optlen, ENC_ASCII|ENC_NA);
+ PROTO_ITEM_SET_URL(ti_cp);
+ break;
+ }
+
+
case 212: { /* 6RD option (RFC 5969) */
if (optlen < 22) {
expert_add_info(pinfo, vti, &ei_bootp_option_6RD_malformed);
@@ -8375,6 +8385,11 @@ proto_register_bootp(void)
FT_STRING, BASE_NONE, NULL, 0x0,
"Option 210: PXE Path Prefix", HFILL }},
+ { &hf_bootp_option_captive_portal,
+ { "Captive Portal", "bootp.option.captive_portal",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ "The contact URI for the captive portal that the user should connect to", HFILL }},
+
{ &hf_bootp_option_6RD_ipv4_mask_len,
{ "6RD IPv4 Mask Length", "bootp.option.6RD.ipv4_mask_len",
FT_UINT8, BASE_DEC, NULL, 0x0,