All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v1] gatchat: Print error message if opening tun failes
@ 2012-08-24 12:16 Daniel Wagner
  2012-08-30 22:07 ` Denis Kenzior
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Wagner @ 2012-08-24 12:16 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

From: Daniel Wagner <daniel.wagner@bmw-carit.de>

This is a very common misstake. Let's help the users to
configure their system correctly.
---
Hi,

I was not able to find out why the check in at_grps_context_prope() does not
hit when the tun module is not loaded. Therefore, this on gets only
an RFC state...

cheers,
daniel

 gatchat/ppp_net.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gatchat/ppp_net.c b/gatchat/ppp_net.c
index 1609b99..813ed9b 100644
--- a/gatchat/ppp_net.c
+++ b/gatchat/ppp_net.c
@@ -155,8 +155,12 @@ struct ppp_net *ppp_net_new(GAtPPP *ppp, int fd)
 	if (fd < 0) {
 		/* open a tun interface */
 		fd = open("/dev/net/tun", O_RDWR);
-		if (fd < 0)
+		if (fd < 0) {
+			ppp_debug(ppp, "Couldn't open tun device. "
+					"Do you run oFono as root and do you "
+					"have the TUN module loaded?");
 			goto error;
+		}
 
 		ifr.ifr_flags = IFF_TUN | IFF_NO_PI;
 		strcpy(ifr.ifr_name, "ppp%d");
-- 
1.7.12.rc1.16.g05a20c8


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-09 19:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-24 12:16 [RFC v1] gatchat: Print error message if opening tun failes Daniel Wagner
2012-08-30 22:07 ` Denis Kenzior
2012-09-09 19:41   ` Daniel Wagner

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.