Found the cause of the problem. Had not enabled
CONFIG_ANDROID_PARANOID_NETWORK in the defconfig file. This was
causing the capability check to fail.

On Dec 7 2011, 5:07 pm, manohar <manoha...@gmail.com> wrote:
> Hello,
>
> I have been working on the VPN client on ICS on an x86 based device.
>
> The VPN client is currently unable to establish connection with a
> server. When I dug deeper into the call stack, I found that the
> capable(CAP_NET_RAW) call is failing within the kernel. The call stack
> that I have traced is:-
>
> capable(CAP_NET_RAW)
>                 ^
> sock_bindtodevice (struct sock *sk, char __user *optval, int optlen)
> in $HOME/hardware/intel/linux/net/core/sock.c
>                 ^
> sock_setsockopt (...,  optname = SO_BINDTODEVICE, ...)  in $HOME/
> hardware/intel/linux/net/core/sock.c
>                 ^
> ----------------------------------------------
> System call interface
> ----------------------------------------------
>                 ^
> setsockopt(s, SOL_SOCKET, SO_BINDTODEVICE, "wlan0", 5)   in $HOME/
> external/mtpd/mtpd.c
>
>   I have tried to add theCAP_NET_RAWcapability in the mtpd using
> cap_get_proc() and cap_set_proc() defined in sys/capability.h in
> libcap, but I'm unable to find libcap on ICS.
>
> Could anybody please let me know if there is any other way to set a
> process's capability or any other way to approach this issue?
>
> Thank you very much,
> Manohar

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to