diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2015-11-23 10:21:34 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-11-23 09:44:04 +0000 |
commit | 52c3fb82e09196001f175af46c415e3675f565d7 (patch) | |
tree | 04a6e83fd273250217d9c68755ef0baea284456e | |
parent | 9f017eb245e348116f9dd9be2e62be57f17cdd28 (diff) |
RADIUS: Use directly tvb_ip_to_str
Change-Id: I13e8307ec52b857876aa3582c6f4443e831f00a3
Reviewed-on: https://code.wireshark.org/review/12060
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/packet-radius.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c index d98872b699..5a72816952 100644 --- a/epan/dissectors/packet-radius.c +++ b/epan/dissectors/packet-radius.c @@ -945,20 +945,15 @@ void radius_octets(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _ } void radius_ipaddr(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) { - guint32 ip; - gchar buf[MAX_IP_STR_LEN]; if (len != 4) { proto_item_append_text(avp_item, "[wrong length for IP address]"); return; } - ip=tvb_get_ipv4(tvb,offset); - proto_tree_add_item(tree, a->hf, tvb, offset, len, ENC_BIG_ENDIAN); - ip_to_str_buf((guint8 *)&ip, buf, MAX_IP_STR_LEN); - proto_item_append_text(avp_item, "%s", buf); + proto_item_append_text(avp_item, "%s", tvb_ip_to_str(tvb, offset)); } void radius_ipv6addr(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) { |