public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Valmantas <walmis@gmail.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] network - NAP (pan1) bridge is not initialized (patch)
Date: Mon, 05 May 2008 23:42:10 +0300	[thread overview]
Message-ID: <1210020130.10069.5.camel@ubuntu> (raw)

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

The subject says it all. Don't know whether it was by design, but NAP
connections simply did not work.

Patch attached.

[-- Attachment #2: nap_bridge_fix.patch --]
[-- Type: text/x-patch, Size: 1454 bytes --]

--- network/bridge.c.orig	2008-05-05 14:37:28.000000000 +0300
+++ network/bridge.c	2008-05-05 14:31:39.000000000 +0300
@@ -53,7 +53,7 @@
 	if (stat("/sys/module/bridge", &st) < 0)
 		return -EOPNOTSUPP;
 #endif
-
+	info("bridge init");
 	bridge_socket = socket(AF_INET, SOCK_STREAM, 0);
 	if (bridge_socket < 0)
 		return -errno;
@@ -74,7 +74,7 @@
 {
 	int err;
 	const char *name = bridge_get_name(id);
-
+	info("bridge create %s", name);
 	err = ioctl(bridge_socket, SIOCBRADDBR, name);
 	if (err < 0)
 		return -errno;
@@ -86,7 +86,7 @@
 {
 	int err;
 	const char *name = bridge_get_name(id);
-
+	info("remove from bridge");
 	err = bnep_if_down(name);
 	if (err < 0)
 		return err;
@@ -118,9 +118,7 @@
 	if (err < 0)
 		return err;
 
-	/* Only run scripts in GN bridges */
-	if (id != BNEP_SVC_GN)
-		return 0;
+	info("bridge_add_interface %s", dev);
 
 	err = bnep_if_up(name, id);
 	if (err < 0)
--- network/server.c.orig	2008-05-05 14:37:17.000000000 +0300
+++ network/server.c	2008-05-03 11:57:39.000000000 +0300
@@ -665,6 +665,9 @@
 
 	if (bridge_create(BNEP_SVC_GN) < 0)
 		error("Can't create GN bridge");
+		
+	if (bridge_create(BNEP_SVC_NAP) < 0)
+		error("Can't create NAP bridge");
 
 	return 0;
 fail:
@@ -690,6 +693,9 @@
 
 	if (bridge_remove(BNEP_SVC_GN) < 0)
 		error("Can't remove GN bridge");
+		
+	if (bridge_remove(BNEP_SVC_NAP) < 0)
+		error("Can't remove NAP bridge");
 
 	dbus_connection_unref(connection);
 	connection = NULL;

[-- Attachment #3: Type: text/plain, Size: 320 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

             reply	other threads:[~2008-05-05 20:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05 20:42 Valmantas [this message]
2008-05-05 21:40 ` [Bluez-devel] network - NAP (pan1) bridge is not initialized (patch) Luiz Augusto von Dentz
2008-05-06  8:58   ` walmis

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=1210020130.10069.5.camel@ubuntu \
    --to=walmis@gmail.com \
    --cc=bluez-devel@lists.sourceforge.net \
    /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