aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ipsec.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-10-26 21:42:45 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-10-26 21:42:45 +0000
commit095c62b66e99c7cbb640baf4ec2025b025113261 (patch)
tree4b20e4dc0451bcc526db6826f9aa1f6d66e1569a /epan/dissectors/packet-ipsec.c
parent406678d63b5fb7358774e93220c0cc159d618c71 (diff)
The comparison with the UAT keys are broken, this is
a fix for the SPI the src and dst IP address strings needs fixing too. I'll look into that tomorrow if no one beats me too it. svn path=/trunk/; revision=39621
Diffstat (limited to 'epan/dissectors/packet-ipsec.c')
-rw-r--r--epan/dissectors/packet-ipsec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ipsec.c b/epan/dissectors/packet-ipsec.c
index a5fba11583..759158ad7d 100644
--- a/epan/dissectors/packet-ipsec.c
+++ b/epan/dissectors/packet-ipsec.c
@@ -151,7 +151,8 @@ static dissector_table_t ip_dissector_table;
#define IPSEC_SA_IPV6 2
#define IPSEC_SA_UNKNOWN -1
#define IPSEC_SA_WILDCARDS_ANY '*'
-#define IPSEC_SPI_LEN_MAX 10
+/* the maximum number of bytes (10)(including the terminating nul character(11)) */
+#define IPSEC_SPI_LEN_MAX 11
#endif
@@ -812,7 +813,7 @@ get_esp_sa(gint protocol_typ, gchar *src, gchar *dst, gint spi,
gchar spi_string[IPSEC_SPI_LEN_MAX];
gint key_len;
- g_snprintf(spi_string, IPSEC_SPI_LEN_MAX,"%i", spi);
+ g_snprintf(spi_string, IPSEC_SPI_LEN_MAX,"0x%x", spi);
for (i = 0; (found == FALSE) && (i < num_sa_uat); i++)
{