| To: | Stephen Hemminger <shemminger@xxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 2.6.X] SIOCSIFNAME wilcard suppor & name validation |
| From: | Jean Tourrilhes <jt@xxxxxxxxxxxxxxxxxx> |
| Date: | Wed, 14 Jan 2004 16:17:12 -0800 |
| Address: | HP Labs, 1U-17, 1501 Page Mill road, Palo Alto, CA 94304, USA. |
| Cc: | "David S. Miller" <davem@xxxxxxxxxx>, jgarzik@xxxxxxxxx, netdev@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx |
| E-mail: | jt@xxxxxxxxxx |
| In-reply-to: | <20040114161324.61b7198f.shemminger@xxxxxxxx> |
| Organisation: | HP Labs Palo Alto |
| References: | <20040112234332.GA1785@xxxxxxxxxxxxxxxxxx> <20040113142204.0b41403b.shemminger@xxxxxxxx> <20040113162112.509edb71.davem@xxxxxxxxxx> <20040114161324.61b7198f.shemminger@xxxxxxxx> |
| Reply-to: | jt@xxxxxxxxxx |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.3.28i |
On Wed, Jan 14, 2004 at 04:13:24PM -0800, Stephen Hemminger wrote:
> Bug: dev_alloc_name returns the number of the slot used, so comparison needs
> to be < 0.
>
> diff -Nru a/net/core/dev.c b/net/core/dev.c
> --- a/net/core/dev.c Wed Jan 14 16:09:02 2004
> +++ b/net/core/dev.c Wed Jan 14 16:09:02 2004
> @@ -718,7 +718,7 @@
>
> if (strchr(newname, '%')) {
> int err = dev_alloc_name(dev, newname);
> - if (err)
> + if (err < 0)
> return err;
> strcpy(newname, dev->name);
> }
Doh ! I feel stupid.
Jean
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 2.6.X] SIOCSIFNAME wilcard suppor & name validation, Stephen Hemminger |
|---|---|
| Next by Date: | [PATCH] IPv6 MIB:ipv6inetNetToMediaTable, Shirley Ma |
| Previous by Thread: | Re: [PATCH 2.6.X] SIOCSIFNAME wilcard suppor & name validation, Stephen Hemminger |
| Next by Thread: | Re: [PATCH 2.6.X] SIOCSIFNAME wilcard suppor & name validation, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |