From: Maksim Krasnyanskiy <maxk@qualcomm.com>
To: <pcg@goof.com ( Marc A. Lehmann )>, "David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.13-ac5 && vtun not working
Date: Wed, 31 Oct 2001 09:55:47 -0800 [thread overview]
Message-ID: <5.1.0.14.0.20011031095211.0dbc23f0@mail1> (raw)
In-Reply-To: <20011031104323.A2263@schmorp.de>
In-Reply-To: <20011031.003056.63128206.davem@redhat.com> <5.1.0.14.0.20011029174700.08e93090@mail1> <20011029.175312.26299226.davem@redhat.com> <20011031010500.B383@schmorp.de> <20011031.003056.63128206.davem@redhat.com>
At 10:43 AM 10/31/01 +0100, pcg@goof.com ( Marc) (A.) (Lehmann ) wrote:
>On Wed, Oct 31, 2001 at 12:30:56AM -0800, "David S. Miller" <davem@redhat.com> wrote:
>> You're right, it should allow the "string has no '%' at all" case
>> as well. Please, someone send me a patch which does this.
>
>My original mail contained a one-line fix, suboptimal but works fine for me.
>I also found a more elaborate patch:
>
> http://www.geocrawler.com/lists/3/SourceForge/12162/0/6896612/
>
>it seems to use a fancier algorithm and has been used by more people.
Here is the patch for TUN/TAP to remove that suboptimality :).
So we won't call dev_alloc_name if name is not a template.
--- tun.c.old Tue Oct 30 21:00:55 2001
+++ tun.c Tue Oct 30 21:10:17 2001
@@ -377,8 +377,11 @@
if (*ifr->ifr_name)
name = ifr->ifr_name;
- if ((err = dev_alloc_name(&tun->dev, name)) < 0)
- goto failed;
+ if (strchr(name, '%')) {
+ err = dev_alloc_name(&tun->dev, name);
+ if (err) goto failed;
+ }
+
if ((err = register_netdevice(&tun->dev)))
goto failed;
Untested but looks obvious.
Max
next prev parent reply other threads:[~2001-10-31 17:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-30 1:17 Lehmann
2001-10-30 1:39 ` Lehmann
2001-10-30 1:53 ` David S. Miller
2001-10-31 0:05 ` Lehmann
2001-10-31 17:55 ` Maksim Krasnyanskiy [this message]
2001-10-31 8:30 ` David S. Miller
2001-10-31 9:43 ` Lehmann
2001-11-06 23:32 ` David S. Miller
2001-11-06 23:53 ` Maksim Krasnyanskiy
2001-10-30 1:48 ` Maksim Krasnyanskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.1.0.14.0.20011031095211.0dbc23f0@mail1 \
--to=maxk@qualcomm.com \
--cc=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pcg@goof.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®