diff mbox series

[15/15] autotests: In testNetconfig verify routes from RIOs

Message ID 20220616000231.1966008-15-andrew.zaborowski@intel.com (mailing list archive)
State Accepted, archived
Headers show
Series [01/15] netconfig: Fix address format validation | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

Andrew Zaborowski June 16, 2022, 12:02 a.m. UTC
Verify that IWD with NetworkConfigurationEnabled creates the off-link
routes for Route Information Options in the Router Advertisements.
Sending this last because these options are not supported by current
netconfig code and the test should fail without the l_netconfig patch.
---
 autotests/testNetconfig/connection_test.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Denis Kenzior June 22, 2022, 11:36 p.m. UTC | #1
Hi Andrew,

On 6/15/22 19:02, Andrew Zaborowski wrote:
> Verify that IWD with NetworkConfigurationEnabled creates the off-link
> routes for Route Information Options in the Router Advertisements.
> Sending this last because these options are not supported by current
> netconfig code and the test should fail without the l_netconfig patch.

So is this true?  Didn't ell commit:
9c5cbf5484b2 ("icmp6: Parse extra options") add off-link route setting directly 
to l_icmp6?  Shouldn't this work with the current (upstream) netconfig 
implementation?

Regards,
-Denis
Andrew Zaborowski June 23, 2022, 12:34 a.m. UTC | #2
Hi Denis,

On Thu, 23 Jun 2022 at 01:52, Denis Kenzior <denkenz@gmail.com> wrote:
> On 6/15/22 19:02, Andrew Zaborowski wrote:
> > Verify that IWD with NetworkConfigurationEnabled creates the off-link
> > routes for Route Information Options in the Router Advertisements.
> > Sending this last because these options are not supported by current
> > netconfig code and the test should fail without the l_netconfig patch.
>
> So is this true?  Didn't ell commit:
> 9c5cbf5484b2 ("icmp6: Parse extra options") add off-link route setting directly
> to l_icmp6?  Shouldn't this work with the current (upstream) netconfig
> implementation?

True, looking at the code this should work together with the
l_icmp6_client_set_rtnl().

Best regards
Denis Kenzior June 27, 2022, 6:12 p.m. UTC | #3
Hi Andrew,

On 6/15/22 19:02, Andrew Zaborowski wrote:
> Verify that IWD with NetworkConfigurationEnabled creates the off-link
> routes for Route Information Options in the Router Advertisements.
> Sending this last because these options are not supported by current
> netconfig code and the test should fail without the l_netconfig patch.
> ---
>   autotests/testNetconfig/connection_test.py | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 

I went ahead and applied this patch with a slight amendment of the commit 
description.

Regards,
-Denis
diff mbox series

Patch

diff --git a/autotests/testNetconfig/connection_test.py b/autotests/testNetconfig/connection_test.py
index 837b19ec..9c1d2efa 100644
--- a/autotests/testNetconfig/connection_test.py
+++ b/autotests/testNetconfig/connection_test.py
@@ -72,6 +72,15 @@  class Test(unittest.TestCase):
                 # On-link prefix
                 testutil.RouteInfo(dst=socket.inet_pton(socket.AF_INET6, '3ffe:501:ffff:100::'), plen=72,
                     flags=1, ifname=ifname),
+                # Router for an off-link prefix, medium preference
+                testutil.RouteInfo(dst=socket.inet_pton(socket.AF_INET6, '3ffe:501:ffff:300::'), plen=64,
+                    gw=router_ll_addr, flags=3, ifname=ifname),
+                # Router for an off-link prefix, high preference
+                testutil.RouteInfo(dst=socket.inet_pton(socket.AF_INET6, '3ffe:501:ffff:400::'), plen=65,
+                    gw=router_ll_addr, flags=3, ifname=ifname),
+                # Router for an off-link prefix, low preference
+                testutil.RouteInfo(dst=socket.inet_pton(socket.AF_INET6, '3ffe:501:ffff:500::'), plen=66,
+                    gw=router_ll_addr, flags=3, ifname=ifname)
             }
         self.maxDiff = None
         self.assertEqual(expected_routes4, set(testutil.get_routes4(ifname)))
@@ -166,6 +175,9 @@  class Test(unittest.TestCase):
             AdvSendAdvert on;
             AdvManagedFlag on;
             prefix 3ffe:501:ffff:100::/72 { AdvAutonomous off; };
+            route 3ffe:501:ffff:300::/64 {};
+            route 3ffe:501:ffff:400::/65 { AdvRoutePreference low; };
+            route 3ffe:501:ffff:500::/66 { AdvRoutePreference high; };
             };''')
         config.close()
         cls.radvd_pid = ctx.start_process(['radvd', '-n', '-d5', '-p', '/tmp/radvd.pid', '-C', '/tmp/radvd.conf'])