I identified the routing rule responsible for receiving packets.
Code:
root@OpenWrt:/# cat /proc/net/ipv6_route
fe80000000000000020319fffe001580 7f 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 veth0
fe800000000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth0
fe800000000000000000000000000000 40 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth1
00000000000000000000000000000000 00 00000000000000000000000000000000 00 00000000000000000000000000000000 ffffffff 00000001 0000000a 00200200 lo
00000000000000000000000000000001 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000001 00000000 80200001 lo
fe80000000000000020319fffe001580 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000001 00000000 80200001 lo
fe80000000000000020319fffe001617 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000000 00000001 00000000 80200001 lo
ff000000000000000000000000000000 08 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth0
ff000000000000000000000000000000 08 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 veth0
ff000000000000000000000000000000 08 00000000000000000000000000000000 00 00000000000000000000000000000000 00000100 00000000 00000000 00000001 eth1
00000000000000000000000000000000 00 00000000000000000000000000000000 00 00000000000000000000000000000000 ffffffff 00000001 0000000a 00200200 lo
root@OpenWrt:/# ip -6 route list table local
local ::1 dev lo proto none metric 0
local fe80::203:19ff:fe00:1580 dev lo proto none metric 0
local fe80::203:19ff:fe00:1617 dev lo proto none metric 0
ff00::/8 dev eth0 metric 256
ff00::/8 dev veth0 metric 256
ff00::/8 dev eth1 metric 256
I want to add the same rule for eth0
Code:
root@OpenWrt:/# ip -6 route add local fe80::203:19ff:fe00:1616 table local dev lo proto none metric 0
root@OpenWrt:/# ip -6 route list table local
local ::1 dev lo proto none metric 0
local fe80::203:19ff:fe00:1580 dev lo proto none metric 0
local fe80::203:19ff:fe00:1616 dev lo metric 1024
local fe80::203:19ff:fe00:1617 dev lo proto none metric 0
Result:
Code:
fe80000000000000020319fffe001616 80 00000000000000000000000000000000 00 00000000000000000000000000000000 00000400 00000000 00000000 80000001 lo
ping6 still doesn't work.
The difference is in the "flags" parameter (last but one column):
80200001
vs
80000001
The "metrics" doesn't match as well, but I think it is not the reason of non working ping.
The newly added rule doesn't have a RTF_NONEXTHOP flag set, which is commented as "route with no nexthop" flag in header file. How to set this flag?