Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-21 Thread Cong Wang
On Mon, Nov 21, 2016 at 8:30 PM, YUAN Linyu wrote: > I think there are newbie include me still use ifconfig utility. > So when I check this code, it can be optimized. > Working on Linux kernel is always welcome. But I don't think this can convince DaveM to take

RE: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-21 Thread YUAN Linyu
M > To: YUAN Linyu > Cc: David Miller; cug...@163.com; netdev@vger.kernel.org > Subject: Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup > > On Tue, Nov 15, 2016 at 7:57 PM, YUAN Linyu > <linyu.y...@alcatel-sbell.com.cn> wrote: > > No, this patch will not change dev

Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-21 Thread Cong Wang
On Tue, Nov 15, 2016 at 7:57 PM, YUAN Linyu wrote: > No, this patch will not change dev->name, > It's care about ifa->ifa_label. >> - if (colon) >> - memcpy(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ); >> -

RE: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-15 Thread YUAN Linyu
(ifa->ifa_label, ifr.ifr_name, IFNAMSIZ); > -Original Message- > From: David Miller [mailto:da...@davemloft.net] > Sent: Wednesday, November 16, 2016 11:31 AM > To: YUAN Linyu > Cc: cug...@163.com; netdev@vger.kernel.org > Subject: Re: [PATCH] net: ioctl SIOCSIF

Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-15 Thread David Miller
From: YUAN Linyu Date: Wed, 16 Nov 2016 03:13:31 + > So assign label to request name will do same thing as original code. Nope. dev->name does not have the colon, it was trimmed from the string for the device lookup. So the found device's dev->name does

Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-15 Thread David Miller
From: YUAN Linyu Date: Wed, 16 Nov 2016 03:13:31 + > orginal code means when reqest name have colon, then label name will have > colon. And that is intentional.

RE: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-15 Thread YUAN Linyu
hi david, > -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of David Miller > Sent: Wednesday, November 16, 2016 11:01 AM > To: cug...@163.com > Cc: netdev@vger.kernel.org; YUAN Linyu > Subject: Re: [PATCH] n

Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-15 Thread David Miller
From: yuan linyu Date: Tue, 15 Nov 2016 20:44:59 +0800 > @@ -1063,10 +1063,7 @@ int devinet_ioctl(struct net *net, unsigned int cmd, > void __user *arg) > if (!ifa) > break; > INIT_HLIST_NODE(>hash); > -

[PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-15 Thread yuan linyu
From: yuan linyu 1. set interface address label to ioctl request device name is enough 2. when address pass inet_abc_len check, prefixlen < 31 is always true Signed-off-by: yuan linyu --- net/ipv4/devinet.c | 8 ++-- 1 file

Re: [PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-13 Thread David Miller
Your patch was mangled by your email client, chopping up long lines and turning TAB characters into spaces. Please fix this, email a test patch to yourself, and do not resubmit your change until you can successfully apply the patch you receive in a test email. Also, do not try using attachments

[PATCH] net: ioctl SIOCSIFADDR minor cleanup

2016-11-11 Thread yuan linyu
From: yuan linyu 1. set interface address label to ioctl request device name is enough 2. when address pass inet_abc_len check, prefixlen less than 31 is always true Signed-off-by: yuan linyu ---  net/ipv4/devinet.c | 8 ++--