Re: Wackamole on FreeBSD 5.3 will not start

Theo Schlossnagle <[email protected]> Mon, 20 Sep 2004 15:44:44 -0400
Newsgroups gmane.comp.apache.mod-wackamole.general
Message-ID <[email protected]>
Eric L. Anderson wrote:

>On Fri, Sep 17, 2004 at 04:58:31PM -0500, Eric L. Anderson wrote:
>  
>
>>On Fri, Sep 17, 2004 at 05:42:31PM -0400, Theo Schlossnagle wrote:
>>    
>>
>>>On Sep 17, 2004, at 5:27 PM, Eric L. Anderson wrote:
>>>      
>>>
>>>>I start wackamole and get no output. I tried wackamole with -d and get
>>>>the following output:
>>>>
>>>>socket: Protocol not supported
>>>>        
>>>>
>>>Do you have BPF support in your kernel?  Wackamole code uses a BPF 
>>>socket to find it's IPs and MACs.
>>>      
>>>
>>I am currently using the kernel from the install (GENERIC). I have not
>>built a new kernel yet. The GENERIC kernel config lists the bpf
>>device but I am not sure how to tell wether the kernel I am using
>>actually has the device.
>>    
>>
>
>I rebuilt and reinstalled both the kernel and world. I can now verify
>that I have BPF support as 'ls /dev/bpf0' returns correctly (my
>understanding is that FreeBSD 5.x uses devfs and creates devices on
>demand).
>
>wackamole still behaves the same:
># wackamole -d
>socket: Protocol not supported
>
>I toyed with gdb a bit and tracked the failing socket() function call
>down to ife-bpf.c:27:
>
>27 	if((_if_sock = socket (AF_INET, socket_type, htons(ETH_P_ALL))) == -1) {
>28          perror ("socket");
>29          exit (EXIT_FAILURE);
>30        }
>
>Regards
>  
>
Try replacing htons(ETH_P_ALL) with 0.  If you have the tools 
(Ethereal), confirm that the packets sent on the wire are indeed ARP 
responses.

-- 
// Theo Schlossnagle
// Principal Engineer -- http://www.omniti.com/~jesus/
// Postal Engine -- http://www.postalengine.com/
// Ecelerity: fastest MTA on Earth