[nos-bbs] Info - is your JNOS crashing every 4 minutes ? NETROM !

Barry Siegfried k2mf at nnj.k2mf.ampr.org
Wed Sep 14 04:03:05 EDT 2005


[maiko at pcs.mb.ca wrote]:

> Interesting little discovery,
>
> I will fix this, but in the meantime ...
>
> IF you have a JNOS executable AND the NETROM code is
> included, AND you are getting NETROM or INP3 broadcasts
> on one of your interfaces, BUT you have NOT done an
> 'attach netrom' in your autoexec.nos, then be prepared
> to see your JNOS crash each time a broadcast comes in.
>
> If you are interfaced to an Xnet system, that can cause
> a crash almost every single minute !!!
>
> From time to time, I've seen posts where people are saying
> that their JNOS is crashing repeatedly over and over. Well,
> this could be something to check out.
>
> The quick fix to stop the repeated crashes is to 'attach netrom',
> and leave it at that. The code never did check to see if the netrom
> interface is attached or not, when a broadcast comes in :-(

Good find, Maiko!

Here is what I would do to bulletproof this in your JNOS code:

In axnr() (CONFIG.C) change:

{
    if(!mcast)
        nr_route(bp,axp);
    else
        nr_nodercv(iface,src,bp);
}

to:

{
	if(Nr_iface != NULLIF) {
		if(axp != NULLAX25 && !mcast)
			nr_route(bp,axp);
		else
			nr_nodercv(iface,src,bp);
	} else
		/* Net/Rom not attached ! */
		free_p(bp);
}

and in nr_nodercv() (NR3.C) change:

    /* First, see if this is even a net/rom interface: */
    if(!(iface->flags & IS_NR_IFACE)){
        free_p(bp);
        return;
    }
    if ((qual = accept_bc(source,iface)) == 0) {    /* check against filter */
        free_p(bp) ;                /* and get quality */
        return ;
    }

to:

	if(source == NULLCHAR || iface == NULLIF
		|| !(iface->flags & IS_NR_IFACE)
		|| !(qual = accept_bc(source,iface))) {
		/* This is neither a Net/Rom interface nor is there a
		 * quality value for this neighbor */
		free_p(bp);
		return;
	}

and where the global variables are declared at the beginning of NR3.C,
I would change:

struct iface *Nr_iface;

to:

struct iface *Nr_iface = NULLIF;

just to be absolutely sure it is initialized to NULL.  It gets changed
to a valid interface control block pointer in nr_attach() when you
'attach netrom'.

73, de Barry, K2MF >>
           o
          <|>      Barry Siegfried
+---------/-\---------------------------+
| Internet | bgs at mfnos.net              |
| HomePage | http://www.mfnos.net/~bgs  |
+----------+----------------------------+
| Amprnet  | k2mf at nnj.k2mf.ampr.org     |
| PBBS     | k2mf at k2ge.#cnj.nj.usa.noam |
+----------+----------------------------+




More information about the nos-bbs mailing list