SO_BINDTODEVICE mismatch with man page & comments.

2007-09-04 Thread Ben Greear
According to the comment in the net/core/sock.c code (in 2.6.20), I should be able to pass a zero optlen to the setsockopt method for SO_BINDTODEVICE: case SO_BINDTODEVICE: { char devname[IFNAMSIZ]; /* Sorry... */

Re: SO_BINDTODEVICE mismatch with man page & comments.

2007-09-12 Thread David Miller
From: Ben Greear <[EMAIL PROTECTED]> Date: Tue, 04 Sep 2007 15:45:14 -0700 > According to the comment in the net/core/sock.c code (in 2.6.20), I should be > able to pass a zero > optlen to the setsockopt method for SO_BINDTODEVICE: ... > > However, earlier in that method it returns -EINVAL if o

Re: SO_BINDTODEVICE mismatch with man page & comments.

2007-09-14 Thread David Miller
From: Ben Greear <[EMAIL PROTECTED]> Date: Tue, 04 Sep 2007 15:45:14 -0700 > According to the comment in the net/core/sock.c code (in 2.6.20), I should be > able to pass a zero > optlen to the setsockopt method for SO_BINDTODEVICE: ... > However, earlier in that method it returns -EINVAL if optl

Re: SO_BINDTODEVICE mismatch with man page & comments.

2007-09-14 Thread Ben Greear
David Miller wrote: From: Ben Greear <[EMAIL PROTECTED]> Date: Tue, 04 Sep 2007 15:45:14 -0700 According to the comment in the net/core/sock.c code (in 2.6.20), I should be able to pass a zero optlen to the setsockopt method for SO_BINDTODEVICE: ... However, earlier in that method it return

Re: SO_BINDTODEVICE mismatch with man page & comments.

2007-09-14 Thread David Miller
From: Ben Greear <[EMAIL PROTECTED]> Date: Fri, 14 Sep 2007 15:11:39 -0700 > From user-space, does this imply that the 'empty string' we use to > unbind must be at least 4 bytes long, but with the first byte /0? > > If so, I think it might be confusing for the comments to say use "" > to unbind,

Re: SO_BINDTODEVICE mismatch with man page & comments.

2007-09-14 Thread Ben Greear
David Miller wrote: Instead of nit-picking, can you instead try the patch and let me know if it makes things work for you? I don't mean to complain, just trying to make sure that you had thought about the length and were happy with how it works before I try to get the man page changed. I will

Re: SO_BINDTODEVICE mismatch with man page & comments.

2007-09-14 Thread David Miller
From: Ben Greear <[EMAIL PROTECTED]> Date: Fri, 14 Sep 2007 15:37:45 -0700 > I will try the patch, but it will probably not be until Monday. > The existing code actually can be made to work by passing in > a 4+ byte string and setting the first byte to zero, and as > far as I can see, that remains

Re: SO_BINDTODEVICE mismatch with man page & comments.

2007-09-14 Thread Ben Greear
David Miller wrote: From: Ben Greear <[EMAIL PROTECTED]> Date: Fri, 14 Sep 2007 15:37:45 -0700 I will try the patch, but it will probably not be until Monday. The existing code actually can be made to work by passing in a 4+ byte string and setting the first byte to zero, and as far as I can se