Unix Technical Forum

mrinfo

This is a discussion on mrinfo within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> Hi I think there is a bug in mrinfo, related to the change in API, (see zebra, mrouted). # ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > comp.unix.bsd.openbsd.misc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2008, 05:21 AM
Esben Norby
 
Posts: n/a
Default mrinfo

Hi

I think there is a bug in mrinfo, related to the change in API, (see zebra,
mrouted).

# mrinfo
warning - packet shorter (28 bytes) than hdr+data length (20+28)
warning - packet shorter (28 bytes) than hdr+data length (20+28)
warning - packet shorter (28 bytes) than hdr+data length (20+28)
warning - packet shorter (28 bytes) than hdr+data length (20+28)

Or am I missing something here?? Haven't tried this out in a real MC capable
network, but atleast it shuts mrinfo up.

Dunno about mtrace, map-mbone.

cvs diff: Diffing .
Index: mrinfo.c
================================================== =================
RCS file: /cvsroot/OpenBSD/src/usr.sbin/mrinfo/mrinfo.c,v
retrieving revision 1.18
diff -u -r1.18 mrinfo.c
--- mrinfo.c 26 Nov 2003 01:17:12 -0000 1.18
+++ mrinfo.c 24 Feb 2004 19:59:30 -0000
@@ -480,7 +480,7 @@
src = ip->ip_src.s_addr;
dst = ip->ip_dst.s_addr;
iphdrlen = ip->ip_hl << 2;
- ipdatalen = ntohs(ip->ip_len);
+ ipdatalen = ntohs(ip->ip_len) - iphdrlen;
if (iphdrlen + ipdatalen != recvlen) {
logit(LOG_WARNING, 0,
"packet shorter (%u bytes) than "





Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-16-2008, 05:21 AM
Esben Norby
 
Posts: n/a
Default Re: mrinfo

> Hi
>
> I think there is a bug in mrinfo, related to the change in API, (see

zebra,
> mrouted).
>
> # mrinfo
> warning - packet shorter (28 bytes) than hdr+data length (20+28)
> warning - packet shorter (28 bytes) than hdr+data length (20+28)
> warning - packet shorter (28 bytes) than hdr+data length (20+28)
> warning - packet shorter (28 bytes) than hdr+data length (20+28)
>
> Or am I missing something here?? Haven't tried this out in a real MC

capable
> network, but atleast it shuts mrinfo up.
>
> Dunno about mtrace, map-mbone.
>
> cvs diff: Diffing .
> Index: mrinfo.c
> ================================================== =================
> RCS file: /cvsroot/OpenBSD/src/usr.sbin/mrinfo/mrinfo.c,v
> retrieving revision 1.18
> diff -u -r1.18 mrinfo.c
> --- mrinfo.c 26 Nov 2003 01:17:12 -0000 1.18
> +++ mrinfo.c 24 Feb 2004 19:59:30 -0000
> @@ -480,7 +480,7 @@
> src = ip->ip_src.s_addr;
> dst = ip->ip_dst.s_addr;
> iphdrlen = ip->ip_hl << 2;
> - ipdatalen = ntohs(ip->ip_len);
> + ipdatalen = ntohs(ip->ip_len) - iphdrlen;
> if (iphdrlen + ipdatalen != recvlen) {
> logit(LOG_WARNING, 0,
> "packet shorter (%u bytes) than "
>
>

I do think mtrace has the same bug.

patch? NOT tested!

cvs diff: Diffing .
Index: mtrace.c
================================================== =================
RCS file: /cvsroot/OpenBSD/src/usr.sbin/mtrace/mtrace.c,v
retrieving revision 1.21
diff -u -r1.21 mtrace.c
--- mtrace.c 26 Nov 2003 01:17:12 -0000 1.21
+++ mtrace.c 24 Feb 2004 20:26:51 -0000
@@ -493,7 +493,7 @@
continue;

iphdrlen = ip->ip_hl << 2;
- ipdatalen = ntohs(ip->ip_len);
+ ipdatalen = ntohs(ip->ip_len) - iphdrlen;
if (iphdrlen + ipdatalen != recvlen) {
fprintf(stderr,
"packet shorter (%u bytes) than hdr+data len
(%u+%u)\n",
@@ -647,7 +647,7 @@
continue;

iphdrlen = ip->ip_hl << 2;
- ipdatalen = ntohs(ip->ip_len);
+ ipdatalen = ntohs(ip->ip_len) - iphdrlen;
if (iphdrlen + ipdatalen != recvlen) {
fprintf(stderr,
"packet shorter (%u bytes) than hdr+data len (%u+%u)\n",



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-16-2008, 05:21 AM
Ted Unangst
 
Posts: n/a
Default Re: mrinfo

both fixed, thanks.

--

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:01 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com