Bug 217272

Summary: AddressFamily inet6 doesn't force ipv6
Product: Red Hat Enterprise Linux 4 Reporter: Matthew Booth <mbooth>
Component: opensshAssignee: Tomas Mraz <tmraz>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-11-28 20:01:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Booth 2006-11-26 10:10:01 UTC
Description of problem:
I have the following in .ssh/config:

Host gideon *.revolutionwall.net
AddressFamily inet6
User matthew

However, the following uses IPv4:
[mbooth@mbooth ~]$ ssh gideon
Last login: Sun Nov 26 10:03:37 2006 from xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
[matthew@gideon ~]$ who
matthew  pts/0        Nov 26 10:03 (ezekiel.revolutionwall.net)

To use IPv6 I must specify the -6 option to ssh:
[mbooth@mbooth ~]$ ssh -6 gideon
Last login: Sun Nov 26 10:03:40 2006 from ezekiel.revolutionwall.net
[matthew@gideon ~]$ who
matthew  pts/0        Nov 26 10:04 (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx)

The man page for ssh_config suggests this should not be the case:
     AddressFamily
             Specifies which address family to use when connecting.  Valid
             arguments are “any”, “inet” (Use IPv4 only) or “inet6” (Use IPv6
             only.)

Version-Release number of selected component (if applicable):
openssh-3.9p1-8.RHEL4.17.1.i386

How reproducible:
Always

Steps to Reproduce:
1. Create a network with both IPv4 and IPv6 connectivity
2. Assign both A and AAAA records for the target host
3. Specify AddressFamily inet6 in ~/.ssh/config for that host
4. ssh to the host with no arguments

Actual results:
ssh uses IPv4

Expected results:
ssh uses IPv6

Comment 1 Tomas Mraz 2006-11-28 17:43:03 UTC
I'm sorry but I cannot reproduce this problem here. It works fine on two
machines here with the same openssh version.

Looking at the source I don't see any obvious problem with setting the address
family either.

Can you provide ssh -vvv host log when it doesn't work as expected?


Comment 2 Matthew Booth 2006-11-28 19:08:01 UTC
I found an errant:

AddressFamily inet

further up in my .ssh/config. This is my error. It's now working as expected.