Wireshark-bugs: [Wireshark-bugs] [Bug 7552] Add support for EDNS0 option from draft-vandergaast-
Date: Wed, 10 Jul 2013 13:58:04 +0000

Comment # 12 on bug 7552 from
(In reply to comment #10)
> Option code is now assigned by IANA as 8. I propose to include a protocol
> warning for the old value.
> 
> Index: epan/dissectors/packet-dns.c
> ===================================================================
> --- epan/dissectors/packet-dns.c	(revision 50481)
> +++ epan/dissectors/packet-dns.c	(working copy)
> @@ -403,7 +403,8 @@
>  #define O_UL             2              /* Update lease (on-hold,
> draft-sekar-dns-ul) */
>  #define O_NSID           3              /* Name Server Identifier (RFC
> 5001) */
>  #define O_OWNER          4              /* Owner, reserved
> (draft-cheshire-edns0-owner-option) */
> -#define O_CLIENT_SUBNET  0x50fa         /* Client subnet (placeholder
> value, draft-vandergaast-edns-client-subnet) */
> +#define O_CLIENT_SUBNET  8              /* Client subnet as assigned by
> IANA */
> +#define O_CLIENT_SUBNET_EXP 0x50fa      /* Client subnet (placeholder
> value, draft-vandergaast-edns-client-subnet) */
>  
>  static const true_false_string tfs_flags_response = {
>    "Message is a response",
> @@ -804,7 +805,8 @@
>    {O_UL,         "UL - Update lease"},
>    {O_NSID,       "NSID - Name Server Identifier"},
>    {O_OWNER,      "Owner (reserved)"},
> -  {O_CLIENT_SUBNET, "Experimental - CSUBNET - Client subnet" },
> +  {O_CLIENT_SUBNET_EXP, "Experimental - CSUBNET - Client subnet" },
> +  {O_CLIENT_SUBNET, "CSUBNET - Client subnet" },
>    {0,            NULL}
>   };
>  /* DNS-Based Authentication of Named Entities (DANE) Parameters
> @@ -2395,13 +2397,20 @@
>          rropt = proto_tree_add_item(rr_tree, hf_dns_rr_opt, tvb,
> cur_offset, 4 + optlen, ENC_NA);
>          proto_item_append_text(rropt, ": %s", val_to_str(optcode,
> edns0_opt_code_vals, "Unknown (%d)"));
>          rropt_tree = proto_item_add_subtree(rropt, ett_dns_opts);
> -        proto_tree_add_item(rropt_tree, hf_dns_rr_opt_code, tvb,
> cur_offset, 2, ENC_BIG_ENDIAN);
> +        rropt = proto_tree_add_item(rropt_tree, hf_dns_rr_opt_code, tvb,
> cur_offset, 2, ENC_BIG_ENDIAN);
>          cur_offset += 2;
> +        if (optcode == O_CLIENT_SUBNET_EXP) {
> +          expert_add_info_format(pinfo, rropt, PI_PROTOCOL, PI_WARN,
> +            "Deprecated OPC. Client subnet OPT assigned as %d.",
> +            O_CLIENT_SUBNET);
> +        }
>          rropt = proto_tree_add_item(rropt_tree, hf_dns_rr_opt_len, tvb,
> cur_offset, 2, ENC_BIG_ENDIAN);
>          cur_offset += 2;
>  
>          proto_tree_add_item(rropt_tree, hf_dns_rr_opt_data, tvb,
> cur_offset, optlen, ENC_NA);
>          switch(optcode) {
> +          case O_CLIENT_SUBNET_EXP:
> +            /* Intentional fall-through */
>            case O_CLIENT_SUBNET:{
>              guint16 family;
>              union {

Hi Yuri,

Thanks,

it is possible to use the new expert "framework" ?
And also attach the patch in diff format ?


You are receiving this mail because:
  • You are watching all bug changes.