Open donnlee opened 7 years ago
root@invader1:/home/stig# goes restart
root@invader1:/home/stig# goes vnet show ip fib Table Destination Adjacency
root@invader1:/home/stig# ip link add name dummy0 type dummy root@invader1:/home/stig# ip link set up dummy0 root@invader1:/home/stig# ip ad add 100.0.0.1/24 dev dummy0
root@invader1:/home/stig# goes vnet show ip fib Table Destination Adjacency 0 100.0.0.0/24 2: punt
root@invader1:/home/stig# ip link set down dummy0
root@invader1:/home/stig# goes vnet show ip fib Table Destination Adjacency 0 100.0.0.0/24 2: punt
root@invader1:/home/stig# ip link set up dummy
root@invader1:/home/stig# goes vnet show ip fib Table Destination Adjacency 0 100.0.0.0/24 2: punt 0 100.0.0.1/32 2: punt
root@invader1:/home/stig# goes restart
root@invader1:/home/stig# goes vnet show ip fib Table Destination Adjacency 0 100.0.0.0/24 2: punt
Sorry I wasn't clear when I opened this issue. I start without goes running.
root@invader1:/home/stig# goes stop root@invader1:/home/stig# ip link add dummy0 type dummy root@invader1:/home/stig# ip link set up dummy0 root@invader1:/home/stig# ip add add 50.0.0.1/24 dev dummy0 root@invader1:/home/stig# goes start root@invader1:/home/stig# goes vnet show ip fib Table Destination Adjacency 0 50.0.0.0/24 2: punt root@invader1:/home/stig#
I just tried it on a completely different invader (i16) with a fresh tree and got same behavior as before on i8.
root@invader16:~# goes stop
root@invader16:~#
root@invader16:~# ip add sho dummy0
5958: dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/ether 06:c4:fb:db:8f:0a brd ff:ff:ff:ff:ff:ff
inet 5.5.5.5/0 brd 255.255.255.255 scope global dummy0
valid_lft forever preferred_lft forever
inet6 fe80::4c4:fbff:fedb:8f0a/64 scope link
valid_lft forever preferred_lft forever
root@invader16:~# ip link set up dummy0
root@invader16:~#
root@invader16:~# goes start
root@invader16:~# goes vnet sho ip fib | grep "Dest" Table Destination Adjacency
root@invader16:~# goes vnet sho ip fib | grep "5\.5\.5"
root@invader16:~#
root@invader16:~# /usr/bin/goes version
7d6b2baf82c482a043ce4d875b91fefbbf344c79
commit 7d6b2baf82c482a043ce4d875b91fefbbf344c79
Author: Jason Pang <jason@platinasystems.com>
Date: Wed Mar 22 21:14:58 2017 -0700
Adding non-volatile power logging functions to BMC
Ok, this seems to happen because the dummy0 had a /0 mask. I re-tested with a /32 and vnet fib was ok:
root@invader16:~# goes vnet sho ip fib | grep "5\.5\.5"
0 5.5.5.5/32 2: punt
Reopening this issue because @stigt alerted me to his bug repro. I was able to repro what Stig saw:
donn@invader8:~$ sudo ip add add 3.3.3.3/16 dev dummy0
donn@invader8:~$ ip add sho dummy0
9868: dummy0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 10
00
link/ether 8a:49:0a:d8:81:1e brd ff:ff:ff:ff:ff:ff
inet 3.3.3.3/16 scope global dummy0
valid_lft forever preferred_lft forever
inet6 fe80::8849:aff:fed8:811e/64 scope link
valid_lft forever preferred_lft forever
donn@invader8:~$
donn@invader8:~$ sudo goes vnet sh ip fib
Table Destination Adjacency
0 3.3.0.0/16 2: punt
0 192.168.155.0/24 3: glean eth-31-0
0 192.168.155.2/32 5: rewrite eth-31-0 IP4: 02:46:8a:00:05:b4 -> 00:05:64:2f:3c:c9
0 192.168.155.3/32 4: local eth-31-0
tx pipe packets 8
tx pipe bytes 644
donn@invader8:~$ sudo ip link set down dummy0
donn@invader8:~$ sudo goes vnet sh ip fib
Table Destination Adjacency
0 3.3.0.0/16 2: punt
0 192.168.155.0/24 3: glean eth-31-0
0 192.168.155.2/32 5: rewrite eth-31-0 IP4: 02:46:8a:00:05:b4 -> 00:05:64:2f:3c:c9
0 192.168.155.3/32 4: local eth-31-0
tx pipe packets 8
tx pipe bytes 644
donn@invader8:~$
donn@invader8:~$ sudo ip link set up dummy0
donn@invader8:~$
donn@invader8:~$ sudo goes vnet sh ip fib
Table Destination Adjacency
0 3.3.0.0/16 2: punt
0 3.3.3.3/32 2: punt
0 192.168.155.0/24 3: glean eth-31-0
0 192.168.155.2/32 5: rewrite eth-31-0 IP4: 02:46:8a:00:05:b4 -> 00:05:64:2f:3c:c9
0 192.168.155.3/32 4: local eth-31-0
tx pipe packets 8
tx pipe bytes 644
donn@invader8:~$
donn@invader8:~$
donn@invader8:~$ sudo goes restart
donn@invader8:~$ sudo goes vnet sh ip fib
Table Destination Adjacency
0 3.3.0.0/16 2: punt
donn@invader8:~$
This is still an issue if you use a subnet mask less than /32. However it may not make sense to use any thing other than a /32 on a dummy interface. Linux allows less than /32 on a dummy, so eventually we should make it work but for now just use /32 on dummy interfaces
Issue verification status: Open (Still exists)
Issue verified in the following build:
root@invader45:~# goes version
github.com/platinasystems/go: v0.41-244-g49d9e6da
github.com/platinasystems/fe1: v0.2-520-g85494c1
github.com/platinasystems/firmware-fe1a: v0.2
root@invader45:~#
root@invader45:~# dpkg --list|grep kernel
ii kmod 18-3 amd64 tools for managing Linux kernel modules
ii libdrm2:amd64 2.4.58-2 amd64 Userspace interface to kernel DRM services -- runtime
ii linux-image-4.13.0-platina-mk1 4.13-117-g00814e4e1a1e amd64 Linux kernel, version 4.13.0-platina-mk1
ii rsyslog 8.4.2-1+deb8u2 amd64 reliable system and kernel logging daemon
root@invader45:~#
Steps: Executed same steps as @donnlee commented on Mar 24, 2017
Before goes startup, I have a dummy0 interface with 5.5.5.5/32:
Then I start goes:
I expect the fib to have an entry for dummy0's address, but it does not:
To force vnet to add a fib entry for dummy0, I had to delete and re-add dummy0, like so:
Expected condition: I expect goes to install any dummy interface addresses it finds upon starting up.