Deleted Added
full compact
36c36
< * $FreeBSD: head/sys/net/if_fddisubr.c 93377 2002-03-29 09:52:01Z mdodd $
---
> * $FreeBSD: head/sys/net/if_fddisubr.c 93379 2002-03-29 10:17:06Z mdodd $
331a332
> ifp->if_oerrors++;
351,356c352,369
< if ((ifp->if_flags & IFF_UP) == 0) {
< m_freem(m);
< return;
< }
< getmicrotime(&ifp->if_lastchange);
< ifp->if_ibytes += m->m_pkthdr.len + sizeof (*fh);
---
> /*
> * Discard packet if interface is not up.
> */
> if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
> goto dropanyway;
>
> /*
> * Discard non local unicast packets when interface
> * is in promiscuous mode.
> */
> if ((ifp->if_flags & IFF_PROMISC) && ((fh->fddi_dhost[0] & 1) == 0) &&
> (bcmp(IFP2AC(ifp)->ac_enaddr, (caddr_t)fh->fddi_dhost,
> FDDI_ADDR_LEN) != 0))
> goto dropanyway;
>
> /*
> * Set mbuf flags for bcast/mcast.
> */
364,368d376
< } else if ((ifp->if_flags & IFF_PROMISC)
< && bcmp(IFP2AC(ifp)->ac_enaddr, (caddr_t)fh->fddi_dhost,
< FDDI_ADDR_LEN) != 0) {
< m_freem(m);
< return;
370a379,384
> /*
> * Update interface statistics.
> */
> getmicrotime(&ifp->if_lastchange);
> ifp->if_ibytes += (m->m_pkthdr.len + FDDI_HDR_LEN);
>
380a395,399
> m = m_pullup(m, sizeof(struct llc));
> if (m == 0) {
> ifp->if_ierrors++;
> goto dropanyway;
> }
388c407,408
< if (l->llc_control != LLC_UI || l->llc_ssap != LLC_SNAP_LSAP)
---
> if (l->llc_control != LLC_UI || l->llc_ssap != LLC_SNAP_LSAP) {
> ifp->if_noproto++;
389a410
> }
410c431,432
< l->llc_snap.org_code[2] != 0)
---
> l->llc_snap.org_code[2] != 0) {
> ifp->if_noproto++;
411a434
> }
502a526,528
>
> if_attach(ifp); /* Must be called before additional assignments */
>
503a530
> ifp->if_output = fddi_output;
504a532
> ifp->if_broadcastaddr = fddibroadcastaddr;
510a539,545
> if (ifa == NULL) {
> printf("%s(): no lladdr for %s%d!\n", __FUNCTION__,
> ifp->if_name, ifp->if_unit);
> return;
> }
>
> ifa = ifaddr_byindex(ifp->if_index);
514a550,551
>
> return;