[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0909230806040.23721@lnxos.staff.proxad.net>
Date: Wed, 23 Sep 2009 08:07:33 +0200 (CEST)
From: Alexandre Cassen <acassen@...ebox.fr>
To: Eric Dumazet <eric.dumazet@...il.com>
cc: netdev@...r.kernel.org
Subject: Re: [PATCH][RESEND 3] IPv6: 6rd tunnel mode
On Wed, 23 Sep 2009, Eric Dumazet wrote:
>> +#ifdef CONFIG_IPV6_SIT_6RD
>> + case SIOCGET6RD:
>> + err = -EINVAL;
>> + if (dev == sitn->fb_tunnel_dev)
>> + goto done;
>> + err = -ENOENT;
>> + if (!(t = netdev_priv(dev)))
>> + goto done;
>
>> + memcpy(&ip6rd, &t->ip6rd_prefix, sizeof(ip6rd));
>
> Just wondering why you need a temporary ip6rd here,
> why dont you copy_to_user(ifr->ifr_ifru.ifru_data, &t->ip6rd_prefix, sizeof(ip6rd)); ?
>
>> + if (copy_to_user(ifr->ifr_ifru.ifru_data, &ip6rd, sizeof(ip6rd)))
>> + err = -EFAULT;
>> + else
>> + err = 0;
>> + break;
agreed. will fix.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists