* [Bluez-devel] PAN and kernel 2.4.26
@ 2004-06-26 17:41 Bastian Ballmann
2004-06-27 19:20 ` Marcel Holtmann
0 siblings, 1 reply; 10+ messages in thread
From: Bastian Ballmann @ 2004-06-26 17:41 UTC (permalink / raw)
To: bluez-devel
[-- Attachment #1: Type: text/plain, Size: 618 bytes --]
Hello,
I've got a little problem using PAN with a kernel 2.4.26.
If I start pand I'll get the error:
pand[698]: Bluetooth PAN daemon
pand[698]: Failed to get L2CAP options. Invalid argument(22)
I tried the same using kernel 2.6.7. and it works, but I have
to use kernel 2.4, because of a wlan driver, which is not supported
for kernel 2.6.
I tried to l2ping the bluetooth adapter, that works and I can also
open a l2cap socket on that host, so l2cap works.
I've installed the newest bluez packages and also patched the kernel
using patch-2.4.26-mh1.gz. No effect.
Any suggestions?
Thx & Greets
Basti
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bluez-devel] PAN and kernel 2.4.26
2004-06-26 17:41 [Bluez-devel] PAN and kernel 2.4.26 Bastian Ballmann
@ 2004-06-27 19:20 ` Marcel Holtmann
2004-06-27 21:41 ` Bastian Ballmann
0 siblings, 1 reply; 10+ messages in thread
From: Marcel Holtmann @ 2004-06-27 19:20 UTC (permalink / raw)
To: Bastian Ballmann; +Cc: BlueZ Mailing List
Hi Bastian,
> I've got a little problem using PAN with a kernel 2.4.26.
> If I start pand I'll get the error:
> pand[698]: Bluetooth PAN daemon
> pand[698]: Failed to get L2CAP options. Invalid argument(22)
> I tried the same using kernel 2.6.7. and it works, but I have
> to use kernel 2.4, because of a wlan driver, which is not supported
> for kernel 2.6.
> I tried to l2ping the bluetooth adapter, that works and I can also
> open a l2cap socket on that host, so l2cap works.
> I've installed the newest bluez packages and also patched the kernel
> using patch-2.4.26-mh1.gz. No effect.
this should actually not fail. Do you had any 2.4 version working? What
bluez-utils version is installed?
Regards
Marcel
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bluez-devel] PAN and kernel 2.4.26
2004-06-27 19:20 ` Marcel Holtmann
@ 2004-06-27 21:41 ` Bastian Ballmann
2004-06-28 7:01 ` Marcel Holtmann
0 siblings, 1 reply; 10+ messages in thread
From: Bastian Ballmann @ 2004-06-27 21:41 UTC (permalink / raw)
To: bluez-devel
[-- Attachment #1: Type: text/plain, Size: 480 bytes --]
Hi Marcel,
On Sun, 2004-06-27 at 21:20, Marcel Holtmann wrote:
> this should actually not fail.
I've got a 2.4.26 on my laptop and PAN is working without any
problems, therefore it cannot be a problem with this kernel version, but
I wonder, that it's working togehter with 2.6.7.
I've absolutly no idea why this could fail on my 2.4.26er kernel...
> What bluez-utils version is installed?
It's bluez-utils-2.7. Same result using version 2.3.
Greets
Basti
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bluez-devel] PAN and kernel 2.4.26
2004-06-27 21:41 ` Bastian Ballmann
@ 2004-06-28 7:01 ` Marcel Holtmann
2004-06-28 9:12 ` Bastian Ballmann
0 siblings, 1 reply; 10+ messages in thread
From: Marcel Holtmann @ 2004-06-28 7:01 UTC (permalink / raw)
To: Bastian Ballmann; +Cc: BlueZ Mailing List
Hi Bastian,
> > this should actually not fail.
>
> I've got a 2.4.26 on my laptop and PAN is working without any
> problems, therefore it cannot be a problem with this kernel version, but
> I wonder, that it's working togehter with 2.6.7.
> I've absolutly no idea why this could fail on my 2.4.26er kernel...
so about what kernel version are we talking that fails? I am little bit
lost.
Regards
Marcel
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bluez-devel] PAN and kernel 2.4.26
2004-06-28 7:01 ` Marcel Holtmann
@ 2004-06-28 9:12 ` Bastian Ballmann
2004-06-28 9:19 ` Marcel Holtmann
0 siblings, 1 reply; 10+ messages in thread
From: Bastian Ballmann @ 2004-06-28 9:12 UTC (permalink / raw)
To: bluez-devel
[-- Attachment #1: Type: text/plain, Size: 386 bytes --]
Hi Marcel,
On Mon, 2004-06-28 at 09:01, Marcel Holtmann wrote:
> so about what kernel version are we talking that fails? I am little bit
> lost.
PAN on 2.4.26 fails with "Failed to get L2CAP options. Invalid argument(22)",
but it cannot be a problem with that kernel version, because I am
now using the same kernel version on my laptop and PAN is working.
Greets
Basti
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bluez-devel] PAN and kernel 2.4.26
2004-06-28 9:12 ` Bastian Ballmann
@ 2004-06-28 9:19 ` Marcel Holtmann
2004-06-28 10:27 ` Bastian Ballmann
0 siblings, 1 reply; 10+ messages in thread
From: Marcel Holtmann @ 2004-06-28 9:19 UTC (permalink / raw)
To: Bastian Ballmann; +Cc: BlueZ Mailing List
Hi Bastian,
> > so about what kernel version are we talking that fails? I am little bit
> > lost.
>
> PAN on 2.4.26 fails with "Failed to get L2CAP options. Invalid argument(22)",
> but it cannot be a problem with that kernel version, because I am
> now using the same kernel version on my laptop and PAN is working.
now I understand it. Is this a vanilla 2.4.26 from kernel.org?
Regards
Marcel
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bluez-devel] PAN and kernel 2.4.26
2004-06-28 9:19 ` Marcel Holtmann
@ 2004-06-28 10:27 ` Bastian Ballmann
2004-06-28 10:36 ` Marcel Holtmann
0 siblings, 1 reply; 10+ messages in thread
From: Bastian Ballmann @ 2004-06-28 10:27 UTC (permalink / raw)
To: bluez-devel
[-- Attachment #1: Type: text/plain, Size: 191 bytes --]
Hi Marcel,
On Mon, 2004-06-28 at 11:19, Marcel Holtmann wrote:
> Is this a vanilla 2.4.26 from kernel.org?
Yes it is. Including the security patch from openwall.com.
Greets
Basti
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bluez-devel] PAN and kernel 2.4.26
2004-06-28 10:27 ` Bastian Ballmann
@ 2004-06-28 10:36 ` Marcel Holtmann
[not found] ` <1088423529.2513.15.camel@espy.crazydj.de>
0 siblings, 1 reply; 10+ messages in thread
From: Marcel Holtmann @ 2004-06-28 10:36 UTC (permalink / raw)
To: Bastian Ballmann; +Cc: BlueZ Mailing List
Hi Bastian,
> > Is this a vanilla 2.4.26 from kernel.org?
>
> Yes it is. Including the security patch from openwall.com.
remove the security patch and try again.
Regards
Marcel
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bluez-devel] PAN and kernel 2.4.26
[not found] ` <1088423529.2513.15.camel@espy.crazydj.de>
@ 2004-06-28 12:58 ` Marcel Holtmann
2004-06-28 13:23 ` Bastian Ballmann
0 siblings, 1 reply; 10+ messages in thread
From: Marcel Holtmann @ 2004-06-28 12:58 UTC (permalink / raw)
To: Bastian Ballmann; +Cc: BlueZ Mailing List
Hi Bastian,
> > remove the security patch and try again.
>
> Same effect.
I don't think so, because I looked at the patch and this seems to
introducing the problem:
diff -urPX nopatch linux-2.4.26/net/socket.c linux/net/socket.c
--- linux-2.4.26/net/socket.c Fri Feb 20 10:07:45 2004
+++ linux/net/socket.c Sat Apr 17 02:13:55 2004
@@ -1307,10 +1307,18 @@
asmlinkage long sys_getsockopt(int fd, int level, int optname, char *optval, int *optlen)
{
int err;
+ int len;
struct socket *sock;
if ((sock = sockfd_lookup(fd, &err))!=NULL)
{
+ /* XXX: insufficient for SMP, but should be redundant anyway */
+ if (get_user(len, optlen))
+ err = -EFAULT;
+ else
+ if (len < 0)
+ err = -EINVAL;
+ else
if (level == SOL_SOCKET)
err=sock_getsockopt(sock,level,optname,optval,optlen);
else
And here is the fix for pand to also work with the patch:
diff -u -r1.4 main.c
--- main.c 31 May 2004 22:21:42 -0000 1.4
+++ main.c 28 Jun 2004 10:56:35 -0000
@@ -136,6 +136,7 @@
}
/* Setup L2CAP options according to BNEP spec */
+ olen = sizeof(l2o);
if (getsockopt(sk, SOL_L2CAP, L2CAP_OPTIONS, &l2o, &olen) < 0) {
syslog(LOG_ERR, "Failed to get L2CAP options. %s(%d)",
strerror(errno), errno);
@@ -257,6 +258,7 @@
}
/* Setup L2CAP options according to BNEP spec */
+ olen = sizeof(l2o);
getsockopt(sk, SOL_L2CAP, L2CAP_OPTIONS, &l2o, &olen);
l2o.imtu = l2o.omtu = BNEP_MTU;
setsockopt(sk, SOL_L2CAP, L2CAP_OPTIONS, &l2o, sizeof(l2o));
I committed this one already to CVS, because it is an obvious fix.
Regards
Marcel
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bluez-devel] PAN and kernel 2.4.26
2004-06-28 12:58 ` Marcel Holtmann
@ 2004-06-28 13:23 ` Bastian Ballmann
0 siblings, 0 replies; 10+ messages in thread
From: Bastian Ballmann @ 2004-06-28 13:23 UTC (permalink / raw)
To: bluez-devel
[-- Attachment #1: Type: text/plain, Size: 409 bytes --]
Hi Marcel,
On Mon, 2004-06-28 at 14:58, Marcel Holtmann wrote:
> I don't think so, because I looked at the patch and this seems to
> introducing the problem:
I thought it would be enough to disable all patches in my .config
and recompile the kernel, but that seems to be wrong...
> And here is the fix for pand to also work with the patch:
Yes, that works. Thanks a lot! :P
Greets
Basti
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-06-28 13:23 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-26 17:41 [Bluez-devel] PAN and kernel 2.4.26 Bastian Ballmann
2004-06-27 19:20 ` Marcel Holtmann
2004-06-27 21:41 ` Bastian Ballmann
2004-06-28 7:01 ` Marcel Holtmann
2004-06-28 9:12 ` Bastian Ballmann
2004-06-28 9:19 ` Marcel Holtmann
2004-06-28 10:27 ` Bastian Ballmann
2004-06-28 10:36 ` Marcel Holtmann
[not found] ` <1088423529.2513.15.camel@espy.crazydj.de>
2004-06-28 12:58 ` Marcel Holtmann
2004-06-28 13:23 ` Bastian Ballmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox