Subject: Re: PR-7148 (causes kernel panic)
To: None <tech-net@netbsd.org>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: current-users
Date: 10/26/1999 11:31:46
On Tue, 26 Oct 1999, David Brownlee wrote:

> 	This definitely sounds like a tech-net question.
> 
> 	Any of our sys/net experts care to chime in on this?

Fixing this would require a kernel version bump (not a big deal, but needs
remembering).

The big question is do we need to have the ifa_metric field be an int, or
is a short ok?

If so, this patch should fix it.

Index: if.h
===================================================================
RCS file: /cvsroot/syssrc/sys/net/if.h,v
retrieving revision 1.40
diff -u -r1.40 if.h
--- if.h        1999/09/29 22:42:02     1.40
+++ if.h        1999/10/26 18:29:16
@@ -259,8 +259,8 @@
        void    (*ifa_rtrequest)        /* check or clean routes (+ or -)'d */
                    __P((int, struct rtentry *, struct sockaddr *));
        u_short ifa_flags;              /* mostly rt_flags for cloning */
-       short   ifa_refcnt;             /* count of references */
-       int     ifa_metric;             /* cost of going out this interface */
+       short   ifa_metric;             /* cost of going out this interface */
+       int     ifa_refcnt;             /* count of references */
 };
 #define        IFA_ROUTE       RTF_UP          /* route installed */
 

If ifa_metric needs to stay an int, we need to bump both flags and refcnt
to ints.

Thoughts?

Take care,

Bill