Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9771125

Browse files
committed
Fix recent changes to not break non-IPV6-aware systems.
1 parent33ae03f commit9771125

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/backend/libpq/hba.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,8 @@ ipv4eq(struct sockaddr_in *a, struct sockaddr_in *b)
548548
return (a->sin_addr.s_addr==b->sin_addr.s_addr);
549549
}
550550

551+
#ifdefHAVE_IPV6
552+
551553
staticbool
552554
ipv6eq(structsockaddr_in6*a,structsockaddr_in6*b)
553555
{
@@ -560,6 +562,8 @@ ipv6eq(struct sockaddr_in6 *a, struct sockaddr_in6 *b)
560562
return true;
561563
}
562564

565+
#endif/* HAVE_IPV6 */
566+
563567
/*
564568
* Check to see if a connecting IP matches a given host name.
565569
*/
@@ -614,6 +618,7 @@ check_hostname(hbaPort *port, const char *hostname)
614618
break;
615619
}
616620
}
621+
#ifdefHAVE_IPV6
617622
elseif (gai->ai_addr->sa_family==AF_INET6)
618623
{
619624
if (ipv6eq((structsockaddr_in6*)gai->ai_addr,
@@ -623,6 +628,7 @@ check_hostname(hbaPort *port, const char *hostname)
623628
break;
624629
}
625630
}
631+
#endif
626632
}
627633
}
628634

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp