From: Jim <jim876@xs4all.nl>
To: netdev@vger.kernel.org
Cc: nolan@cumulusnetworks.com
Subject: tap0 device stopped working in 2.6.36 (ok in 2.6.35)
Date: Sat, 23 Oct 2010 14:55:08 +0200 [thread overview]
Message-ID: <4CC2DB2C.3060908@xs4all.nl> (raw)
My tap0 device stopped working with 2.6.36, seems it couldn't
send any packets anymore (receiving was still fine).
After some checking noticed that apparently link isn't ready:
modprobe tun
tunctl -b
ifconfig tap0 192.168.20.1 up
Gives:
[ 26.411932] ADDRCONF(NETDEV_UP): tap0: link is not ready
Bisected it all the way to this commit:
=================
# git bisect good
bee31369ce16fc3898ec9a54161248c9eddb06bc is the first bad commit
commit bee31369ce16fc3898ec9a54161248c9eddb06bc
Author: Nolan Leake <nolan@cumulusnetworks.com>
Date: Tue Jul 27 13:53:43 2010 +0000
tun: keep link (carrier) state up to date
Currently, only ethtool can get accurate link state of a tap device.
With this patch, IFF_RUNNING and IF_OPER_UP/DOWN are kept up to date as
well.
Signed-off-by: Nolan Leake <nolan@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
:040000 040000 6f2464fe2c604079908afc677522bd396b40db9a
0d144f138fe93ffbe3da7ce31951855c60b51510 M drivers
===================
Apply-ing this patch on top of vanilla 2.6.36 makes the tap device
working again for me (strangely in the function __tun_detach):
--- tun.c.ORIG 2010-10-21 18:08:12.404276662 +0200
+++ tun.c 2010-10-23 14:22:58.056366365 +0200
@@ -163,7 +163,7 @@
{
/* Detach from net device */
netif_tx_lock_bh(tun->dev);
- netif_carrier_off(tun->dev);
+// netif_carrier_off(tun->dev);
tun->tfile = NULL;
tun->socket.file = NULL;
netif_tx_unlock_bh(tun->dev);
====
Strangely that's in the function __tun_detach, it appears the functions
do the opposite of what is expected, when deleting the the tap0 device
it becomes ready!?
# tunctl -d tap0
Set 'tap0' nonpersistent
[ 1000.945790] ADDRCONF(NETDEV_CHANGE): tap0: link becomes ready
So to me it seems the netif_carrier_on / netif_carrier_off from the
commit should be reversed ??
_
Jim
next reply other threads:[~2010-10-23 12:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-23 12:55 Jim [this message]
2010-10-23 19:39 ` tap0 device stopped working in 2.6.36 (ok in 2.6.35) Nolan Leake
2010-10-24 9:59 ` Jim
2010-10-27 1:18 ` Nolan Leake
2010-10-27 16:09 ` Jim
2010-10-27 17:48 ` Nolan Leake
2010-10-27 17:52 ` David Miller
2010-11-03 23:10 ` Nolan Leake
2010-11-04 20:17 ` Jim
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=4CC2DB2C.3060908@xs4all.nl \
--to=jim876@xs4all.nl \
--cc=netdev@vger.kernel.org \
--cc=nolan@cumulusnetworks.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.