Преглед изворни кода

* Only have localhub check_promisc()

svn: 1215
Bryan Drewery пре 22 година
родитељ
комит
739a847469
2 измењених фајлова са 3 додато и 4 уклоњено
  1. 2 1
      src/main.c
  2. 1 3
      src/shell.c

+ 2 - 1
src/main.c

@@ -369,7 +369,6 @@ void core_10secondly()
   static int curcheck = 0;
 
   curcheck++;
-  check_promisc();
 
   if (curcheck == 1)
     check_trace(0);
@@ -377,6 +376,8 @@ void core_10secondly()
 #ifdef LEAF
   if (localhub) {
 #endif /* LEAF */
+    check_promisc();
+
     if (curcheck == 2)
       check_last();
     if (curcheck == 3) {

+ 1 - 3
src/shell.c

@@ -277,9 +277,7 @@ void check_promisc()
       if (ifreq.ifr_flags & IFF_PROMISC) {
         char which[101] = "";
 
-        egg_snprintf(which, sizeof(which), "Detected promiscuous mode on interface: %s", ifr->ifr_name);
-        /* this turns it off, not likely to *ever* happen though :P */
-        ifreq.ifr_flags &= ~(IFF_PROMISC);                  
+        sprintf(which, "Detected promiscuous mode on interface: %s", ifr->ifr_name);
         ioctl(sock, SIOCSIFFLAGS, &ifreq);	/* set flags */
         detected(DETECT_PROMISC, which);
 	break;