diff --git a/server/fwknopd_common.h b/server/fwknopd_common.h index 360e162a..f6bf5a6f 100644 --- a/server/fwknopd_common.h +++ b/server/fwknopd_common.h @@ -635,10 +635,10 @@ typedef struct spa_data char *version; short message_type; char *spa_message; - char spa_message_src_ip[MAX_IPV4_STR_LEN]; - char pkt_source_ip[MAX_IPV4_STR_LEN]; - char pkt_source_xff_ip[MAX_IPV4_STR_LEN]; - char pkt_destination_ip[MAX_IPV4_STR_LEN]; + char spa_message_src_ip[MAX_IPV46_STR_LEN]; + char pkt_source_ip[MAX_IPV46_STR_LEN]; + char pkt_source_xff_ip[MAX_IPV46_STR_LEN]; + char pkt_destination_ip[MAX_IPV46_STR_LEN]; char spa_message_remain[1024]; /* --DSS FIXME: arbitrary bounds */ char *nat_access; char *server_auth; diff --git a/server/incoming_spa.c b/server/incoming_spa.c index 00731c3a..34984aa4 100644 --- a/server/incoming_spa.c +++ b/server/incoming_spa.c @@ -930,10 +930,10 @@ incoming_spa(fko_srv_options_t *opts) */ acc_stanza_t *acc = opts->acc_stanzas; - inet_ntop(AF_INET, &(spa_pkt->packet_src_ip), + inet_ntop(spa_pkt->packet_family, &(spa_pkt->packet_src_ip), spadat.pkt_source_ip, sizeof(spadat.pkt_source_ip)); - inet_ntop(AF_INET, &(spa_pkt->packet_dst_ip), + inet_ntop(spa_pkt->packet_family, &(spa_pkt->packet_dst_ip), spadat.pkt_destination_ip, sizeof(spadat.pkt_destination_ip)); /* At this point, we want to validate and (if needed) preprocess the