diff options
-rw-r--r-- | hwdb/60-sensor.hwdb | 6 | ||||
-rwxr-xr-x | semaphoreci/semaphore-runner.sh | 2 | ||||
-rw-r--r-- | test/test-network/conf/dhcp-client-use-routes-no.network | 18 | ||||
-rwxr-xr-x | test/test-network/systemd-networkd-tests.py | 33 | ||||
-rw-r--r-- | units/systemd-portabled.service.in | 1 |
5 files changed, 59 insertions, 1 deletions
diff --git a/hwdb/60-sensor.hwdb b/hwdb/60-sensor.hwdb index c12cf115c0..df7ad251d0 100644 --- a/hwdb/60-sensor.hwdb +++ b/hwdb/60-sensor.hwdb @@ -288,6 +288,12 @@ sensor:modalias:acpi:BMA250*:dmi:*:bvritWORKS.G.WI71C.JGBMRB*:*:svnInsyde:pni71c ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1 ######################################### +# Irbis TW90 +######################################### +sensor:modalias:acpi:BOSC0200*:dmi:*:svnIRBIS:pnTW90:* + ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1 + +######################################### # iOTA 360 ######################################### sensor:modalias:acpi:KIOX000A*:dmi:*svn*iOTA*:*pn*IOTA2210* diff --git a/semaphoreci/semaphore-runner.sh b/semaphoreci/semaphore-runner.sh index 1951dcbbad..41454b474a 100755 --- a/semaphoreci/semaphore-runner.sh +++ b/semaphoreci/semaphore-runner.sh @@ -34,7 +34,7 @@ create_container() { sed 's/^deb/deb-src/' /etc/apt/sources.list >> /etc/apt/sources.list.d/sources.list # wait until online while [ -z "\$(ip route list 0/0)" ]; do sleep 1; done -apt-get -q update +apt-get -q --allow-releaseinfo-change update apt-get -y dist-upgrade apt-get install -y eatmydata EOF diff --git a/test/test-network/conf/dhcp-client-use-routes-no.network b/test/test-network/conf/dhcp-client-use-routes-no.network new file mode 100644 index 0000000000..0c97ef5d8a --- /dev/null +++ b/test/test-network/conf/dhcp-client-use-routes-no.network @@ -0,0 +1,18 @@ +[Match] +Name=veth99 + +[Network] +DHCP=ipv4 +IPv6AcceptRA=no + +[Route] +Destination=192.168.5.0/24 + +[Route] +Destination=192.168.6.0/24 + +[Route] +Destination=192.168.7.0/24 + +[DHCP] +UseRoutes=no diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index fb91b2f897..92f1a5bd8d 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -2119,6 +2119,7 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities): 'dhcp-client-listen-port.network', 'dhcp-client-route-metric.network', 'dhcp-client-route-table.network', + 'dhcp-client-use-routes-no.network', 'dhcp-client-vrf.network', 'dhcp-client-with-ipv4ll-fallback-with-dhcp-server.network', 'dhcp-client-with-ipv4ll-fallback-without-dhcp-server.network', @@ -2316,6 +2317,38 @@ class NetworkdDHCPClientTests(unittest.TestCase, Utilities): print(output) self.assertRegex(output, 'metric 24') + def test_dhcp_client_use_routes_no(self): + copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-server-veth-peer.network', + 'dhcp-client-use-routes-no.network') + start_networkd() + wait_online(['veth-peer:carrier']) + start_dnsmasq(lease_time='2m') + wait_online(['veth99:routable', 'veth-peer:routable']) + + output = check_output('ip address show dev veth99 scope global') + print(output) + self.assertRegex(output, r'inet 192.168.5.[0-9]*/24 brd 192.168.5.255 scope global dynamic veth99') + + output = check_output('ip route show dev veth99') + print(output) + self.assertRegex(output, r'192.168.5.0/24 proto kernel scope link src 192.168.5.[0-9]*') + self.assertRegex(output, r'192.168.5.0/24 proto static') + self.assertRegex(output, r'192.168.6.0/24 proto static') + self.assertRegex(output, r'192.168.7.0/24 proto static') + + # Sleep for 120 sec as the dnsmasq minimum lease time can only be set to 120 + print('Wait for the dynamic address to be renewed') + time.sleep(125) + + wait_online(['veth99:routable']) + + output = check_output('ip route show dev veth99') + print(output) + self.assertRegex(output, r'192.168.5.0/24 proto kernel scope link src 192.168.5.[0-9]*') + self.assertRegex(output, r'192.168.5.0/24 proto static') + self.assertRegex(output, r'192.168.6.0/24 proto static') + self.assertRegex(output, r'192.168.7.0/24 proto static') + def test_dhcp_keep_configuration_dhcp(self): copy_unit_to_networkd_unit_path('25-veth.netdev', 'dhcp-v4-server-veth-peer.network', 'dhcp-client-keep-configuration-dhcp.network') start_networkd() diff --git a/units/systemd-portabled.service.in b/units/systemd-portabled.service.in index a8eab94d02..c88d3597b7 100644 --- a/units/systemd-portabled.service.in +++ b/units/systemd-portabled.service.in @@ -22,6 +22,7 @@ ProtectHostname=yes RestrictRealtime=yes RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6 SystemCallFilter=@system-service @mount +SystemCallErrorNumber=EPERM SystemCallArchitectures=native LockPersonality=yes IPAddressDeny=any |