Bootp fails to add default route?

Brian Dowling (
Wed, 14 May 1997 04:25:03 -0400

I recently tried to setup linux-2.1.36 bootp (nfs-root) kernel, but I
ran into a little snag. When it tries to add the default bootp route,
I get the error message:

add route res -22
BOOTP: Failed to add route

I spent a little time trying to track this down, but I didn't yet
figure it out. Here's what I did figure out.

fs/nfs/nfsroot.c: root_dev_chg_route() is called...
net/ipv4/fib.c: ip_rt_ioctl() is called...

In here, I discovered that the first call to rtmsg_process()
is the one returning -22 (EINVAL).

Looking a bit further, I determined the test that I think causes
it to fail is:

(r->rtmsg_tos & ~IPTOS_TOS_MASK)

that's part of the first big "this or that" if statement...

I hope that helps someone else track this down. I'm not really sure
what that test is even looking to do. I don't ever see rt_tos set, so
I'm not sure where else to look atm. I'm pretty tired now, so that
explains my humorous way of explaining this above.

BTW, this happened on two different cards (NE2000, and
EtherExpress16), so I don't think it's card related.


P.S. I also initially tried compiling with CONFIG_MODVERSIONS, but my
/sbin/genksyms doesn't appear to support the -k option. I upgraded to
modules-2.1.13 and still got the same results.

usage: genksyms [-gwqdD] directory
% /sbin/genksyms -V
(C) 1994, 1995 Bjorn Ekwall <>, version 0.43(BETA)