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

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

Diff for /src/sys/netinet/raw_ip.c between version 1.146 and 1.146.2.1

version 1.146, 2014/11/10 18:52:51 version 1.146.2.1, 2015/04/06 15:18:23
Line 557  rip_accept(struct socket *so, struct mbu
Line 557  rip_accept(struct socket *so, struct mbu
 }  }
   
 static int  static int
 rip_bind(struct socket *so, struct mbuf *nam, struct lwp *l)  rip_bind(struct socket *so, struct sockaddr *nam, struct lwp *l)
 {  {
         struct inpcb *inp = sotoinpcb(so);          struct inpcb *inp = sotoinpcb(so);
         struct sockaddr_in *addr;          struct sockaddr_in *addr = (struct sockaddr_in *)nam;
         int error = 0;          int error = 0;
         int s;          int s;
   
Line 568  rip_bind(struct socket *so, struct mbuf 
Line 568  rip_bind(struct socket *so, struct mbuf 
         KASSERT(inp != NULL);          KASSERT(inp != NULL);
         KASSERT(nam != NULL);          KASSERT(nam != NULL);
   
           if (addr->sin_len != sizeof(*addr))
                   return EINVAL;
   
         s = splsoftnet();          s = splsoftnet();
         addr = mtod(nam, struct sockaddr_in *);  
         if (nam->m_len != sizeof(*addr)) {  
                 error = EINVAL;  
                 goto release;  
         }  
         if (IFNET_EMPTY()) {          if (IFNET_EMPTY()) {
                 error = EADDRNOTAVAIL;                  error = EADDRNOTAVAIL;
                 goto release;                  goto release;

Legend:
Removed from v.1.146  
changed lines
  Added in v.1.146.2.1

CVSweb <webmaster@jp.NetBSD.org>