You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@bellsouth.net> on 2000/12/17 14:35:42 UTC

cmd-line switch or cfg directive for setting default addr family?

Much of the remaining IPv6 patch at http://www.apache.org/~trawick/
(now quite small!) deals with ap_default_family and the setting of it
via a command-line switch.  This is the way the KAME patch implements
it, but I prefer a directive in the configuration file, like this:

DefaultFamily directive

Syntax: DefaultFamily inet|inet6|autodetect
Context: server config
Status: MPM
Module: dexter, mpmt_pthread, perchild, prefork, mpm_winnt

The DefaultFamily directive specifies the address family for ambiguous
directives where no information is available to determine the address
family.  Affected directives include Listen, NameVirtualHost, and 
<VirtualHost >.  The address family used determines whether or not
requests sent over IPv6 will be received by Apache.

As an example, consider the directive "Listen 80."  If DefaultFamily
is inet, Apache will create an AF_INET socket and bind it to port 80.
If DefaultFamily is inet6, Apache will create an AF_INET6 socket and
bind it to port 80.  If autodetect is used, Apache will create an 
AF_INET6 socket if the system supports IPv6, and fall back to AF_INET
if the system doesn't support IPv6.

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cmd-line switch or cfg directive for setting default addr family?

Posted by Jeff Trawick <tr...@bellsouth.net>.
Greg Ames <gr...@raleigh.ibm.com> writes:

> Jeff Trawick wrote:
> > 
> [...]
> > 
> > DefaultFamily directive
> > 
> > Syntax: DefaultFamily inet|inet6|autodetect
> > Context: server config
> > Status: MPM
> > Module: dexter, mpmt_pthread, perchild, prefork, mpm_winnt
> > 
> > The DefaultFamily directive specifies the address family for ambiguous
> 
> One minor suggestion: could we have something in the name of the
> directive that suggests more directly that this is an IP kind of thing? 
> like DefaultIPVersion or DefaultInetFamily or some such?  

I could go for DefailtInetFamily :)

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cmd-line switch or cfg directive for setting default addr family?

Posted by Greg Ames <gr...@raleigh.ibm.com>.
Jeff Trawick wrote:
> 
[...]
> 
> DefaultFamily directive
> 
> Syntax: DefaultFamily inet|inet6|autodetect
> Context: server config
> Status: MPM
> Module: dexter, mpmt_pthread, perchild, prefork, mpm_winnt
> 
> The DefaultFamily directive specifies the address family for ambiguous

One minor suggestion: could we have something in the name of the
directive that suggests more directly that this is an IP kind of thing? 
like DefaultIPVersion or DefaultInetFamily or some such?  

I'm thinking of an admin who doesn't already know what it's all about
scanning the names of the runtime directives in the online manual.  She
won't be able to figure it out without seeing what it can be set to.

Greg

Re: cmd-line switch or cfg directive for setting default addr family?

Posted by Greg Stein <gs...@lyra.org>.
On Sun, Dec 17, 2000 at 08:35:42AM -0500, Jeff Trawick wrote:
>...
> DefaultFamily directive
> 
> Syntax: DefaultFamily inet|inet6|autodetect
> Context: server config
> Status: MPM
> Module: dexter, mpmt_pthread, perchild, prefork, mpm_winnt

+1

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: cmd-line switch or cfg directive for setting default addr family?

Posted by Jeff Trawick <tr...@bellsouth.net>.
rbb@covalent.net writes:

> On 17 Dec 2000, Jeff Trawick wrote:
> 
> > the cfg directive isn't so cool since we need that info before we
> > might see DefaultFamily...
> 
> Make it a EXEC_ON_READ directive, and we will be sure the see it before we
> need it.  That flag forces us to evaluate the directive as we read the
> file instead of as we walk the tree.

Thanks for the info!
-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Re: cmd-line switch or cfg directive for setting default addr family?

Posted by rb...@covalent.net.
On 17 Dec 2000, Jeff Trawick wrote:

> the cfg directive isn't so cool since we need that info before we
> might see DefaultFamily...

Make it a EXEC_ON_READ directive, and we will be sure the see it before we
need it.  That flag forces us to evaluate the directive as we read the
file instead of as we walk the tree.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cmd-line switch or cfg directive for setting default addr family?

Posted by Jeff Trawick <tr...@bellsouth.net>.
the cfg directive isn't so cool since we need that info before we
might see DefaultFamily...
-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...