Fix a number of proto_tree_add_item() encoding args.
[obnox/wireshark/wip.git] / epan / dissectors / packet-ipv6.c
index 84570660b5229e106170b9868b1224fad8213942..d59720f20a73c9dff62a162d82f09db23268c89c 100644 (file)
@@ -285,7 +285,7 @@ static gboolean ipv6_summary_in_tree = TRUE;
 
 #ifdef HAVE_GEOIP_V6
 /* Look up addresses in GeoIP */
-static gboolean ipv6_use_geoip = FALSE;
+static gboolean ipv6_use_geoip = TRUE;
 #endif /* HAVE_GEOIP_V6 */
 
 #ifndef offsetof
@@ -412,6 +412,7 @@ add_geoip_info(proto_tree *tree, tvbuff_t *tvb, gint offset, struct e_in6_addr s
   guint item_cnt;
 
   num_dbs = geoip_db_num_dbs();
+  if (num_dbs < 1) return;
 
   geoip_info_item = proto_tree_add_text(tree, tvb, offset + IP6H_SRC, 16, "Source GeoIP: ");
   geoip_info_tree = proto_item_add_subtree(geoip_info_item, ett_geoip_info);
@@ -556,7 +557,7 @@ enum {
   IPv6_RT_HEADER_SOURCE_ROUTING=0,
   IPv6_RT_HEADER_NIMROD,
   IPv6_RT_HEADER_MobileIP,
-  IPv6_RT_HEADER_RPL=4,
+  IPv6_RT_HEADER_RPL=4
 };
 
 /* Routeing Header Types */
@@ -921,7 +922,7 @@ dissect_opts(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info * pinfo, c
 
     if (tree) {
        /* !!! specify length */
-       ti = proto_tree_add_item(tree, hf_option_item, tvb, offset, len, FALSE);
+       ti = proto_tree_add_item(tree, hf_option_item, tvb, offset, len, ENC_NA);
 
        dstopt_tree = proto_item_add_subtree(ti, ett_ipv6);
 
@@ -1241,7 +1242,7 @@ dissect_shimopts(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo
        proto_tree_add_item(opt_tree, hf_ipv6_shim6_opt_type, tvb, offset, 2, ENC_BIG_ENDIAN);
 
        /* Critical */
-       proto_tree_add_item(opt_tree, hf_ipv6_shim6_opt_critical, tvb, offset+1, 1, FALSE);
+       proto_tree_add_item(opt_tree, hf_ipv6_shim6_opt_critical, tvb, offset+1, 1, ENC_BIG_ENDIAN);
 
        /* Content Length */
        proto_tree_add_item(opt_tree, hf_ipv6_shim6_opt_len, tvb, offset + 2, 2, ENC_BIG_ENDIAN);
@@ -1649,7 +1650,7 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     proto_item *ipv6_tc;
     const char *name;
 
-    ipv6_item = proto_tree_add_item(tree, proto_ipv6, tvb, offset, -1, FALSE);
+    ipv6_item = proto_tree_add_item(tree, proto_ipv6, tvb, offset, -1, ENC_NA);
     ipv6_tree = proto_item_add_subtree(ipv6_item, ett_ipv6);
 
     /* !!! warning: (4-bit) version, (6-bit) DSCP, (1-bit) ECN-ECT, (1-bit) ECN-CE and (20-bit) Flow */
@@ -1657,7 +1658,7 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        offset + offsetof(struct ip6_hdr, ip6_vfc), 1, ENC_BIG_ENDIAN);
        pt = proto_item_add_subtree(pi,ett_ipv6_version);
     pi = proto_tree_add_item(pt, hf_ip_version, tvb,
-                                               offset + offsetof(struct ip6_hdr, ip6_vfc), 1, FALSE);
+                                               offset + offsetof(struct ip6_hdr, ip6_vfc), 1, ENC_BIG_ENDIAN);
        PROTO_ITEM_SET_GENERATED(pi);
 
     ipv6_tc = proto_tree_add_item(ipv6_tree, hf_ipv6_class, tvb,