Re: Too short ethernet frame...

From: Christian S.J. Peron (csjp_at_freebsd.org)
Date: 08/18/05

  • Next message: Christian S.J. Peron: "Re: Too short ethernet frame..."
    Date: Thu, 18 Aug 2005 21:13:59 +0000
    To: Ian Dowse <iedowse@iedowse.com>
    
    

    Yes,

    This appears to be a mistake on my part, please commit this patch.

    Thanks for catching this!

    On Thu, Aug 18, 2005 at 09:59:50AM +0100, Ian Dowse wrote:
    > In message <148cabbc05081722171875d31e@mail.gmail.com>, Iva Hesy writes:
    > >OK, now, I get the result:
    > >"tag=RELENG_6 date=2005.07.30.22.00.00" works fine, "tag=RELENG_6
    > >date=2005.07.31.03.00.00" makes noise, many many ethernet frames can
    > >be sniffered.
    > >the cvsup log:
    > >Updating collection src-all/cvs
    > > Edit src/sys/dev/mlx/mlx_pci.c
    > > Add delta 1.23.2.1 2005.07.31.00.41.53 csjp
    > > Edit src/sys/net/bpf.c
    > > Add delta 1.153.2.1 2005.07.31.00.48.18 csjp
    > > Edit src/sys/net/bpfdesc.h
    > > Add delta 1.29.2.1 2005.07.31.00.48.18 csjp
    > >Shutting down connection to server
    > >Finished successfully
    > >I guess it should be bpf.c...
    >
    > There appear to be some braces missed in that revision of bpf.c. Does
    > the following patch help?
    >
    > Ian
    >
    > Index: sys/net/bpf.c
    > ===================================================================
    > RCS file: /dump/FreeBSD-CVS/src/sys/net/bpf.c,v
    > retrieving revision 1.153.2.2
    > diff -u -r1.153.2.2 bpf.c
    > --- sys/net/bpf.c 13 Aug 2005 21:24:16 -0000 1.153.2.2
    > +++ sys/net/bpf.c 18 Aug 2005 08:55:49 -0000
    > @@ -1256,13 +1256,14 @@
    > BPFD_LOCK(d);
    > ++d->bd_rcount;
    > slen = bpf_filter(d->bd_filter, (u_char *)m, pktlen, 0);
    > - if (slen != 0)
    > + if (slen != 0) {
    > d->bd_fcount++;
    > #ifdef MAC
    > if (mac_check_bpfdesc_receive(d, bp->bif_ifp) == 0)
    > #endif
    > catchpacket(d, (u_char *)m, pktlen, slen,
    > bpf_mcopy);
    > + }
    > BPFD_UNLOCK(d);
    > }
    > BPFIF_UNLOCK(bp);
    > @@ -1308,13 +1309,14 @@
    > BPFD_LOCK(d);
    > ++d->bd_rcount;
    > slen = bpf_filter(d->bd_filter, (u_char *)&mb, pktlen, 0);
    > - if (slen != 0)
    > + if (slen != 0) {
    > d->bd_fcount++;
    > #ifdef MAC
    > if (mac_check_bpfdesc_receive(d, bp->bif_ifp) == 0)
    > #endif
    > catchpacket(d, (u_char *)&mb, pktlen, slen,
    > bpf_mcopy);
    > + }
    > BPFD_UNLOCK(d);
    > }
    > BPFIF_UNLOCK(bp);
    >
    >

    -- 
    Christian S.J. Peron
    csjp@FreeBSD.ORG
    FreeBSD Committer
    _______________________________________________
    freebsd-stable@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-stable
    To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
    

  • Next message: Christian S.J. Peron: "Re: Too short ethernet frame..."

    Relevant Pages

    • Re: Latest kgdb?
      ... > retrieving revision 1.5 ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: panic: invalid ife->ifm_data (0xa) in mii_phy_setmedia
      ... I'm a kind of bit confused here whose patch to choose. ... P> retrieving revision 1.91.2.16 ... Since I have very small collection of bgecards, I avoid to commit ...
      (freebsd-stable)
    • Re: Too short ethernet frame...
      ... Or if you want, I will commit it. ... >>Shutting down connection to server ... > retrieving revision 1.153.2.2 ... > #ifdef MAC ...
      (freebsd-stable)
    • Re: HEADS UP: Atheros 802.11 support
      ... Patch attached. ... > retrieving revision 1.64 ... compile fix. ... If you really don't want to do it, I'll commit it myself. ...
      (freebsd-current)
    • Re: if_tap unaligned access problem
      ... >>any objections to the attached patch? ... can i commit it? ... >>retrieving revision 1.147 ... > if we use a cluster, we'd have enough space for a larger align... ...
      (freebsd-net)