[BACK]Return to nfs_socket.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / nfs

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/nfs/nfs_socket.c between version 1.56 and 1.57

version 1.56, 2000/05/27 04:52:41 version 1.57, 2000/06/09 00:00:17
Line 44 
Line 44 
   
 #include "fs_nfs.h"  #include "fs_nfs.h"
 #include "opt_nfsserver.h"  #include "opt_nfsserver.h"
   #include "opt_inet.h"
   
 #include <sys/param.h>  #include <sys/param.h>
 #include <sys/systm.h>  #include <sys/systm.h>
Line 158  nfs_connect(nmp, rep)
Line 159  nfs_connect(nmp, rep)
         int s, error, rcvreserve, sndreserve;          int s, error, rcvreserve, sndreserve;
         struct sockaddr *saddr;          struct sockaddr *saddr;
         struct sockaddr_in *sin;          struct sockaddr_in *sin;
   #ifdef INET6
           struct sockaddr_in6 *sin6;
   #endif
         struct mbuf *m;          struct mbuf *m;
         u_int16_t tport;          u_int16_t tport;
   
Line 188  nfs_connect(nmp, rep)
Line 192  nfs_connect(nmp, rep)
                 if (error)                  if (error)
                         goto bad;                          goto bad;
         }          }
   #ifdef INET6
           if (saddr->sa_family == AF_INET6 && (nmp->nm_flag & NFSMNT_RESVPORT)) {
                   MGET(m, M_WAIT, MT_SONAME);
                   sin6 = mtod(m, struct sockaddr_in6 *);
                   sin6->sin6_len = m->m_len = sizeof (struct sockaddr_in6);
                   sin6->sin6_family = AF_INET6;
                   sin6->sin6_addr = in6addr_any;
                   tport = IPV6PORT_RESERVED - 1;
                   sin6->sin6_port = htons(tport);
                   while ((error = sobind(so, m)) == EADDRINUSE &&
                          --tport > IPV6PORT_RESERVED / 2)
                           sin6->sin6_port = htons(tport);
                   m_freem(m);
                   if (error)
                           goto bad;
           }
   #endif
   
         /*          /*
          * Protocols that do not require connections may be optionally left           * Protocols that do not require connections may be optionally left

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

CVSweb <webmaster@jp.NetBSD.org>