Explorar o código

* Ignore 'pflog' interfaces in promisc

Bryan Drewery %!s(int64=16) %!d(string=hai) anos
pai
achega
a8440a080e
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  1. 1 0
      doc/UPDATES
  2. 1 1
      src/shell.c

+ 1 - 0
doc/UPDATES

@@ -6,6 +6,7 @@
 * Update server list, 'set -yes servers -' and 'set -yes servers6 -' to get new list.
 * Fix default compile so it doesn't use a ton of processes.
 * Fix bot getting killed on OpenBSD 4.7 on startup
+* Ignore 'pflog' interfaces in promisc
 
 1.3 - http://wraith.botpack.net/milestone/1.3
 * Binary / shell / startup changes

+ 1 - 1
src/shell.c

@@ -240,7 +240,7 @@ void check_promisc()
     ifreq = *ifr;
     if (!ioctl(sock, SIOCGIFFLAGS, &ifreq)) {	/* we can read this interface! */
       /* sdprintf("Examing interface: %s", ifr->ifr_name); */
-      if (unlikely(ifreq.ifr_flags & IFF_PROMISC)) {
+      if (unlikely(ifreq.ifr_flags & IFF_PROMISC) && strncmp(ifr->ifr_name, "pflog", 5)) {
         char which[101] = "";
 
         simple_snprintf(which, sizeof(which), STR("Detected promiscuous mode on interface: %s"), ifr->ifr_name);