NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/55691: rump kernels log "rn_init: radix functions require max_keylen be set"



The following reply was made to PR kern/55691; it has been noted by GNATS.

From: Andreas Gustafsson <gson%gson.org@localhost>
To: Martin Husemann <martin%duskware.de@localhost>
Cc: gnats-bugs%netbsd.org@localhost
Subject: Re: kern/55691: rump kernels log "rn_init: radix functions require
 max_keylen be set"
Date: Sat, 17 Oct 2020 15:41:17 +0300

 Martin Husemann wrote:
 > >  I'm leaning towards simply disabling the message in the _KERNEL case.
 > >  Any objections?
 > 
 > Isn't it better to set some (new) boolean after that loop has run and change
 > the assertion to verify the loop has run already,
 
 It's not an assertion, just a log message:
 
         if (max_keylen == 0) {
                 log(LOG_ERR,
                     "rn_init: radix functions require max_keylen be set\n");
                 return;
         }
 
 There's no point in introducing a boolean to verify that the loop has
 run already, because the above code is immediately after the loop, so
 it is only reached if the loop has run (in the _KERNEL case; in the
 not-_KERNEL case, there is no loop).
 
 > but also make the call to rn_init() depend on max_keylen > 0 ?
 
 I don't understand what you mean by this.
 
 > Do we have any modules that would load routable protocols later?
 
 I don't think so.
 
 To be clear, the change I'm proposing is as follows:
 
 diff -u -r1.48 radix.c
 --- radix.c	3 Sep 2018 16:29:35 -0000	1.48
 +++ radix.c	17 Oct 2020 12:24:33 -0000
 @@ -1119,8 +1119,10 @@
  	}
  #endif
  	if (max_keylen == 0) {
 +#ifndef _KERNEL
  		log(LOG_ERR,
  		    "rn_init: radix functions require max_keylen be set\n");
 +#endif
  		return;
  	}
 
 -- 
 Andreas Gustafsson, gson%gson.org@localhost
 


Home | Main Index | Thread Index | Old Index