IPv6AcceptRA=yes
[IPv6AcceptRA]
-# PrefixDenyList= and RouteDenyList= will be ignored.
-PrefixAllowList=2001:db8:0:1:: 2001:db8:0:1::
-PrefixDenyList=2001:db8:0:1:: 2001:db8:0:1::
-RouteAllowList=2001:db0:fff:: 2001:db0:fff::
-RouteDenyList=2001:db0:fff:: 2001:db0:fff::
+# PrefixDenyList= will be ignored.
+PrefixAllowList=2001:db8:0:1:: 2001:db8:0:1:: 2001:db8:0:1::/64
+PrefixDenyList=2001:db8:0:1::/64 2001:db8:0:1:: 2001:db8:0:3::/64
+RouteDenyList=2001:db1:fff::/64 2001:db1:fff:: 2001:db2:fff::/64
UseDomains=yes
'25-veth.netdev',
'25-vrf.netdev',
'25-vrf.network',
+ 'dhcp-client-allow-list.network',
'dhcp-client-anonymize.network',
'dhcp-client-decline.network',
'dhcp-client-gateway-ipv4.network',
print(output)
self.assertRegex(output, 'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global dynamic veth99')
+ def test_dhcp_client_allow_list(self):
+ copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-server-decline.network', 'dhcp-client-allow-list.network')
+
+ start_networkd()
+ self.wait_online(['veth99:routable', 'veth-peer:routable'])
+
+ output = check_output('ip -4 address show dev veth99 scope global dynamic')
+ print(output)
+ self.assertRegex(output, 'inet 192.168.5.[0-9]*/24 metric 1024 brd 192.168.5.255 scope global dynamic veth99')
+
class NetworkdIPv6PrefixTests(unittest.TestCase, Utilities):
links = [
'dummy98',
print(output)
self.assertIn('inet6 2001:db8:0:1:', output)
self.assertNotIn('inet6 2001:db8:0:2:', output)
+ self.assertNotIn('inet6 2001:db8:0:3:', output)
output = check_output('ip -6 route show dev veth-peer')
print(output)
self.assertIn('2001:db8:0:1::/64 proto ra', output)
self.assertNotIn('2001:db8:0:2::/64 proto ra', output)
+ self.assertNotIn('2001:db8:0:3::/64 proto ra', output)
self.assertIn('2001:db0:fff::/64 via ', output)
self.assertNotIn('2001:db1:fff::/64 via ', output)
+ self.assertNotIn('2001:db2:fff::/64 via ', output)
output = check_output('ip address show dev veth99')
print(output)
self.assertNotIn('inet6 2001:db8:0:1:', output)
self.assertIn('inet6 2001:db8:0:2:', output)
+ self.assertNotIn('inet6 2001:db8:0:3:', output)
output = check_output(*resolvectl_cmd, 'dns', 'veth-peer', env=env)
print(output)