Networking Forums

Networking Forums > Computer Networking > Linux Networking > RAW socket and CONFIG_FILTER

Reply
Thread Tools Display Modes

RAW socket and CONFIG_FILTER

 
 
yannifan
Guest
Posts: n/a

 
      05-06-2007, 09:17 AM
Hi,
Im doin a project on DHCp client-server setup. i have to use RAW
sockets in the code for this. The call is
sock = socket(PF_PACKET, SOCK_RAW, htons((short)ETH_P_ALL).
The code compiles but when i try to start the Dhcp client, I get an
error saying "Make sure CONFIG_PACKET and CONFIG_FILTER is enabled". I
tried to build the kernel using a source tree. I found CONFIG_PACKET=y
but didnt find CONFIG_FILTER. So i added a line CONFIG_FILTER=y. I got
the foll error
Heres a full snapshot of the error :
bash-3.1# make
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf -s arch/i386/Kconfig
..config:384:warning: trying to assign nonexistent symbol FILTER
#
# configuration written to .config
#
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-i386
ln: creating symbolic link `include/asm' to `asm-i386': Operation not
permitted
make: *** [include/asm] Error 1
bash-3.1#

I read that CONFIG_FILTER is disabled in 2.6.x Hence i used a package
from netfilter.org
http://www.netfilter.org/projects/l...ueue/index.html
When i run the DHCP client, i get the foll messages :
May 6 13:33:20 localhost dhclient: socket: Invalid argument - make
sure
May 6 13:33:20 localhost dhclient: CONFIG_PACKET (Packet socket) and
CONFIG_FILTER
May 6 13:33:20 localhost dhclient: (Socket Filtering) are enabled in
your kernel
May 6 13:33:20 localhost dhclient: configuration!
May 6 13:33:20 localhost dhclient:

So does this mean, filtering is enabled and i can run my project?

Pls help
Thanks in advance

 
Reply With Quote
 
 
 
 
Bill Marcum
Guest
Posts: n/a

 
      05-08-2007, 06:20 PM
On 6 May 2007 01:17:50 -0700, yannifan
<(E-Mail Removed)> wrote:
>
>
> Hi,
> Im doin a project on DHCp client-server setup. i have to use RAW
> sockets in the code for this. The call is
> sock = socket(PF_PACKET, SOCK_RAW, htons((short)ETH_P_ALL).
> The code compiles but when i try to start the Dhcp client, I get an
> error saying "Make sure CONFIG_PACKET and CONFIG_FILTER is enabled". I
> tried to build the kernel using a source tree. I found CONFIG_PACKET=y
> but didnt find CONFIG_FILTER. So i added a line CONFIG_FILTER=y. I got


Try grepping for FILTER instead of CONFIG_FILTER. I think you want
CONFIG_NETFILTER=y.

> the foll error
> Heres a full snapshot of the error :
> bash-3.1# make
> HOSTLD scripts/kconfig/conf
> scripts/kconfig/conf -s arch/i386/Kconfig
> .config:384:warning: trying to assign nonexistent symbol FILTER
> #
> # configuration written to .config
> #
> CHK include/linux/version.h
> UPD include/linux/version.h
> CHK include/linux/utsrelease.h
> UPD include/linux/utsrelease.h
> SYMLINK include/asm -> include/asm-i386
> ln: creating symbolic link `include/asm' to `asm-i386': Operation not
> permitted

Did you put your source tree in a vfat filesystem? They can't do
symbolic links.

> make: *** [include/asm] Error 1
> bash-3.1#
>
> I read that CONFIG_FILTER is disabled in 2.6.x Hence i used a package
> from netfilter.org
> http://www.netfilter.org/projects/l...ueue/index.html
> When i run the DHCP client, i get the foll messages :
> May 6 13:33:20 localhost dhclient: socket: Invalid argument - make
> sure
> May 6 13:33:20 localhost dhclient: CONFIG_PACKET (Packet socket) and
> CONFIG_FILTER
> May 6 13:33:20 localhost dhclient: (Socket Filtering) are enabled in
> your kernel
> May 6 13:33:20 localhost dhclient: configuration!
> May 6 13:33:20 localhost dhclient:
>

This looks like the dhclient script is broken and tries to execute an
error message.

> So does this mean, filtering is enabled and i can run my project?
>
> Pls help
> Thanks in advance
>



--
"Never face facts; if you do, you'll never get up in the morning."
-- Marlo Thomas
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Test socket on Master Socket not working Kevin Cowans Broadband 14 11-15-2006 10:17 PM
10038 Socket Operation on non-socket =?Utf-8?B?UkNyYWlnTGF3MUBhb2wuY29t?= Windows Networking 3 12-23-2004 04:01 AM
10038 socket operation on non-socket Bill H. Windows Networking 1 09-27-2004 04:56 AM
10038 Socket Operation on non-socket error Tim G Windows Networking 1 09-26-2004 04:04 PM
WLAN Monitor 10038 Socket operation on non-socket Bill Windows Networking 1 03-01-2004 11:34 PM



1 2 3 4 5 6 7 8 9 10 11