Re: Too short ethernet frame...

2005-08-18 Thread Iva Hesy
On 8/18/05, Ian Dowse <[EMAIL PROTECTED]> wrote:
> 
> There appear to be some braces missed in that revision of bpf.c. Does
> the following patch help?
> 
> Ian
> 
Thank you very much, your patch works fine for me...
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Too short ethernet frame...

2005-08-18 Thread Christian S.J. Peron
Or if you want, I will commit it.

On Thu, Aug 18, 2005 at 09:59:50AM +0100, Ian Dowse wrote:
> In message <[EMAIL PROTECTED]>, 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 -  1.153.2.2
> +++ sys/net/bpf.c 18 Aug 2005 08:55:49 -
> @@ -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
[EMAIL PROTECTED]
FreeBSD Committer
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Too short ethernet frame...

2005-08-18 Thread Christian S.J. Peron
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 <[EMAIL PROTECTED]>, 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 -  1.153.2.2
> +++ sys/net/bpf.c 18 Aug 2005 08:55:49 -
> @@ -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
[EMAIL PROTECTED]
FreeBSD Committer
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Too short ethernet frame...

2005-08-18 Thread Ian Dowse
In message <[EMAIL PROTECTED]>, 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 -  1.153.2.2
+++ sys/net/bpf.c   18 Aug 2005 08:55:49 -
@@ -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);


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Too short ethernet frame...

2005-08-17 Thread Iva Hesy
On 8/16/05, Brooks Davis <[EMAIL PROTECTED]> wrote:
> 
> Sounds like someone introduced a bug in the nic driver or the ethernet
> code, but I'm not seeing anything obvious between those dates.  If you
> could narrow the date range further that would help.
> 
> -- Brooks
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...
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Too short ethernet frame...

2005-08-16 Thread Brooks Davis
On Sat, Aug 13, 2005 at 02:01:26AM -0700, Iva Hesy wrote:
> Just now, I add "date=2005.07.31.03.00.00" to my src cvsup sup-file
> and make kernel, too short ethernet frames are still sniffered. But
> when I add "date=2005.07.22.03.00.00" to sup-file and cvsup and make
> kernel, the damn datagrams gone!!!

Sounds like someone introduced a bug in the nic driver or the ethernet
code, but I'm not seeing anything obvious between those dates.  If you
could narrow the date range further that would help.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4


pgpbSR9Wbg7WT.pgp
Description: PGP signature


Re: Too short ethernet frame...

2005-08-13 Thread Iva Hesy
Just now, I add "date=2005.07.31.03.00.00" to my src cvsup sup-file
and make kernel, too short ethernet frames are still sniffered. But
when I add "date=2005.07.22.03.00.00" to sup-file and cvsup and make
kernel, the damn datagrams gone!!!
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Too short ethernet frame...

2005-08-12 Thread Iva Hesy
On 8/12/05, Brooks Davis <[EMAIL PROTECTED]> wrote:
> 
> Most likely, your cabling, duplex configuraion, nic, switch are
> misconfigured and a high traffic ap like rdesktop is pushing them over
> the edge.  I'd check the duplex settings on each end and try another
> cable first.  Then try a different nic and switch if possible.  It's
> possible the problem is a driver bug, but it's more likely you've for
> some sort of physical network problem.
> 
> -- Brooks
> 
Thanks a lot for your reply.
I have try another NIC (RealTek 8029), and the same things happens.
But when I run 6.0 Beta1 kernel or a LiveCD Linux, I can't see any too
short ethernet frames...
BTW: It happens not only when I run rdesktop...
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Too short ethernet frame...

2005-08-12 Thread Brooks Davis
On Fri, Aug 12, 2005 at 02:37:04AM -0700, Iva Hesy wrote:
> OS: RELENG_6 (Beta2)
> NIC: vr0: 
> # tcpdump -penv -i vr0 less 32
> 16:15:42.512701 [|ether]
> 16:15:44.523102 [|ether]
> 16:15:46.522495 [|ether]
> 16:16:00.540387 [|ether]
> 16:16:02.541834 [|ether]
> 16:16:08.550068 [|ether]
> 16:16:10.570483 [|ether]
> # snort -pev -i vr0 less 32
> Captured data length < Ethernet header length! (0 bytes)
> Captured data length < Ethernet header length! (0 bytes)
> Captured data length < Ethernet header length! (0 bytes)
> When I run rdesktop, more invalid ethernet frame was sniffered...

Most likely, your cabling, duplex configuraion, nic, switch are
misconfigured and a high traffic ap like rdesktop is pushing them over
the edge.  I'd check the duplex settings on each end and try another
cable first.  Then try a different nic and switch if possible.  It's
possible the problem is a driver bug, but it's more likely you've for
some sort of physical network problem.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4


pgpiIsYpEyESt.pgp
Description: PGP signature


Too short ethernet frame...

2005-08-12 Thread Iva Hesy
OS: RELENG_6 (Beta2)
NIC: vr0: 
# tcpdump -penv -i vr0 less 32
16:15:42.512701 [|ether]
16:15:44.523102 [|ether]
16:15:46.522495 [|ether]
16:16:00.540387 [|ether]
16:16:02.541834 [|ether]
16:16:08.550068 [|ether]
16:16:10.570483 [|ether]
# snort -pev -i vr0 less 32
Captured data length < Ethernet header length! (0 bytes)
Captured data length < Ethernet header length! (0 bytes)
Captured data length < Ethernet header length! (0 bytes)
When I run rdesktop, more invalid ethernet frame was sniffered...
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"