NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PR/44390 CVS commit: src/libexec/ftpd



Um... oops...

I sent the wrong diff.  I thought it built in my test build but I must have 
overlooked something.  Need "a->" instead of "a.".  Attached is better.

        paul

Index: libexec/ftpd/ftpcmd.y
===================================================================
--- libexec/ftpd/ftpcmd.y       (revision 151799)
+++ libexec/ftpd/ftpcmd.y       (working copy)
@@ -966,18 +966,31 @@
                NUMBER
                {
 #ifdef INET6
-                       char *a, *p;
-
+                       char *p;
+                       struct in6_addr *a;
+            
                        memset(&data_dest, 0, sizeof(data_dest));
                        data_dest.su_len = sizeof(struct sockaddr_in6);
                        data_dest.su_family = AF_INET6;
                        p = (char *)&data_dest.su_port;
                        p[0] = $39.i; p[1] = $41.i;
-                       a = (char *)&data_dest.si_su.su_sin6.sin6_addr;
-                       a[0] = $5.i; a[1] = $7.i; a[2] = $9.i; a[3] = $11.i;
-                       a[4] = $13.i; a[5] = $15.i; a[6] = $17.i; a[7] = $19.i;
-                       a[8] = $21.i; a[9] = $23.i; a[10] = $25.i; a[11] = 
$27.i;
-                       a[12] = $29.i; a[13] = $31.i; a[14] = $33.i; a[15] = 
$35.i;
+                       a = &data_dest.si_su.su_sin6.sin6_addr;
+                       a->s6_addr[0] = $5.i;
+                       a->s6_addr[1] = $7.i; 
+                       a->s6_addr[2] = $9.i;
+                       a->s6_addr[3] = $11.i;
+                       a->s6_addr[4] = $13.i;
+                       a->s6_addr[5] = $15.i;
+                       a->s6_addr[6] = $17.i;
+                       a->s6_addr[7] = $19.i;
+                       a->s6_addr[8] = $21.i;
+                       a->s6_addr[9] = $23.i;
+                       a->s6_addr[10] = $25.i; 
+                       a->s6_addr[11] = $27.i;
+                       a->s6_addr[12] = $29.i;
+                       a->s6_addr[13] = $31.i;
+                       a->s6_addr[14] = $33.i;
+                       a->s6_addr[15] = $35.i;
                        if (his_addr.su_family == AF_INET6) {
                                /* XXX: more sanity checks! */
                                data_dest.su_scope_id = his_addr.su_scope_id;



Home | Main Index | Thread Index | Old Index