lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240123030813.2493801-1-gaoxingwang1@huawei.com>
Date: Tue, 23 Jan 2024 11:08:13 +0800
From: gaoxingwang <gaoxingwang1@...wei.com>
To: <edumazet@...gle.com>
CC: <davem@...emloft.net>, <dsahern@...nel.org>, <gaoxingwang1@...wei.com>,
	<liaichun@...wei.com>, <linux-kernel@...r.kernel.org>,
	<netdev@...r.kernel.org>, <pabeni@...hat.com>, <yanan@...wei.com>,
	<yoshfuji@...ux-ipv6.org>
Subject: Re: [Discuss]iproute2: ipv6 route add fail

>> Hello everyone,
>>
>> Here is a particular problem with routing.
>> Sometimes users can run the ip -6 route command to add a route whose destination address is the same as the gateway address, and it can be successfully added. However, adding another route with the same gateway address will fail later.
>>
>> Example:
>> # ip -6 route add 2409:8080:5a0a:60c7::7/128 via 2409:8080:5a0a:60c7::7 dev eth2
>> # ip -6 route add 2409:8080:5a0a:60c7::8/128 via 2409:8080:5a0a:60c7::7 dev eth2
>> RTNETLINK answers: No route to host
>>
>> Does the kernel not support this application scenario?
>> Or should the kernel not allow routes with the same destination address as the gateway address to be added so that other more meaningful routes can be added successfully?
>>
>> This question puzzles me, thank you very much if your can reply.
>
>try running `perf record -e fib6:*` and then run both route commands
>above. After both have run, Ctrl-C on perf and then run `perf script`

Here is the result:
  swapper     0 [002]  5247.545507: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe58:e86e/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [002]  5247.545511: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe58:e86e/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5247.545549: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe58:e86e/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5247.545554: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe58:e86e/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5247.545562: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:fe58:e86e/0 -> ff02::2/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
       ip 59595 [001]  5247.593130: fib6:fib6_table_lookup: table 254 oif 4 iif 0 proto 0 ::/0 -> 2409:8080:5a0a:60c7::7/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
     bash 59600 [002]  5247.598824: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 fe80::5054:ff:feb7:19af/0 -> ff02::1:ffb7:19af/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5247.598824: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:feb7:19af/0 -> ff02::1:ffb7:19af/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.636429: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5247.636465: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.641108: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe93:d0db/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [002]  5247.641112: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe93:d0db/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5247.641118: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe93:d0db/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5247.641128: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe93:d0db/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5247.641134: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 17 fe80::5054:ff:fe93:d0db/0 -> ff02::fb/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5247.642525: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe37:e95a/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5247.642532: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe37:e95a/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5247.642537: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 17 fe80::5054:ff:fe37:e95a/0 -> ff02::fb/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.642549: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe37:e95a/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [002]  5247.642552: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe37:e95a/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5247.689676: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe09:14e5/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [002]  5247.689680: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe09:14e5/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [002]  5247.689682: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe09:14e5/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5247.689684: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:fe09:14e5/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5247.689690: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:fe09:14e5/0 -> ff02::2/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.716616: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5247.716616: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5247.716845: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 ::/0 -> ff02::1:ff0f:9a04/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.716907: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 ::/0 -> ff02::1:ff0f:9a04/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5247.778211: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 ::/0 -> ff02::1:ff05:7/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.778243: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 ::/0 -> ff02::1:ff05:7/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5247.823813: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:feba:b2fc/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [002]  5247.823816: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:feba:b2fc/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5247.823818: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:feba:b2fc/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.823821: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 58 ff02::2/0 -> fe80::5054:ff:feba:b2fc/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5247.823824: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:feba:b2fc/0 -> ff02::2/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5247.867777: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.867820: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [002]  5247.958396: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5247.958431: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5247.959463: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.959503: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5247.960377: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.960442: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5247.961515: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.961525: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [002]  5247.962557: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5247.962557: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5247.963515: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.963524: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5247.965165: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5247.965178: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 0 ::/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [002]  5248.014889: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 fe80::5054:ff:fe8f:5578/0 -> ff02::1:ff35:6cd7/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5248.014890: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:fe8f:5578/0 -> ff02::1:ff35:6cd7/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
       ip 59608 [002]  5248.054418: fib6:fib6_table_lookup: table 254 oif 4 iif 0 proto 0 ::/0 -> 2409:8080:5a0a:60c7::7/0 tos 0 scope 0 flags 0 ==> dev eth2 gw 2409:8080:5a0a:60c7::7 err 0
       ip 59608 [002]  5248.054422: fib6:fib6_table_lookup: table 255 oif 4 iif 0 proto 0 ::/0 -> 2409:8080:5a0a:60c7::7/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
       ip 59608 [002]  5248.054423: fib6:fib6_table_lookup: table 254 oif 4 iif 0 proto 0 ::/0 -> 2409:8080:5a0a:60c7::7/0 tos 0 scope 0 flags 0 ==> dev eth2 gw 2409:8080:5a0a:60c7::7 err 0
  swapper     0 [001]  5248.083555: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 fe80::5054:ff:fec6:b788/0 -> ff02::1:ffc6:b788/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5248.083555: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 fe80::5054:ff:fec6:b788/0 -> ff02::1:ffc6:b788/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5248.102781: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 58 ff02::16/0 -> fe80::5054:ff:fed0:af21/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5248.102788: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 58 ff02::16/0 -> fe80::5054:ff:fed0:af21/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5248.102793: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 0 fe80::5054:ff:fed0:af21/0 -> ff02::16/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5248.102801: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 58 ff02::16/0 -> fe80::5054:ff:fed0:af21/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [002]  5248.102805: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 58 ff02::16/0 -> fe80::5054:ff:fed0:af21/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [002]  5248.119317: fib6:fib6_table_lookup: table 255 oif 0 iif 3 proto 58 33:33::fe:1b2b/0 -> ff02::1:ff07:3b36/0 tos 0 scope 0 flags 0 ==> dev eth1 gw :: err 0
  swapper     0 [001]  5248.119424: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 58 33:33::fe:1b2b/0 -> ff02::1:ff07:3b36/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5248.140988: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:feea:2acb/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5248.140994: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:feea:2acb/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [001]  5248.140999: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 17 fe80::5054:ff:feea:2acb/0 -> ff02::fb/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5248.141018: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:feea:2acb/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [002]  5248.141021: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:feea:2acb/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5248.141998: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe19:9964/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5248.142003: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe19:9964/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5248.142006: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe19:9964/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5248.142006: fib6:fib6_table_lookup: table 255 oif 0 iif 4 proto 17 fe80::5054:ff:fe19:9964/0 -> ff02::fb/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0
  swapper     0 [002]  5248.142009: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 17 ff02::fb/0 -> fe80::5054:ff:fe19:9964/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
systemctl 59624 [002]  5248.165214: fib6:fib6_table_lookup: table 255 oif 3 iif 1 proto 58 ff02::16/0 -> fe80::6390:1eeb:fded:e180/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5248.165214: fib6:fib6_table_lookup: table 255 oif 4 iif 1 proto 58 ff02::16/0 -> fe80::6390:1eeb:fded:e180/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
systemctl 59624 [002]  5248.165217: fib6:fib6_table_lookup: table 254 oif 3 iif 1 proto 58 ff02::16/0 -> fe80::6390:1eeb:fded:e180/0 tos 0 scope 0 flags 0 ==> dev lo gw :: err -113
  swapper     0 [001]  5248.165219: fib6:fib6_table_lookup: table 254 oif 4 iif 1 proto 58 ff02::16/0 -> fe80::6390:1eeb:fded:e180/0 tos 0 scope 0 flags 0 ==> dev eth2 gw :: err 0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ