patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / net / wanrouter / af_wanpipe.c
index d4d13d4..4776ec1 100644 (file)
@@ -552,7 +552,7 @@ static int wanpipe_sendmsg(struct kiocb *iocb, struct socket *sock,
        if (sk->sk_state != WANSOCK_CONNECTED)
                return -ENOTCONN;       
 
-       if (msg->msg_flags&~MSG_DONTWAIT
+       if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)
                return(-EINVAL);
 
        /* it was <=, now one can send
@@ -1765,7 +1765,7 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar
        switch(cmd) 
        {
                case SIOCGSTAMP:
-                       return sock_get_timestamp(sk, (struct timeval *)arg);
+                       return sock_get_timestamp(sk, (struct timeval __user *)arg);
 
                case SIOC_WANPIPE_CHECK_TX:
 
@@ -1832,7 +1832,7 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar
 #endif
 
                default:
-                       return dev_ioctl(cmd,(void *) arg);
+                       return dev_ioctl(cmd,(void __user *) arg);
        }
        /*NOTREACHED*/
 }