CONFIG_FILTER error on arm

Bjørn Mork bjorn at mork.no
Fri Nov 25 13:14:31 UTC 2011


Mukund Deshpande <sai.mukund.sagar at gmail.com> writes:

> Can no one help me with this error? :(
> I have been stuck with this error since last 4 days...Have enabled all
> netfilter options..
>
> Still dhcp daemon gives same error. CONFIG_PACKET or CONFIG_FILTER
> should be enabled in kernel configuration :|

The error message is very misleading.  CONFIG_FILTER hasn't existed in
ages. It doesn't have anything to do with NETFILTER. The functionality
which previously required CONFIG_FILTER is unconditionally enabled in
Linux 2.6.

And if you look through common/lpf.c you'll notice that the exact same
message is printed for not less than three(!) non-related errors.
Unless you have Token Ring enabled, which adds a fourth...  They even
all use "socket" as prefix.  This makes it much harder to tell exactly
which call failed.  But at least the print the returned error code:
"Invalid argument".  So we can look at the three calls and see which one
is likely to cause that:

1) socket(PF_PACKET, SOCK_PACKET, htons((short)ETH_P_ALL)

  Yup, could be it if you didn't enable CONFIG_PACKET

2) bind (sock, &sa, sizeof sa)

  Yup, could be it if there is an bug in the ifindex detection? 

3) setsockopt (info -> rfdesc, SOL_SOCKET, SO_ATTACH_FILTER, &p, sizeof p)

  Yup, could be a bug in the filter.  You say you cross compiled
  this. I'm wondering if that might cause endianness problems when
  building the filter?  Don't know - just guessing possible causes....

The first thing I would do, was verifying that I actually had
CONFIG_PACKET enabled in the running kernel.  Then I would locate these
three calls in common/lpf.c and add enough debug output to them to find
out exactly which one failed.  The path from there depends on the result
of that.



Bjørn



More information about the dhcp-users mailing list