Bug 1491 - no field sin6_scope_id on AIX 4.3.3
Summary: no field sin6_scope_id on AIX 4.3.3
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 5.1p1
Hardware: PPC AIX
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-24 22:05 AEST by David Leonard
Modified: 2009-02-23 13:35 AEDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Leonard 2008-07-24 22:05:42 AEST
On AIX 4.3.3, there is no sin6_scope_id field in struct sockaddr_in6. 

Here is my hideous workaround.

--- openssh/addrmatch.c
+++ openssh/addrmatch.c
@@ -97,7 +97,11 @@
 			return -1;
 		xa->af = AF_INET6;
 		memcpy(&xa->v6, &in6->sin6_addr, sizeof(xa->v6));
+#ifdef _AIX
+		xa->scope_id = 0;
+#else
 		xa->scope_id = in6->sin6_scope_id;
+#endif
 		break;
 	default:
 		return -1;

And, yes, I am painfully aware that AIX 4.3.3 is hideously out of date :(

(see also bug 401)
Comment 1 Tim Rice 2008-11-19 16:32:56 AEDT
This affects more thatn AIX. I've commited a fix that works on my platforms and should work for your old AIX.
Please test the next snapshot and re-open this bug if it does not work
for you.
Comment 2 Damien Miller 2009-02-23 13:35:52 AEDT
Close bugs fixed/reviewed for openssh-5.2 release