Hello,

I found a problem about ifconfig tool in freebsd4.8:
When I used command "ifconfig fxp0 promisc", both IFF_PROMISC and
IFF_PPROMISC
of fxp0 were set.
Only IFF_PROMISC was set in freebsd4.5. I don't know why changes in 4.8.

Because the 2 flags are always been set at same time, "m_free(m)" in
following
 code will never be reached.

Does any know why 4.8 changes "ifconfig"?

/*  File: ether_input.c   Func: ether_demux() */

if (!(BDG_ACTIVE(ifp))) { 
   /* 
    * Discard packet if upper layers shouldn't see it because it 
    * was unicast to a different Ethernet address. If the driver 
    * is working properly, then this situation can only happen 
    * when the interface is in promiscuous mode. 
    */ 
    if ((ifp->if_flags & IFF_PROMISC) != 0 
     && (eh->ether_dhost[0] & 1) == 0 
     && bcmp(eh->ether_dhost, 
        IFP2AC(ifp)->ac_enaddr, ETHER_ADDR_LEN) != 0 
     && (ifp->if_flags & IFF_PPROMISC) == 0) { 
     m_freem(m); 
     return; 
    } 
| > } 





--http://www.eyou.com
--�ȶ��ɿ�����ѵ�������  �����ʼ�  �ƶ���ǩ  ��������  ����洢...����δ��


Reply via email to