View | Details | Raw Unified | Return to bug 19390
Collapse All | Expand All

(-)ftpd.c Fri Jun 16 21:04:27 2000 (-2 / +5 lines)
Lines 772-777 Link Here
772
selecthost(su) 
772
selecthost(su) 
773
       union sockunion *su;
773
       union sockunion *su;
774
{
774
{
775
        int find=0;
775
       struct ftphost  *hrp; 
776
       struct ftphost  *hrp; 
776
       u_int16_t port;
777
       u_int16_t port;
777
#ifdef INET6
778
#ifdef INET6
Lines 792-802 Link Here
792
       hrp = thishost = firsthost;     /* default */ 
793
       hrp = thishost = firsthost;     /* default */ 
793
       port = su->su_port;
794
       port = su->su_port;
794
       su->su_port = 0;
795
       su->su_port = 0;
795
       while (hrp != NULL) {
796
       while (hrp != NULL && !find) {
796
               for (hi = hrp->hostinfo; hi != NULL; hi = hi->ai_next)
797
               for (hi = hrp->hostinfo; hi != NULL; hi = hi->ai_next)
797
             {
798
             {
798
               if (memcmp(su, hi->ai_addr, hi->ai_addrlen) == 0) {
799
               if (memcmp(&su->su_sin, hi->ai_addr, hi->ai_addrlen) == 0) {
799
                       thishost = hrp;
800
                       thishost = hrp;
801
                       find=1;
800
                       break;
802
                       break;
801
               }
803
               }
802
#ifdef INET6
804
#ifdef INET6
Lines 806-811 Link Here
806
                           &((struct sockaddr_in *)hi->ai_addr)->sin_addr,
808
                           &((struct sockaddr_in *)hi->ai_addr)->sin_addr,
807
                           sizeof(struct in_addr)) == 0)) {
809
                           sizeof(struct in_addr)) == 0)) {
808
                       thishost = hrp; 
810
                       thishost = hrp; 
811
                       find=1;
809
                       break;
812
                       break;
810
               }
813
               }
811
#endif
814
#endif

Return to bug 19390