From c727c284040b6d14ac9f161aa6a9cfd58d6cb9eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Tvrd=C3=ADk?= Date: Mon, 18 Jan 2016 08:10:14 +0100 Subject: [PATCH] RPKI: replace sock->af usage with sock->fam --- proto/rpki/rpki.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/proto/rpki/rpki.c b/proto/rpki/rpki.c index a92739f0..1830ee03 100644 --- a/proto/rpki/rpki.c +++ b/proto/rpki/rpki.c @@ -223,7 +223,10 @@ rpki_sock_dst_autoresolv(sock *sk) return TR_ERROR; } - sk->af = res->ai_family; + if (res->ai_family == AF_INET) + sk->fam = SK_FAM_IPV4; + else + sk->fam = SK_FAM_IPV6; /* optimistic */ sockaddr sa = { .sa = *res->ai_addr, @@ -237,7 +240,7 @@ rpki_sock_dst_autoresolv(sock *sk) else if (ipa_zero(sk->daddr) && !sk->host) return TR_ERROR; else - sk->af = ip6_is_v4mapped(sk->daddr) ? AF_INET : AF_INET6; + sk->fam = ip6_is_v4mapped(sk->daddr) ? SK_FAM_IPV4 : SK_FAM_IPV6; /* optimistic */ return TR_SUCCESS; }