arplookup のlogを出さないようにする

某サイトでは怪しいarpが大量に飛んでいる。
May 23 15:15:48 xxxx kernel: arplookup 0.0.0.0 failed: host is not on local network
こんな感じ。あまりにウザイので、arp lookup のlogを吐かないようにソースを変更した。src/sys/netinet/if_ether.cを変更すればよい。
— src/sys/netinet/if_ether.c.orig     Tue May 24 10:41:26 2005
+++ src/sys/netinet/if_ether.c  Tue May 24 10:42:59 2005
@@ -875,9 +875,10 @@
        if (why) {
 #define        ISDYNCLONE(_rt) \
        (((_rt)->rt_flags & (RTF_STATIC | RTF_WASCLONED)) == RTF_WASCLONED)
-               if (create)
-                      
log(LOG_DEBUG, “arplookup %s failed: %s\n”,
-                          
inet_ntoa(sin.sin_addr), why);
+               /* if (create)
+               
*      log(LOG_DEBUG, “arplookup %s failed:
%s\n”,
+               
*         
inet_ntoa(sin.sin_addr), why);
+                */
                /*
                
* If there are no references to this Layer 2 route,
                
* and it is a cloned route, and not static, and

これでカーネル再構築すればOK。
本来であれば、怪しいarpを止めるべきなのだが…..

カテゴリー: FreeBSD パーマリンク