Subject: Re: Bug or Feature
To: Jun-ichiro itojun Hagino <itojun@iijlab.net>
From: Radivoje Todorovic <radivojet@jaspur.com>
List: tech-net
Date: 06/19/2001 11:18:48
OK

- Kernel is NetBSD 1.5

Let me explain from the beginning:

I have built pseudo device driver which I have imported to the Kernel space
with modload
That basically fills ifnet structure and then does if_attach.

Once the module is loaded here is the  output from ifconfig -a and
netstat -rnalv as you requested:

ex0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
 address: 00:01:02:75:5c:a9
 media: Ethernet autoselect (10baseT)
 status: active
 inet 10.0.0.233 netmask 0xffffff00 broadcast 10.0.0.255
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 33228
 inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
ppp1: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
sl0: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
sl1: flags=c010<POINTOPOINT,LINK2,MULTICAST> mtu 296
strip0: flags=0<> mtu 1100
strip1: flags=0<> mtu 1100
tun0: flags=10<POINTOPOINT> mtu 1500
tun1: flags=10<POINTOPOINT> mtu 1500
gre0: flags=8010<POINTOPOINT,MULTICAST> mtu 1450
gre1: flags=8010<POINTOPOINT,MULTICAST> mtu 1450
ipip0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1480
 inet 10.0.5.1 -> 10.0.6.1 netmask 0xffffff00
ipip1: flags=8010<POINTOPOINT,MULTICAST>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
gif1: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
gif2: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
gif3: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
eon0: flags=3<UP,BROADCAST> mtu 1500


Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use    Mtu
Interface
default            10.0.0.1           UGS         1    33955   1500  ex0
 expire            0   recvpipe          0   sendpipe          0
 ssthresh          0   rtt               0   rttvar            0
10/24              link#1             UC          0        0   1500  ex0
 expire    992456693   recvpipe          0   sendpipe          0
 ssthresh          0   rtt               0   rttvar            0
10.0.0.1           08:00:20:da:b5:45  UHL         1      215   1500  ex0
 expire    992947135   recvpipe          0   sendpipe          0
 ssthresh          0   rtt               0   rttvar            0
127                127.0.0.1          UGRS        0        0  33228  lo0
 expire            0   recvpipe          0   sendpipe          0
 ssthresh          0   rtt               0   rttvar            0
127.0.0.1          127.0.0.1          UH          4    19119  33228  lo0
 expire            0   recvpipe          0   sendpipe          0
 ssthresh          0   rtt          109375   rttvar        93750

XNS:
Destination        Gateway            Flags     Refs     Use    Mtu
Interface

ISO:
Destination        Gateway            Flags     Refs     Use    Mtu
Interface

X.25:
Destination        Gateway            Flags     Refs     Use    Mtu
Interface

AppleTalk:
Destination        Gateway            Flags     Refs     Use    Mtu
Interface



Now, I insterted my module with "modload"

routing table didn't change but "ifconfig -a" did with only one entry:

bla0: flags=8800<SIMPLEX, MULTICAST> mtu 1500

Now I did the following set of operations:
1) ifconfig bla0 10.0.5.1 netmask 255.255.255.0
This changed the last entry in the "ifconfig -a" output to

bla0: flags=8800<SIMPLEX, MULTICAST> mtu 1500
        inet 10.0.5.1    netmask 0xffffff00

At the same time in the routing output is the following entry added:
Destination        Gateway            Flags     Refs     Use    Mtu
Interface
10.0.5/24          10.0.5.1              U           0        0         -
bla0

and now I could see the problem in /var/log/messages:
rtinit: wrong ifa (oxaaaaaa) was (oxbbbbbb)

Please advise...



Rade



----- Original Message -----
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
To: Radivoje Todorovic <radivojet@jaspur.com>
Cc: <tech-net@netbsd.org>
Sent: Tuesday, June 19, 2001 8:13 AM
Subject: Re: Bug or Feature


> >> >I didn't get the answer from the mailing list and by browsing the =
> >> >archives I found that what I am trying is impossible with NetBSD.
> >> >Need just quick answer: Yes or No.
> >>
> >> try the following.
> >> # route add -net 10.0.6.0 127.0.0.1 -ifp bla0
> >>
> >> if you are on NetBSD prior to 1.5.1 you need two commands for this,
> >> # route add -net 10.0.6.0 127.0.0.1
> >> # route change -net 10.0.6.0 127.0.0.1 -ifp bla0
> >>
> >I just tried and I could see the problem in /var/log/messages:
> >rtinit: wrong ifa (oxaaaaaa) was (oxbbbbbb)
> >Can you elaborate on this?
>
> core@netbsd is not the right place for questions.  use tech-net.
>
> you need to clarify
> - what kind of *exact* command you have issued
> - what kind of routing table entries you had (netstat -rnalv)
> - what kind of interface addresses you had (ifconfig -a)
> - what is your kernel version (netbsd or freebsd?)
>
> without these question we cannot diagnose anything.
> i need to tell you that, even if we have the above information,
> we may not be able to diagnose (but it is better to have more
> information).
>
> itojun
>