From owner-freebsd-bugs Tue Apr 21 09:15:20 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA04452 for freebsd-bugs-outgoing; Tue, 21 Apr 1998 09:15:20 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from cam-mail-relay1.bbnplanet.com (cam-mail-relay1.bbnplanet.com [199.94.215.242]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA04416; Tue, 21 Apr 1998 16:15:09 GMT (envelope-from moncrg@am026091.res.ray.com) Received: from gatekeeper.ray.com (gatekeeper.ray.com [138.125.162.1]) by cam-mail-relay1.bbnplanet.com (8.8.7/8.8.7) with ESMTP id MAA12502; Tue, 21 Apr 1998 12:15:05 -0400 (EDT) Received: (mailer@localhost) by gatekeeper.ray.com (8.8.7/8.8.7) id MAA16257; Tue, 21 Apr 1998 12:06:33 -0400 Received: from am026091.res.ray.com/138.125.142.48() by gatekeeper.ray.com id sma.893168382.021731; Tue Apr 21 10:19:42 1998 Received: (from moncrg@localhost) by am026091.res.ray.com (8.8.7/8.8.7) id KAA27333; Tue, 21 Apr 1998 10:17:15 -0500 (EST) (envelope-from moncrg) Date: Tue, 21 Apr 1998 10:17:15 -0500 (EST) From: "Gregory D. Moncreaff" Message-Id: <199804211517.KAA27333@am026091.res.ray.com> To: freebsd-bugs@FreeBSD.ORG, moncrg@bt340707.res.ray.com, phk@FreeBSD.ORG Subject: Re: bin/5256 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org "$Id: route.c,v 1.21.2.2 1997/07/30 06:52:06 charnier Exp $" diff -u route.c.orig route.c.fix --- route.c.orig Tue Apr 21 10:09:35 1998 +++ route.c.fix Tue Apr 21 10:12:48 1998 @@ -98,11 +98,12 @@ { RTF_BROADCAST,'b' }, { 0 } }; - -static union { +typedef union { struct sockaddr u_sa; u_short u_data[128]; -} pt_u; +} sa_u; + +static sa_u pt_u; int do_rtent = 0; struct rtentry rtentry; @@ -505,7 +506,7 @@ static char name[16]; static char prettyname[9]; struct sockaddr *sa; - struct sockaddr addr, mask; + sa_u addr, mask; /* * Don't print protocol-cloned routes unless -a. @@ -513,14 +514,14 @@ if(rt->rt_parent && !aflag) return; - if (!(sa = kgetsa(rt_key(rt)))) - bzero(&addr, sizeof addr); - else - addr = *sa; - if (!rt_mask(rt) || !(sa = kgetsa(rt_mask(rt)))) - bzero(&mask, sizeof mask); - else - mask = *sa; + bzero(&addr, sizeof addr); + if ((sa = kgetsa(rt_key(rt)))) + bcopy(sa,&addr,sa->sa_len); + + bzero(&mask, sizeof mask); + if (rt_mask(rt) && (sa = kgetsa(rt_mask(rt)))) + bcopy(sa,&mask,sa->sa_len); + p_sockaddr(&addr, &mask, rt->rt_flags, WID_DST); p_sockaddr(kgetsa(rt->rt_gateway), NULL, RTF_HOST, WID_GW); p_flags(rt->rt_flags, "%-6.6s "); ---- this is still 2.2.5 base code (haven't got 2.2.6 and can't cvsup though our firewall...) thanks, -g To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message