[Snort-users] SIOCGIFMTU fix

Martin Roesch roesch at ...421...
Fri Jan 12 12:13:51 EST 2001


Hi guys, here's a temporary fix for the SIO* mess.  I'll be checking
this into CVS shortly.

     -Marty


--- snort.c.orig        Fri Jan 12 12:11:24 2001
+++ snort.c     Fri Jan 12 12:12:30 2001
@@ -1483,8 +1483,12 @@
     strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
 
 #ifndef OSF1
+#ifdef SIOCGIFMTU
     if (ioctl(fd, SIOCGIFMTU, &ifr) == 0)
         retval = ifr.ifr_metric;
+#else
+    retval = ETHERNET_MTU;
+#endif
 #else
     if (ioctl(fd, SIOCRIPMTU, &ifr) == 0)
         retval = ifr.ifr_metric;




More information about the Snort-users mailing list