Browse Source

Add a resolv.conf option to specify the order in which getaddrinfo

PF_UNSPEC queries are made. While there change the default from inet6
first then inet4 to inet4 first then inet6, this prevents the many
people with IPv4 only connectivity from constantly trying to contact
IPv6 addresses, and also unbreaks many ports who don't use getaddrinfo
right.
ok deraadt@, plenty of cheering in the room wrt the idea, not loud
enough complaining from the v6 crowd.
OPENBSD_4_6
pyr 15 years ago
parent
commit
0ec535fbe6
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/include/resolv.h

+ 4
- 1
src/include/resolv.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: resolv.h,v 1.16 2005/03/30 02:58:28 tedu Exp $ */
/* $OpenBSD: resolv.h,v 1.17 2009/06/04 18:06:35 pyr Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -136,6 +136,9 @@ struct __res_state {
int retry; /* number of times to retransmit */
unsigned int options; /* option flags - see below. */
int nscount; /* number of name servers */
int family[2]; /* specifies which address
* families will be queried and
* in which order */
struct sockaddr_in
nsaddr_list[MAXNS]; /* address of name server */
#define nsaddr nsaddr_list[0] /* for backward compatibility */


Loading…
Cancel
Save