From 8ff85f09cbc78da99b0a11f59728ad110b2a4a6b Mon Sep 17 00:00:00 2001 From: irungentoo Date: Wed, 31 Dec 2014 12:30:39 -0500 Subject: Check if received ip family is valid for the onion packets. --- toxcore/DHT.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'toxcore/DHT.h') diff --git a/toxcore/DHT.h b/toxcore/DHT.h index 3f7a820e..547f3887 100644 --- a/toxcore/DHT.h +++ b/toxcore/DHT.h @@ -65,7 +65,9 @@ /* Functions to transfer ips safely across wire. */ void to_net_family(IP *ip); -void to_host_family(IP *ip); + +/* return 0 on success, -1 on failure. */ +int to_host_family(IP *ip); typedef struct { IP_Port ip_port; -- cgit v1.2.3