network - NAP (pan1) bridge is not initialized (patch)
The subject says it all. Don't know whether it was by design, but NAP connections simply did not work.
Patch attached.
bridge.c renamed from bridge.c.orig +4 -6
@@ -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 )
server.c renamed from server.c.orig +6 -0
@@ -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 ;
-------------------------------------------------------------------------
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
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Luiz Augusto von Dentz
maintainerSorry but NAP is not as simple as GN, thats why the NAP bridge is not being created by network service.
NAP server can really be consider a bluetooth router so we probably need something more advanced than
creating a normal bridge. Perhaps we can use a daemon that can handle this 'router' functionality, but Im
afraid it still doesn't exists.
I still need to check what is going on in case of GN server, but I guess the debug normally helps so I will
probably make them available in cvs.
-- =
Luiz Augusto von Dentz
Engenheiro de Computa=E7=E3o
-------------------------------------------------------------------------
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/java=
one
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
I generate an ifup script with my application, and when pan1 comes up, it automatically configures it, adds masquerading to iptables and runs dhcp daemon (I've implemented locks, so only one dhcpd instance is launched, and single iptables entry is added). And this setup runs perfectly for me.
In my opinion this patch is better than nothing, until a proper solution is developed.
Regards
Quoted 21 lines · Luiz Augusto von Dentz
Sorry but NAP is not as simple as GN, thats why the NAP bridge is not being created by network service.
NAP server can really be consider a bluetooth router so we probably need something more advanced than
creating a normal bridge. Perhaps we can use a daemon that can handle this 'router' functionality, but Im
afraid it still doesn't exists.I still need to check what is going on in case of GN server, but I guess the debug normally helps so I will
probably make them available in cvs.--
Luiz Augusto von Dentz
Engenheiro de Computação-------------------------------------------------------------------------
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.
Quoted 6 lines
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
-------------------------------------------------------------------------
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
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel