[Snort-users] Problems building snort 1.7 on OpenBSD

Tom Vandepoel Tom.Vandepoel at ...271...
Thu Jan 18 04:15:09 EST 2001


Keith McDuffee wrote:
> 
> I thought I had this fixed, but apparently not.
> 
> The last release before 1.7 worked fine. Now when I start snort I get the
> following error:
> 
> snort -i fxp0 -d -h 192.168.1.0/24 -s -l /var/logs/snort-c /etc/snort.rules
> 
> --== Initializing Snort ==--
> Initializing Network Interface fxp0
> ioctl(SIOCGIFMTU): Invalid argument
> ERROR: Can not get MTU of an interface fxp0!
> ----

In snort.c, force the MTU like below. This was posted earlier here, but
I had to delete some of the other ifdef's to make it work.

Actually, more can probably be scrapped from this function... but this
is a temporary kludge anyway I guess.


int GetIfrMTU(char *name) {
    
    int fd;
    struct ifreq ifr;
    int retval;


    retval = -1;
    
    fd = socket(AF_INET, SOCK_DGRAM, 0);
    if ( fd < 0) {
        PrintError("socket");
        return -1;
    }

    strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));

if(1)
    {
       retval = ETHERNET_MTU;
    }
    else
        PrintError("ioctl(SIOCGIFMTU)");    

    close(fd);
    
 return retval;
}

-- 
Tom Vandepoel                 Ubizen
Sr. Security Engineer         We Secure e-Business
Phone   +32 16 28 70 00       http://www.ubizen.com
Fax     +32 16 28 71 00       http://www.securitywatch.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2884 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://lists.snort.org/pipermail/snort-users/attachments/20010118/b8703a0c/attachment.bin>


More information about the Snort-users mailing list