mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-20 11:40:14 +01:00
Compare commits
535 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a31a644f8b | ||
|
|
a45163b131 | ||
|
|
de1fcdcc72 | ||
|
|
a2d147366c | ||
|
|
427a7cf257 | ||
|
|
3a4e18e302 | ||
|
|
8e0825f9cd | ||
|
|
df8288de7f | ||
|
|
118475d571 | ||
|
|
599cc1ed1d | ||
|
|
1756ec54e3 | ||
|
|
1a52bbe7c9 | ||
|
|
57eb4a5bc6 | ||
|
|
10db4baeb6 | ||
|
|
8d8edda3f4 | ||
|
|
e85cc46d0b | ||
|
|
a1928b4459 | ||
|
|
9703305122 | ||
|
|
932b85f7e7 | ||
|
|
4e26403c4a | ||
|
|
bd2484d1a9 | ||
|
|
41e28b900f | ||
|
|
6c1e04fc61 | ||
|
|
2739850b78 | ||
|
|
d8f143f601 | ||
|
|
39143f8bdd | ||
|
|
0b75d905e5 | ||
|
|
13bfa44ceb | ||
|
|
dad4da06b1 | ||
|
|
0b61924048 | ||
|
|
d40e88fd02 | ||
|
|
8e72e6b4fb | ||
|
|
9e70f31c8c | ||
|
|
ac427b25fb | ||
|
|
754b87e1c4 | ||
|
|
5f6beb0e57 | ||
|
|
487ca30256 | ||
|
|
a07961cfbe | ||
|
|
4e7e159224 | ||
|
|
ae134ca9f4 | ||
|
|
55f96057c6 | ||
|
|
de0a37b248 | ||
|
|
7315e7e0ee | ||
|
|
bcb96a1b19 | ||
|
|
561fff3c8d | ||
|
|
a9f2c15663 | ||
|
|
8a9b17071b | ||
|
|
c1519bd514 | ||
|
|
8b5a61458b | ||
|
|
9e01443b14 | ||
|
|
78519589b9 | ||
|
|
771f86105e | ||
|
|
b3f9f52505 | ||
|
|
b41a5ec2d4 | ||
|
|
636fb5ef24 | ||
|
|
d006d61aa1 | ||
|
|
6e2de1d2b3 | ||
|
|
4afa00874f | ||
|
|
3ce1da1fd2 | ||
|
|
8caa781270 | ||
|
|
2b03057de0 | ||
|
|
3b10b88290 | ||
|
|
d687768c61 | ||
|
|
239b0fbbc9 | ||
|
|
29d523391a | ||
|
|
f4bf54ca93 | ||
|
|
22631d557a | ||
|
|
ff0c4346fc | ||
|
|
5f85b55f7f | ||
|
|
461c9edfb4 | ||
|
|
306f9c490b | ||
|
|
441e77a44c | ||
|
|
caf156b2ac | ||
|
|
ed43e4b602 | ||
|
|
384dd7d5f2 | ||
|
|
e06aaba1ca | ||
|
|
32cbf4c629 | ||
|
|
8faa33b9d4 | ||
|
|
d58d0a793e | ||
|
|
f2a2e49d07 | ||
|
|
b4e8edbc8a | ||
|
|
6dd07a80e5 | ||
|
|
04ddd72ce9 | ||
|
|
58f46a6d11 | ||
|
|
427137d6da | ||
|
|
b1614ffb90 | ||
|
|
8d33aaa5b6 | ||
|
|
191ebb439a | ||
|
|
2f35c94628 | ||
|
|
3a769bca67 | ||
|
|
0530af60b3 | ||
|
|
a0482a4e35 | ||
|
|
0e121f5658 | ||
|
|
2d438ebef8 | ||
|
|
c312390932 | ||
|
|
d06fd85e57 | ||
|
|
2a63c33712 | ||
|
|
ce26d85ad1 | ||
|
|
1e81aaa153 | ||
|
|
c1baf09bf9 | ||
|
|
247000deed | ||
|
|
e5ae988603 | ||
|
|
03791e8b2d | ||
|
|
965aa81027 | ||
|
|
86b67233bf | ||
|
|
a148232789 | ||
|
|
2bc895c0e9 | ||
|
|
c6a6801b1e | ||
|
|
46306c1be0 | ||
|
|
1dcd63ab5d | ||
|
|
029f8be4c1 | ||
|
|
e6a31264c1 | ||
|
|
86ea2c5963 | ||
|
|
93491d76ec | ||
|
|
b271e0a051 | ||
|
|
f0f4d0dba0 | ||
|
|
4e10b1e6ab | ||
|
|
52d08008b7 | ||
|
|
92aeed1f5c | ||
|
|
018c5722ee | ||
|
|
bf8b38618a | ||
|
|
17efec8b06 | ||
|
|
69d0fb161e | ||
|
|
59c65bc859 | ||
|
|
a46827f899 | ||
|
|
6801ce4927 | ||
|
|
6e32a8e821 | ||
|
|
13d7469ba0 | ||
|
|
820e56c5df | ||
|
|
c27caec33d | ||
|
|
0b99629278 | ||
|
|
9a2395c779 | ||
|
|
ddb31034f9 | ||
|
|
9e0551aefd | ||
|
|
dbec15eb8d | ||
|
|
48fc40e1ca | ||
|
|
f6d6a7e2eb | ||
|
|
3355ba9380 | ||
|
|
c36e0bedeb | ||
|
|
e570498fbf | ||
|
|
40aa27690c | ||
|
|
f472111e58 | ||
|
|
4a46f454da | ||
|
|
7fb4724efa | ||
|
|
1cba0a3cca | ||
|
|
294131a2a4 | ||
|
|
05efc6e253 | ||
|
|
9c48bae3b2 | ||
|
|
1789a5b338 | ||
|
|
0d3fef3bcd | ||
|
|
4d17064f2a | ||
|
|
86c7f1ed14 | ||
|
|
d8971cceed | ||
|
|
d3e4f3344e | ||
|
|
1504d12714 | ||
|
|
5677114e7c | ||
|
|
13d8cda04e | ||
|
|
6e67c830fb | ||
|
|
5aafede823 | ||
|
|
57ea2cf612 | ||
|
|
d559f61423 | ||
|
|
5ad712974e | ||
|
|
0ac63a4197 | ||
|
|
fcf9b60cc2 | ||
|
|
7c0510ba0b | ||
|
|
26ac482f1c | ||
|
|
6c84a19eb2 | ||
|
|
e5884cfb18 | ||
|
|
7242c478a1 | ||
|
|
d39179bee4 | ||
|
|
3904135150 | ||
|
|
0b03614b68 | ||
|
|
8b26cb35ee | ||
|
|
96be0cf049 | ||
|
|
b0b72dd2f1 | ||
|
|
3266203bf1 | ||
|
|
21bbe24fee | ||
|
|
dce149352d | ||
|
|
592a4f077b | ||
|
|
6304d51440 | ||
|
|
0c1fba5c95 | ||
|
|
933ddab90f | ||
|
|
f5c5bcc99d | ||
|
|
7b4d0ef9f2 | ||
|
|
79ffe55686 | ||
|
|
94d7dd9b11 | ||
|
|
29390b053d | ||
|
|
bbe0e9d8c2 | ||
|
|
4ba3ffee67 | ||
|
|
588a69cd1b | ||
|
|
11da867072 | ||
|
|
9f76e11a75 | ||
|
|
d62c25ef2f | ||
|
|
e1a7d5ac06 | ||
|
|
600c5452bf | ||
|
|
7562b0e5f9 | ||
|
|
37dbdd3199 | ||
|
|
4baacfd09d | ||
|
|
a386912ddb | ||
|
|
1194528b27 | ||
|
|
84c7533760 | ||
|
|
43058de07a | ||
|
|
ca7d42cd7a | ||
|
|
2e963061cb | ||
|
|
8ae10b4148 | ||
|
|
f78dca964f | ||
|
|
6b01ae3f15 | ||
|
|
976c5dbb5f | ||
|
|
e56bc740d0 | ||
|
|
12e033368f | ||
|
|
f4c5ded09b | ||
|
|
ce40c72812 | ||
|
|
85edac5d7c | ||
|
|
a909c6f611 | ||
|
|
9cddd7c0a4 | ||
|
|
051c2f8ea1 | ||
|
|
d34d564bb4 | ||
|
|
cbe5da4fd4 | ||
|
|
a509efdbab | ||
|
|
2478dca1a1 | ||
|
|
60e7bb86b8 | ||
|
|
7eaa10fe10 | ||
|
|
4deee49763 | ||
|
|
93ed7a2c38 | ||
|
|
ec996135a9 | ||
|
|
012f1cbfac | ||
|
|
394f6281ea | ||
|
|
e4f321c307 | ||
|
|
c647c060d6 | ||
|
|
956f9ba365 | ||
|
|
4e986fcbe3 | ||
|
|
4938507de8 | ||
|
|
3c8c0364a4 | ||
|
|
eb0a41ce1f | ||
|
|
127f73a5c2 | ||
|
|
407d753a5a | ||
|
|
b019883a9a | ||
|
|
b4a22ad2a9 | ||
|
|
bd41951f1d | ||
|
|
261fa8db33 | ||
|
|
bf79fbd678 | ||
|
|
f655cd1cba | ||
|
|
c3c7fda42d | ||
|
|
f584524197 | ||
|
|
d16a62da2b | ||
|
|
74cf2a2bd8 | ||
|
|
c983e3bbf5 | ||
|
|
eb7917a387 | ||
|
|
b45d5f41dd | ||
|
|
fdb8f07c44 | ||
|
|
104cafdd44 | ||
|
|
f4f1ecc7ea | ||
|
|
fa80896ee7 | ||
|
|
b58a37acfe | ||
|
|
16ef33d380 | ||
|
|
7d23ed9f73 | ||
|
|
d017dc67b4 | ||
|
|
a9d7abbc50 | ||
|
|
43f738473c | ||
|
|
50a400e16f | ||
|
|
ce17284c3f | ||
|
|
20a1d7e816 | ||
|
|
1229fe5abd | ||
|
|
404a3ec853 | ||
|
|
62558d50be | ||
|
|
55765d2914 | ||
|
|
253800238e | ||
|
|
45ab9d96f1 | ||
|
|
326fb8f9cf | ||
|
|
eff8471de4 | ||
|
|
959ddec2a4 | ||
|
|
a9b66e254c | ||
|
|
9bbb113987 | ||
|
|
2de6391f4b | ||
|
|
a39fa7ee6c | ||
|
|
3cba4f2627 | ||
|
|
cc5306e1d0 | ||
|
|
6eeab380fa | ||
|
|
37c0e0860e | ||
|
|
9e599f07b0 | ||
|
|
165e5df6e0 | ||
|
|
7c03b3050e | ||
|
|
25a5fd7503 | ||
|
|
9913763185 | ||
|
|
8e40f7e289 | ||
|
|
ea6af6d806 | ||
|
|
9de9fd85a6 | ||
|
|
4a727bfae0 | ||
|
|
5ab04c8f56 | ||
|
|
7bb898fa12 | ||
|
|
9b4569bd94 | ||
|
|
24ab3308fe | ||
|
|
00257a9cf7 | ||
|
|
9c70a43775 | ||
|
|
2ffaebd4ae | ||
|
|
84299ed17c | ||
|
|
6a13e8d369 | ||
|
|
246761a89e | ||
|
|
f550cbd547 | ||
|
|
ddfc2696e3 | ||
|
|
c88d75ac6a | ||
|
|
8a5e7014d6 | ||
|
|
aeadb9f6af | ||
|
|
e26e965134 | ||
|
|
dd0ca122e3 | ||
|
|
c1d94d7081 | ||
|
|
a78f8bbe1b | ||
|
|
9f510533f1 | ||
|
|
77c99b61c0 | ||
|
|
fcc5352715 | ||
|
|
1253cbad5a | ||
|
|
1c1f31fdd4 | ||
|
|
dd7f9fdf8e | ||
|
|
82692cc75c | ||
|
|
a4ee55468f | ||
|
|
3588c48686 | ||
|
|
6f219aa649 | ||
|
|
c70b4a98a3 | ||
|
|
eb0a22a162 | ||
|
|
7212d8b8e9 | ||
|
|
cceec45089 | ||
|
|
b4dde691ec | ||
|
|
f13aca1aba | ||
|
|
9abe5658cc | ||
|
|
46e0d2b4e4 | ||
|
|
b678ceab9f | ||
|
|
b00c6749d7 | ||
|
|
eac9f828e8 | ||
|
|
4be97207ed | ||
|
|
6a4e6fab40 | ||
|
|
b17a842e1a | ||
|
|
fe62ce6a4b | ||
|
|
a11760ef39 | ||
|
|
f656675b57 | ||
|
|
ee078be745 | ||
|
|
897eed184a | ||
|
|
872e626342 | ||
|
|
20a660110b | ||
|
|
7ee8d84a1e | ||
|
|
dcf4bc9241 | ||
|
|
f680f23cba | ||
|
|
5ef3cfa4d0 | ||
|
|
4ec06e1eaa | ||
|
|
75b3f8496b | ||
|
|
ccd9431e82 | ||
|
|
43bcfbcdf5 | ||
|
|
dd7252ff0c | ||
|
|
c1350f40bd | ||
|
|
fd3eccfb16 | ||
|
|
3ae6505d7d | ||
|
|
892e816a9d | ||
|
|
94595332c4 | ||
|
|
34255b2692 | ||
|
|
6f6bb17a28 | ||
|
|
aeaf8ca23c | ||
|
|
9e585b6cdc | ||
|
|
bcbe386823 | ||
|
|
3d1b55047b | ||
|
|
26d4bc9d32 | ||
|
|
5b25bc4f9d | ||
|
|
799a7a432a | ||
|
|
6f1437b79e | ||
|
|
64a4c2271a | ||
|
|
f67ec0ddf4 | ||
|
|
4f849c74b5 | ||
|
|
d26714481d | ||
|
|
39b38e5905 | ||
|
|
32ab60f960 | ||
|
|
4f577d677f | ||
|
|
e8e0d43f04 | ||
|
|
476c89b6f2 | ||
|
|
78a4e5cf3b | ||
|
|
0d10c743a5 | ||
|
|
ec917dc670 | ||
|
|
f0d6b339bf | ||
|
|
81839c0da8 | ||
|
|
d38cbfb3d1 | ||
|
|
8b7c6f8b90 | ||
|
|
1cb0635d08 | ||
|
|
03f30ac5cf | ||
|
|
92c776a88d | ||
|
|
104be9da87 | ||
|
|
e22de07553 | ||
|
|
c7fc8a4d09 | ||
|
|
87453425ef | ||
|
|
e41558e08c | ||
|
|
7b2924b762 | ||
|
|
3fb86182eb | ||
|
|
250475c0fd | ||
|
|
3580dfe517 | ||
|
|
62c841afcf | ||
|
|
79ba228c59 | ||
|
|
e8a3cd611e | ||
|
|
88efe48916 | ||
|
|
37785a57e0 | ||
|
|
a3dd1ef2c7 | ||
|
|
dc9bf255ee | ||
|
|
b62a0ae7b3 | ||
|
|
de56b482f3 | ||
|
|
2953200a65 | ||
|
|
f489d213f2 | ||
|
|
b571e2be5a | ||
|
|
ec6d122cc9 | ||
|
|
065fd3e046 | ||
|
|
6478e5158a | ||
|
|
2b922a93a5 | ||
|
|
14106431fb | ||
|
|
37d8945b13 | ||
|
|
26f2673b90 | ||
|
|
9f6562869b | ||
|
|
87a5d89f75 | ||
|
|
6a133d10a1 | ||
|
|
bb850fda0e | ||
|
|
fcf304bbf1 | ||
|
|
163c2574d8 | ||
|
|
fe0b6ad68c | ||
|
|
cb7157f552 | ||
|
|
c42322bd0d | ||
|
|
39db524d94 | ||
|
|
79b1877c02 | ||
|
|
548e27ef5f | ||
|
|
0540b3c9bc | ||
|
|
93960639e8 | ||
|
|
9895540a24 | ||
|
|
961be7d971 | ||
|
|
95b9b4b678 | ||
|
|
9edfc0438c | ||
|
|
ae7de5b353 | ||
|
|
42edb37499 | ||
|
|
cc0222ba01 | ||
|
|
7ab3f0999f | ||
|
|
a4401ae0a6 | ||
|
|
245f0e0b35 | ||
|
|
cbdd0d9cca | ||
|
|
355edef8b5 | ||
|
|
b6386b3d27 | ||
|
|
b372caf0c4 | ||
|
|
4a8bedcd89 | ||
|
|
037b14965e | ||
|
|
dbc4ff0a1d | ||
|
|
4ed1d04aff | ||
|
|
0e4330f2b4 | ||
|
|
4b572a1a4a | ||
|
|
ba86c208e0 | ||
|
|
40ddff9cc9 | ||
|
|
2ad5fbf025 | ||
|
|
a8a2e6d727 | ||
|
|
5e17b52810 | ||
|
|
2106251e46 | ||
|
|
18d5b7d641 | ||
|
|
a769c17af7 | ||
|
|
db557908a2 | ||
|
|
0f469b30ad | ||
|
|
10c2892d57 | ||
|
|
e39e119636 | ||
|
|
3aa6e689ec | ||
|
|
7f381c9d68 | ||
|
|
12eff9a7fd | ||
|
|
ecce8fa461 | ||
|
|
ba0474ef06 | ||
|
|
b5c81a9070 | ||
|
|
0e83c595f3 | ||
|
|
898db303c3 | ||
|
|
10e58f7c3c | ||
|
|
a98d85af93 | ||
|
|
5ed963e054 | ||
|
|
481afec6ea | ||
|
|
ea0be49451 | ||
|
|
eb24d7cf03 | ||
|
|
c01168f4f9 | ||
|
|
e51de3750e | ||
|
|
050f4e6500 | ||
|
|
b68d25af9b | ||
|
|
23e42cb73a | ||
|
|
95de3bee86 | ||
|
|
45e7e158c1 | ||
|
|
78f179b53e | ||
|
|
8b8fc44b19 | ||
|
|
1fdcfb7abe | ||
|
|
0d76bec4de | ||
|
|
a0ff8d20f0 | ||
|
|
7ba27f7a13 | ||
|
|
4ad20787bb | ||
|
|
42349205dd | ||
|
|
b281ae0c22 | ||
|
|
63b81d893e | ||
|
|
152d71a1f1 | ||
|
|
21c46d6e5f | ||
|
|
6292b0c9dc | ||
|
|
dc51ffe857 | ||
|
|
a60ca31fd9 | ||
|
|
91e36ea214 | ||
|
|
bf1a8ce5d4 | ||
|
|
90c403f4ef | ||
|
|
4a8e672506 | ||
|
|
70872cbb38 | ||
|
|
7eee669217 | ||
|
|
6cedd594b6 | ||
|
|
5c3efeef15 | ||
|
|
11045cfa00 | ||
|
|
45d82f720c | ||
|
|
1b4372a9be | ||
|
|
8640ea822f | ||
|
|
a90efe91ad | ||
|
|
cafb841a29 | ||
|
|
979717df4e | ||
|
|
39efc8a394 | ||
|
|
e2aa19a06c | ||
|
|
054962aeea | ||
|
|
aea231f489 | ||
|
|
8f2f86e0f0 | ||
|
|
af8b74ab2a | ||
|
|
26a5eb0d98 | ||
|
|
14a521ac9b | ||
|
|
472a7b48e8 | ||
|
|
227cd6307b | ||
|
|
6bf859af79 | ||
|
|
b6e67c6abc | ||
|
|
a7cf9d399f | ||
|
|
2ee54e66c3 | ||
|
|
1463b1c0a3 | ||
|
|
5aafbb9bf8 | ||
|
|
4f6a057a09 | ||
|
|
462b4172b2 | ||
|
|
af6aca3527 | ||
|
|
42b95fad79 | ||
|
|
e983e8a46f | ||
|
|
077ffcc0ea | ||
|
|
a1c05d2ce6 | ||
|
|
006a3fb51a | ||
|
|
4d84e6cddf | ||
|
|
2bfd27f74d | ||
|
|
8ff1cbf38b | ||
|
|
7acc66699a | ||
|
|
b2f7f3950d |
459 changed files with 37339 additions and 24093 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -81,9 +81,11 @@ test-*.trs
|
||||||
/data/org.freedesktop.NetworkManager.service
|
/data/org.freedesktop.NetworkManager.service
|
||||||
/data/server.conf
|
/data/server.conf
|
||||||
/data/org.freedesktop.NetworkManager.policy
|
/data/org.freedesktop.NetworkManager.policy
|
||||||
/data/org.freedesktop.NetworkManager.policy.in
|
|
||||||
/data/nm-sudo.service
|
/data/nm-sudo.service
|
||||||
/data/nm-priv-helper.service
|
/data/nm-priv-helper.service
|
||||||
|
/data/NetworkManager-config-initrd.service
|
||||||
|
/data/NetworkManager-initrd.service
|
||||||
|
/data/NetworkManager-wait-online-initrd.service
|
||||||
|
|
||||||
/docs/api/version.xml
|
/docs/api/version.xml
|
||||||
/docs/api/settings-spec.html
|
/docs/api/settings-spec.html
|
||||||
|
|
|
||||||
190
.gitlab-ci.yml
190
.gitlab-ci.yml
|
|
@ -60,11 +60,11 @@ variables:
|
||||||
#
|
#
|
||||||
# This is done by running `ci-fairy generate-template` and possibly bumping
|
# This is done by running `ci-fairy generate-template` and possibly bumping
|
||||||
# ".default_tag".
|
# ".default_tag".
|
||||||
ALPINE_TAG: 'tag-77ec3d923fd6'
|
ALPINE_TAG: 'tag-0c3a6f855fb8'
|
||||||
CENTOS_TAG: 'tag-7a677f4838e1'
|
CENTOS_TAG: 'tag-c1c23df75dda'
|
||||||
DEBIAN_TAG: 'tag-ecad19904683'
|
DEBIAN_TAG: 'tag-d4bf5db9e214'
|
||||||
FEDORA_TAG: 'tag-7a677f4838e1'
|
FEDORA_TAG: 'tag-c1c23df75dda'
|
||||||
UBUNTU_TAG: 'tag-ecad19904683'
|
UBUNTU_TAG: 'tag-d4bf5db9e214'
|
||||||
|
|
||||||
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
|
ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh'
|
||||||
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh'
|
||||||
|
|
@ -102,13 +102,13 @@ variables:
|
||||||
# Build a container for each distribution + version. The ci-templates
|
# Build a container for each distribution + version. The ci-templates
|
||||||
# will re-use the containers if the tag doesn't change.
|
# will re-use the containers if the tag doesn't change.
|
||||||
|
|
||||||
tier1:fedora:41@prep:
|
tier1:fedora:42@prep:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.container-build@fedora
|
- .fdo.container-build@fedora
|
||||||
stage: prep
|
stage: prep
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
FDO_DISTRIBUTION_VERSION: '41'
|
FDO_DISTRIBUTION_VERSION: '42'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
|
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
|
||||||
rules:
|
rules:
|
||||||
|
|
@ -128,6 +128,20 @@ tier2:fedora:rawhide@prep:
|
||||||
when: manual
|
when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
|
tier2:centos:stream10@prep:
|
||||||
|
extends:
|
||||||
|
- .fdo.container-build@centos
|
||||||
|
stage: prep
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
FDO_DISTRIBUTION_VERSION: 'stream10'
|
||||||
|
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||||
|
FDO_DISTRIBUTION_EXEC: $CENTOS_EXEC
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
when: manual
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
tier2:centos:stream9@prep:
|
tier2:centos:stream9@prep:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.container-build@centos
|
- .fdo.container-build@centos
|
||||||
|
|
@ -198,13 +212,13 @@ tier2:alpine:edge@prep:
|
||||||
when: manual
|
when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
tier3:fedora:40@prep:
|
tier3:fedora:43@prep:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.container-build@fedora
|
- .fdo.container-build@fedora
|
||||||
stage: prep
|
stage: prep
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
FDO_DISTRIBUTION_VERSION: '40'
|
FDO_DISTRIBUTION_VERSION: '43'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
|
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
|
||||||
rules:
|
rules:
|
||||||
|
|
@ -212,13 +226,27 @@ tier3:fedora:40@prep:
|
||||||
when: manual
|
when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
tier3:ubuntu:24.10@prep:
|
tier3:fedora:41@prep:
|
||||||
|
extends:
|
||||||
|
- .fdo.container-build@fedora
|
||||||
|
stage: prep
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
FDO_DISTRIBUTION_VERSION: '41'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
|
FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
when: manual
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
|
tier3:ubuntu:25.04@prep:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.container-build@ubuntu
|
- .fdo.container-build@ubuntu
|
||||||
stage: prep
|
stage: prep
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
FDO_DISTRIBUTION_VERSION: '24.10'
|
FDO_DISTRIBUTION_VERSION: '25.04'
|
||||||
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
|
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
|
||||||
FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC
|
FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC
|
||||||
rules:
|
rules:
|
||||||
|
|
@ -254,15 +282,15 @@ tier3:ubuntu:22.04@prep:
|
||||||
when: manual
|
when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
tier3:ubuntu:20.04@prep:
|
tier3:debian:13@prep:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.container-build@ubuntu
|
- .fdo.container-build@debian
|
||||||
stage: prep
|
stage: prep
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
FDO_DISTRIBUTION_VERSION: '20.04'
|
FDO_DISTRIBUTION_VERSION: '13'
|
||||||
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
|
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
|
||||||
FDO_DISTRIBUTION_EXEC: $UBUNTU_EXEC
|
FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
when: manual
|
when: manual
|
||||||
|
|
@ -282,6 +310,20 @@ tier3:debian:12@prep:
|
||||||
when: manual
|
when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
|
tier3:alpine:3.22@prep:
|
||||||
|
extends:
|
||||||
|
- .fdo.container-build@alpine
|
||||||
|
stage: prep
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
FDO_DISTRIBUTION_VERSION: '3.22'
|
||||||
|
FDO_DISTRIBUTION_TAG: $ALPINE_TAG
|
||||||
|
FDO_DISTRIBUTION_EXEC: $ALPINE_EXEC
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
when: manual
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
tier3:alpine:3.21@prep:
|
tier3:alpine:3.21@prep:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.container-build@alpine
|
- .fdo.container-build@alpine
|
||||||
|
|
@ -324,20 +366,6 @@ tier3:alpine:3.19@prep:
|
||||||
when: manual
|
when: manual
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
tier3:alpine:3.18@prep:
|
|
||||||
extends:
|
|
||||||
- .fdo.container-build@alpine
|
|
||||||
stage: prep
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
FDO_DISTRIBUTION_VERSION: '3.18'
|
|
||||||
FDO_DISTRIBUTION_TAG: $ALPINE_TAG
|
|
||||||
FDO_DISTRIBUTION_EXEC: $ALPINE_EXEC
|
|
||||||
rules:
|
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
|
||||||
when: manual
|
|
||||||
allow_failure: true
|
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
# #
|
# #
|
||||||
# tierN stage #
|
# tierN stage #
|
||||||
|
|
@ -354,7 +382,7 @@ tier3:alpine:3.18@prep:
|
||||||
dependencies: []
|
dependencies: []
|
||||||
|
|
||||||
|
|
||||||
t_fedora:41:
|
t_fedora:42:
|
||||||
extends:
|
extends:
|
||||||
- .build@template
|
- .build@template
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
|
|
@ -370,10 +398,10 @@ t_fedora:41:
|
||||||
- tarball
|
- tarball
|
||||||
- subtree
|
- subtree
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: '41'
|
FDO_DISTRIBUTION_VERSION: '42'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
needs:
|
needs:
|
||||||
- "tier1:fedora:41@prep"
|
- "tier1:fedora:42@prep"
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
|
|
@ -391,6 +419,20 @@ t_fedora:rawhide:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
|
t_centos:stream10:
|
||||||
|
extends:
|
||||||
|
- .build@template
|
||||||
|
- .fdo.distribution-image@centos
|
||||||
|
- .nm_artifacts_debug
|
||||||
|
stage: tier2
|
||||||
|
variables:
|
||||||
|
FDO_DISTRIBUTION_VERSION: 'stream10'
|
||||||
|
FDO_DISTRIBUTION_TAG: $CENTOS_TAG
|
||||||
|
needs:
|
||||||
|
- "tier2:centos:stream10@prep"
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
t_centos:stream9:
|
t_centos:stream9:
|
||||||
extends:
|
extends:
|
||||||
- .build@template
|
- .build@template
|
||||||
|
|
@ -461,31 +503,45 @@ t_alpine:edge:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
t_fedora:40:
|
t_fedora:43:
|
||||||
extends:
|
extends:
|
||||||
- .build@template
|
- .build@template
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
- .nm_artifacts_debug
|
- .nm_artifacts_debug
|
||||||
stage: tier3
|
stage: tier3
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: '40'
|
FDO_DISTRIBUTION_VERSION: '43'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
needs:
|
needs:
|
||||||
- "tier3:fedora:40@prep"
|
- "tier3:fedora:43@prep"
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
t_ubuntu:24.10:
|
t_fedora:41:
|
||||||
|
extends:
|
||||||
|
- .build@template
|
||||||
|
- .fdo.distribution-image@fedora
|
||||||
|
- .nm_artifacts_debug
|
||||||
|
stage: tier3
|
||||||
|
variables:
|
||||||
|
FDO_DISTRIBUTION_VERSION: '41'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
|
needs:
|
||||||
|
- "tier3:fedora:41@prep"
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
|
t_ubuntu:25.04:
|
||||||
extends:
|
extends:
|
||||||
- .build@template
|
- .build@template
|
||||||
- .fdo.distribution-image@ubuntu
|
- .fdo.distribution-image@ubuntu
|
||||||
- .nm_artifacts_debug
|
- .nm_artifacts_debug
|
||||||
stage: tier3
|
stage: tier3
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: '24.10'
|
FDO_DISTRIBUTION_VERSION: '25.04'
|
||||||
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
|
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
|
||||||
needs:
|
needs:
|
||||||
- "tier3:ubuntu:24.10@prep"
|
- "tier3:ubuntu:25.04@prep"
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
|
|
@ -517,17 +573,17 @@ t_ubuntu:22.04:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
t_ubuntu:20.04:
|
t_debian:13:
|
||||||
extends:
|
extends:
|
||||||
- .build@template
|
- .build@template
|
||||||
- .fdo.distribution-image@ubuntu
|
- .fdo.distribution-image@debian
|
||||||
- .nm_artifacts_debug
|
- .nm_artifacts_debug
|
||||||
stage: tier3
|
stage: tier3
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: '20.04'
|
FDO_DISTRIBUTION_VERSION: '13'
|
||||||
FDO_DISTRIBUTION_TAG: $UBUNTU_TAG
|
FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
|
||||||
needs:
|
needs:
|
||||||
- "tier3:ubuntu:20.04@prep"
|
- "tier3:debian:13@prep"
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
|
|
@ -545,6 +601,20 @@ t_debian:12:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
|
t_alpine:3.22:
|
||||||
|
extends:
|
||||||
|
- .build@template
|
||||||
|
- .fdo.distribution-image@alpine
|
||||||
|
- .nm_artifacts_debug
|
||||||
|
stage: tier3
|
||||||
|
variables:
|
||||||
|
FDO_DISTRIBUTION_VERSION: '3.22'
|
||||||
|
FDO_DISTRIBUTION_TAG: $ALPINE_TAG
|
||||||
|
needs:
|
||||||
|
- "tier3:alpine:3.22@prep"
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
t_alpine:3.21:
|
t_alpine:3.21:
|
||||||
extends:
|
extends:
|
||||||
- .build@template
|
- .build@template
|
||||||
|
|
@ -587,20 +657,6 @@ t_alpine:3.19:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
|
|
||||||
t_alpine:3.18:
|
|
||||||
extends:
|
|
||||||
- .build@template
|
|
||||||
- .fdo.distribution-image@alpine
|
|
||||||
- .nm_artifacts_debug
|
|
||||||
stage: tier3
|
|
||||||
variables:
|
|
||||||
FDO_DISTRIBUTION_VERSION: '3.18'
|
|
||||||
FDO_DISTRIBUTION_TAG: $ALPINE_TAG
|
|
||||||
needs:
|
|
||||||
- "tier3:alpine:3.18@prep"
|
|
||||||
rules:
|
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
# #
|
# #
|
||||||
# specific jobs #
|
# specific jobs #
|
||||||
|
|
@ -611,10 +667,10 @@ check-patch:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: '41'
|
FDO_DISTRIBUTION_VERSION: '42'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
needs:
|
needs:
|
||||||
- "tier1:fedora:41@prep"
|
- "tier1:fedora:42@prep"
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
- if: $CI_PIPELINE_SOURCE != 'schedule'
|
||||||
stage: tier1
|
stage: tier1
|
||||||
|
|
@ -626,10 +682,10 @@ check-tree:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: '41'
|
FDO_DISTRIBUTION_VERSION: '42'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
needs:
|
needs:
|
||||||
- "tier1:fedora:41@prep"
|
- "tier1:fedora:42@prep"
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
@ -657,11 +713,11 @@ pages:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == 'schedule'
|
- if: $CI_PIPELINE_SOURCE == 'schedule'
|
||||||
when: never
|
when: never
|
||||||
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == 'main'
|
- if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
dependencies:
|
dependencies:
|
||||||
- "t_fedora:41: [meson+gcc+docs+valgrind]"
|
- "t_fedora:42: [meson+gcc+docs+valgrind]"
|
||||||
needs:
|
needs:
|
||||||
- "t_fedora:41: [meson+gcc+docs+valgrind]"
|
- "t_fedora:42: [meson+gcc+docs+valgrind]"
|
||||||
|
|
||||||
triage:issues:
|
triage:issues:
|
||||||
stage: triage
|
stage: triage
|
||||||
|
|
@ -678,11 +734,11 @@ coverity:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: '41'
|
FDO_DISTRIBUTION_VERSION: '42'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
stage: coverity
|
stage: coverity
|
||||||
needs:
|
needs:
|
||||||
- "tier1:fedora:41@prep"
|
- "tier1:fedora:42@prep"
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE_NAME == "weekly"
|
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_PIPELINE_NAME == "weekly"
|
||||||
script:
|
script:
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ pages:
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_PIPELINE_SOURCE == 'schedule'
|
- if: $CI_PIPELINE_SOURCE == 'schedule'
|
||||||
when: never
|
when: never
|
||||||
- if: $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == 'main'
|
- if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||||
dependencies:
|
dependencies:
|
||||||
- "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [meson+gcc+docs+valgrind]"
|
- "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [meson+gcc+docs+valgrind]"
|
||||||
needs:
|
needs:
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ distributions:
|
||||||
- name: fedora
|
- name: fedora
|
||||||
tier: 1
|
tier: 1
|
||||||
versions:
|
versions:
|
||||||
- '41'
|
- '42'
|
||||||
|
|
||||||
# TIER 2: distribution versions that will or might use the current NM version.
|
# TIER 2: distribution versions that will or might use the current NM version.
|
||||||
# Run when doing a release.
|
# Run when doing a release.
|
||||||
|
|
@ -34,6 +34,7 @@ distributions:
|
||||||
- name: centos
|
- name: centos
|
||||||
tier: 2
|
tier: 2
|
||||||
versions:
|
versions:
|
||||||
|
- 'stream10'
|
||||||
- 'stream9'
|
- 'stream9'
|
||||||
- name: ubuntu
|
- name: ubuntu
|
||||||
tier: 2
|
tier: 2
|
||||||
|
|
@ -54,22 +55,23 @@ distributions:
|
||||||
- name: fedora
|
- name: fedora
|
||||||
tier: 3
|
tier: 3
|
||||||
versions:
|
versions:
|
||||||
- '40'
|
- '43'
|
||||||
|
- '41'
|
||||||
- name: ubuntu
|
- name: ubuntu
|
||||||
tier: 3
|
tier: 3
|
||||||
versions:
|
versions:
|
||||||
- '24.10'
|
- '25.04'
|
||||||
- '24.04'
|
- '24.04'
|
||||||
- '22.04'
|
- '22.04'
|
||||||
- '20.04'
|
|
||||||
- name: debian
|
- name: debian
|
||||||
tier: 3
|
tier: 3
|
||||||
versions:
|
versions:
|
||||||
|
- '13'
|
||||||
- '12'
|
- '12'
|
||||||
- name: alpine
|
- name: alpine
|
||||||
tier: 3
|
tier: 3
|
||||||
versions:
|
versions:
|
||||||
|
- '3.22'
|
||||||
- '3.21'
|
- '3.21'
|
||||||
- '3.20'
|
- '3.20'
|
||||||
- '3.19'
|
- '3.19'
|
||||||
- '3.18'
|
|
||||||
|
|
@ -8,18 +8,24 @@ fedora:
|
||||||
- version: rawhide
|
- version: rawhide
|
||||||
support: yes
|
support: yes
|
||||||
nm: main
|
nm: main
|
||||||
|
- version: 43
|
||||||
|
support: 2026-12-02
|
||||||
|
nm: 1.54
|
||||||
|
- version: 42
|
||||||
|
support: 2026-05-13
|
||||||
|
nm: 1.52
|
||||||
|
tier1-default: yes
|
||||||
- version: 41
|
- version: 41
|
||||||
support: 2025-11-19
|
support: 2025-11-19
|
||||||
nm: 1.50
|
nm: 1.50
|
||||||
tier1-default: yes
|
|
||||||
- version: 40
|
|
||||||
support: 2025-05-13
|
|
||||||
nm: 1.46
|
|
||||||
|
|
||||||
# CentOS Stream
|
# CentOS Stream
|
||||||
centos:
|
centos:
|
||||||
|
- version: stream10
|
||||||
|
support: 2030-12-31 # exact date unknown, only the year
|
||||||
|
nm: main
|
||||||
- version: stream9
|
- version: stream9
|
||||||
support: 2027-05-31
|
support: 2027-12-31 # exact date unknown, only the year
|
||||||
nm: main
|
nm: main
|
||||||
|
|
||||||
# RHEL:
|
# RHEL:
|
||||||
|
|
@ -31,33 +37,43 @@ centos:
|
||||||
# support: 6 months
|
# support: 6 months
|
||||||
# Releases and support info: https://access.redhat.com/support/policy/updates/errata
|
# Releases and support info: https://access.redhat.com/support/policy/updates/errata
|
||||||
rhel:
|
rhel:
|
||||||
- version: 9.6 # not released yet
|
# Not released yet
|
||||||
|
- version: 10.1
|
||||||
support: yes
|
support: yes
|
||||||
nm: main
|
nm: 1.54
|
||||||
- version: 9.5
|
- version: 9.7 # not released yet
|
||||||
support: yes
|
support: yes
|
||||||
nm: 1.48
|
nm: 1.54
|
||||||
|
# Full support or EUS support:
|
||||||
|
- version: 10.0
|
||||||
|
support: 2027-05-31
|
||||||
|
extended-support: 2029-05-31
|
||||||
|
nm: 1.52
|
||||||
|
- version: 9.6
|
||||||
|
support: 2027-05-31
|
||||||
|
extended-support: 2029-05-31
|
||||||
|
nm: 1.52
|
||||||
- version: 9.4
|
- version: 9.4
|
||||||
support: 2026-04-30
|
support: 2026-04-30
|
||||||
extended-support: 2028-04-30
|
extended-support: 2028-04-30
|
||||||
nm: 1.46
|
nm: 1.46
|
||||||
- version: 9.2
|
|
||||||
support: 2025-05-31
|
|
||||||
extended-support: 2027-05-31
|
|
||||||
nm: 1.42
|
|
||||||
- version: 8.10 # last RHEL 8 release, maintenaince support only
|
- version: 8.10 # last RHEL 8 release, maintenaince support only
|
||||||
support: 2029-05-31
|
support: 2029-05-31
|
||||||
extended-support: no
|
extended-support: no
|
||||||
nm: 1.40
|
nm: 1.40
|
||||||
- version: 8.8
|
# SAP / Enhaced EUS only:
|
||||||
|
- version: 9.2
|
||||||
support: 2025-05-31
|
support: 2025-05-31
|
||||||
extended-support: 2027-05-31
|
extended-support: 2027-05-31
|
||||||
nm: 1.40
|
nm: 1.42
|
||||||
# SAP / Enhaced EUS only:
|
|
||||||
- version: 9.0
|
- version: 9.0
|
||||||
support: 2024-05-31
|
support: 2024-05-31
|
||||||
extended-support: 2026-05-31
|
extended-support: 2026-05-31
|
||||||
nm: 1.36
|
nm: 1.36
|
||||||
|
- version: 8.8
|
||||||
|
support: 2025-05-31
|
||||||
|
extended-support: 2027-05-31
|
||||||
|
nm: 1.40
|
||||||
- version: 8.6
|
- version: 8.6
|
||||||
support: 2024-05-31
|
support: 2024-05-31
|
||||||
extended-support: 2026-05-31
|
extended-support: 2026-05-31
|
||||||
|
|
@ -77,10 +93,10 @@ ubuntu:
|
||||||
- version: devel
|
- version: devel
|
||||||
support: yes
|
support: yes
|
||||||
nm: main
|
nm: main
|
||||||
- version: 24.10
|
- version: 25.04
|
||||||
name: oracular
|
name: plucky
|
||||||
support: 2025-07-10
|
support: 2026-01-15
|
||||||
nm: 1.48
|
nm: 1.52
|
||||||
- version: 24.04
|
- version: 24.04
|
||||||
name: noble
|
name: noble
|
||||||
support: 2029-05-31
|
support: 2029-05-31
|
||||||
|
|
@ -91,11 +107,6 @@ ubuntu:
|
||||||
support: 2027-06-01
|
support: 2027-06-01
|
||||||
extended-support: 2032-04-21
|
extended-support: 2032-04-21
|
||||||
nm: 1.36
|
nm: 1.36
|
||||||
- version: 20.04
|
|
||||||
name: focal
|
|
||||||
support: 2025-05-29
|
|
||||||
extended-support: 2030-04-23
|
|
||||||
nm: 1.22
|
|
||||||
|
|
||||||
# Debian:
|
# Debian:
|
||||||
# cadence: every 2 years
|
# cadence: every 2 years
|
||||||
|
|
@ -110,6 +121,11 @@ debian:
|
||||||
- version: sid
|
- version: sid
|
||||||
support: yes
|
support: yes
|
||||||
nm: main
|
nm: main
|
||||||
|
- version: 13
|
||||||
|
name: trixie
|
||||||
|
support: 2028-08-09
|
||||||
|
extended-support: 2030-06-30
|
||||||
|
nm: 1.52
|
||||||
- version: 12
|
- version: 12
|
||||||
name: bookworm
|
name: bookworm
|
||||||
support: 2026-06-11
|
support: 2026-06-11
|
||||||
|
|
@ -131,6 +147,9 @@ alpine:
|
||||||
- version: edge
|
- version: edge
|
||||||
support: yes
|
support: yes
|
||||||
nm: main
|
nm: main
|
||||||
|
- version: 3.22
|
||||||
|
support: 2027-05-01
|
||||||
|
nm: 1.52
|
||||||
- version: 3.21
|
- version: 3.21
|
||||||
support: 2026-11-01
|
support: 2026-11-01
|
||||||
nm: 1.50
|
nm: 1.50
|
||||||
|
|
@ -140,6 +159,3 @@ alpine:
|
||||||
- version: 3.19
|
- version: 3.19
|
||||||
support: 2025-11-01
|
support: 2025-11-01
|
||||||
nm: 1.44
|
nm: 1.44
|
||||||
- version: 3.18
|
|
||||||
support: 2025-05-09
|
|
||||||
nm: 1.42
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ if [ $IS_CENTOS = 1 ]; then
|
||||||
CENTOS_VERSION=8
|
CENTOS_VERSION=8
|
||||||
elif grep -q '^VERSION_ID=.*\<9\>' /etc/os-release ; then
|
elif grep -q '^VERSION_ID=.*\<9\>' /etc/os-release ; then
|
||||||
CENTOS_VERSION=9
|
CENTOS_VERSION=9
|
||||||
|
elif grep -q '^VERSION_ID=.*\<10\>' /etc/os-release ; then
|
||||||
|
CENTOS_VERSION=10
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
@ -33,6 +35,11 @@ fi
|
||||||
dnf install -y 'dnf-command(config-manager)'
|
dnf install -y 'dnf-command(config-manager)'
|
||||||
dnf config-manager --set-enabled crb
|
dnf config-manager --set-enabled crb
|
||||||
curl https://copr.fedorainfracloud.org/coprs/nmstate/nm-build-deps/repo/epel-9/nmstate-nm-build-deps-epel-9.repo > /etc/yum.repos.d/nmstate-nm-build-deps-epel-9.repo
|
curl https://copr.fedorainfracloud.org/coprs/nmstate/nm-build-deps/repo/epel-9/nmstate-nm-build-deps-epel-9.repo > /etc/yum.repos.d/nmstate-nm-build-deps-epel-9.repo
|
||||||
|
elif [ "$CENTOS_VERSION" = stream10 ]; then
|
||||||
|
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
|
||||||
|
dnf install -y 'dnf-command(config-manager)'
|
||||||
|
dnf config-manager --set-enabled crb
|
||||||
|
curl https://copr.fedorainfracloud.org/coprs/nmstate/nm-build-deps/repo/epel-10/nmstate-nm-build-deps-epel-10.repo > /etc/yum.repos.d/nmstate-nm-build-deps-epel-10.repo
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,17 @@ grep -q '^NAME=.*\(CentOS\)' /etc/os-release && IS_CENTOS=1
|
||||||
grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1
|
grep -q '^NAME=.*\(Fedora\)' /etc/os-release && IS_FEDORA=1
|
||||||
grep -q '^NAME=.*\(Alpine\)' /etc/os-release && IS_ALPINE=1
|
grep -q '^NAME=.*\(Alpine\)' /etc/os-release && IS_ALPINE=1
|
||||||
|
|
||||||
IS_CENTOS_7=0
|
|
||||||
if [ $IS_CENTOS = 1 ]; then
|
if [ $IS_CENTOS = 1 ]; then
|
||||||
if grep -q '^VERSION_ID=.*\<7\>' /etc/os-release ; then
|
CENTOS_VER_LINE="$(grep '^VERSION_ID=' /etc/os-release)"
|
||||||
IS_CENTOS_7=1
|
if [[ $CENTOS_VER_LINE =~ ^VERSION_ID=\"?([0-9]+)\"?$ ]]; then
|
||||||
|
CENTOS_VER="${BASH_REMATCH[1]}"
|
||||||
|
else
|
||||||
|
echo "Error detecting CentOS Stream version" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( $CENTOS_VER >= 10 )); then
|
||||||
|
export WITH_LIBTEAM=0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -148,12 +155,7 @@ test_subtree() {
|
||||||
do_clean
|
do_clean
|
||||||
pushd ./src/$d
|
pushd ./src/$d
|
||||||
|
|
||||||
ARGS=()
|
CC="$cc" CFLAGS="-Werror -Wall" meson build
|
||||||
if [ "$d" = n-acd ]; then
|
|
||||||
ARGS+=('-Debpf=false')
|
|
||||||
fi
|
|
||||||
|
|
||||||
CC="$cc" CFLAGS="-Werror -Wall" meson build "${ARGS[@]}"
|
|
||||||
ninja -v -C build test
|
ninja -v -C build test
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
|
||||||
|
|
@ -252,17 +252,25 @@ Versioning scheme (version numbers are called MAJOR.MINOR.MICRO):
|
||||||
versioning scheme than the main NM project despite there are no development
|
versioning scheme than the main NM project despite there are no development
|
||||||
versions here.
|
versions here.
|
||||||
|
|
||||||
|
Before starting:
|
||||||
|
- You need to have the maintainer role in the project.
|
||||||
|
- The GPG key used to sign the release must be added to your GNOME's Gitlab
|
||||||
|
profile and uploaded to a keyserver.
|
||||||
|
- All details: https://handbook.gnome.org/maintainers/making-a-release.html
|
||||||
|
|
||||||
When doing a release, follow this process:
|
When doing a release, follow this process:
|
||||||
1. Ensure that `NEWS` file is up to date.
|
1. Ensure that `NEWS` file is up to date.
|
||||||
2. Increment the version in `meson.build`, commit and tag the commit. Example:
|
2. Increment the version in `meson.build` or `configure.ac`.
|
||||||
`git tag -s 1.2.8 -m 'Tag 1.2.8'`.
|
3. Commit and push to the `main` branch.
|
||||||
3. Ensure that you are on the right commit and create the tarball:
|
4. Check that the Gitlab's pipeline finishes without errors.
|
||||||
`git clean -fdx && meson setup build && cd build && meson dist`
|
5. Tag the commit with a signed tag. Example: `git tag -s 1.2.8 -m 'Release 1.2.8'`.
|
||||||
4. Upload the tarball: `scp ./*-*.tar.xz "$user@master.gnome.org:"`
|
6. Push the tag. Example: `git push origin 1.2.8`.
|
||||||
5. Login to `master.gnome.org` and run `ftpadmin install`.
|
WARN: this is what starts the automatic CI release. As GNOME doesn't allow
|
||||||
Ensure the new tarballs show up at https://download.gnome.org/sources/
|
to delete tags, any error detected after this will force a new version bump.
|
||||||
(happens after a short delay)
|
7. Check that the Gitlab's pipeline finishes without errors. If that happens,
|
||||||
6. Announce the release on the mailing list.
|
the release is done and available both in the Gitlab's releases section and
|
||||||
|
https://download.gnome.org/sources/*
|
||||||
|
8. Announce the release on the mailing list.
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
- You need access to master.gnome.org, see [here](https://handbook.gnome.org/infrastructure/accounts.html).
|
- You need access to master.gnome.org, see [here](https://handbook.gnome.org/infrastructure/accounts.html).
|
||||||
|
|
|
||||||
106
NEWS
106
NEWS
|
|
@ -1,3 +1,93 @@
|
||||||
|
=============================================
|
||||||
|
NetworkManager-1.58
|
||||||
|
Overview of changes since NetworkManager-1.56
|
||||||
|
=============================================
|
||||||
|
|
||||||
|
This is a snapshot of NetworkManager development. The API is
|
||||||
|
subject to change and not guaranteed to be compatible with
|
||||||
|
the later release.
|
||||||
|
USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE!
|
||||||
|
|
||||||
|
* Restrict the connectivity check to use the DNS servers defined on the
|
||||||
|
same link. If the link has no DNS servers, the connectivity check will
|
||||||
|
use any servers available in the system.
|
||||||
|
* Install the systemd units in the initramfs using a systemd generator.
|
||||||
|
* A new "check-connectivity" configuration option is available to disable the
|
||||||
|
connectivity check for selected interfaces.
|
||||||
|
* Remove the modify_system build option that allowed setting up the
|
||||||
|
polkit permissions to allow non-admin users to create system-wide
|
||||||
|
connection. That configuration is discouraged because it can be used
|
||||||
|
to bypass filesystem permissions.
|
||||||
|
* For private connections (the ones that specify a user in the
|
||||||
|
"connection.permissions" property), verify that the user can access
|
||||||
|
the 802.1X certificates and keys set in the connection.
|
||||||
|
* Introduce a libnm function that can be used by VPN plugins to check
|
||||||
|
user permissions on certificate and keys.
|
||||||
|
* The support for Wireless Extensions is deprecated and will be
|
||||||
|
removed in a future release. Wireless Extensions are now disabled by
|
||||||
|
default.
|
||||||
|
|
||||||
|
=============================================
|
||||||
|
NetworkManager-1.56
|
||||||
|
Overview of changes since NetworkManager-1.54
|
||||||
|
=============================================
|
||||||
|
|
||||||
|
* nmcli now supports viewing and managing WireGuard peers.
|
||||||
|
* Support reapplying the "sriov.vfs" property as long as
|
||||||
|
"sriov.total-vfs" is not changed.
|
||||||
|
* Support reapplying "bond-port.vlans".
|
||||||
|
* Accept hostnames longer than 64 characters from DNS lookup.
|
||||||
|
* Make that global-dns configuration overwrites DNS searches and
|
||||||
|
options from connections, instead of merging all together.
|
||||||
|
* Add support for a new rd.net.dhcp.client-id option in
|
||||||
|
nm-initrd-generator.
|
||||||
|
* Add gsm device-uid setting to restrict the devices the connection applies to.
|
||||||
|
* Support configuring the HSR protocol version via the
|
||||||
|
"hsr.protocol-version" property.
|
||||||
|
* Fix a bug that makes broadband connections auto-connect getting
|
||||||
|
blocked if the connection tries to reconnect when modem status is
|
||||||
|
"disconnecting" / "disconnected".
|
||||||
|
* Treat modem connection not having an operator code available
|
||||||
|
as a recoverable error.
|
||||||
|
* Add support for configuring systemd-resolved's DNSSEC option
|
||||||
|
per-connection via the "connection.dnssec" connection property.
|
||||||
|
* Support configuring the HSR interlink port via the
|
||||||
|
"hsr.interlink" property.
|
||||||
|
* Fix some connection properties not being applied to vpn connections
|
||||||
|
(connection.mdns, connection.llmnr, connection.dns-over-tls,
|
||||||
|
connection.mptcp-flags, ipv6.ip6-privacy)
|
||||||
|
* Update n-acd to always compile with eBPF enabled, as support
|
||||||
|
for eBPF is now detected at run time.
|
||||||
|
* Add new MPTCP 'laminar' endpoint type, and set it by default alongside
|
||||||
|
the 'subflow' one.
|
||||||
|
|
||||||
|
=============================================
|
||||||
|
NetworkManager-1.54
|
||||||
|
Overview of changes since NetworkManager-1.52
|
||||||
|
=============================================
|
||||||
|
|
||||||
|
* Add support for configuring per-device IPv4 forwarding via the
|
||||||
|
"ipv4.forwarding" connection property.
|
||||||
|
* Add a new "prefix-delegation" setting containing a "subnet-id"
|
||||||
|
property that specifies the subnet to choose on the downstream
|
||||||
|
interface when using IPv6 prefix delegation.
|
||||||
|
* Support OCI baremetal in nm-cloud-setup
|
||||||
|
* When activating a WireGuard connection to an IPv6 endpoint, now
|
||||||
|
NetworkManager creates firewall rules to ensure that the incoming
|
||||||
|
packets are not dropped by kernel reverse path filtering.
|
||||||
|
* Add support for configuring the loopback interface in nmtui.
|
||||||
|
* Most of the properties of ovs-bridge and ovs-port connections can
|
||||||
|
now be reapplied at runtime without bringing the connection down.
|
||||||
|
* Add a new "sriov.preserve-on-down" property that controls whether
|
||||||
|
NetworkManager preserves the SR-IOV parameters set on the device
|
||||||
|
when the connection is deactivated, or whether it resets them to
|
||||||
|
their default value.
|
||||||
|
* Introduce a new "ovs-dpdk.lsc-interrupt" property to configure the
|
||||||
|
Link State Change (LSC) detection mode for OVS DPDK interfaces.
|
||||||
|
* The initrd-generator now can parse the NVMe Boot Firmware Table
|
||||||
|
(NBFT) to configure networking during early boot.
|
||||||
|
* Add systemd services to provide networking in the initrd.
|
||||||
|
|
||||||
=============================================
|
=============================================
|
||||||
NetworkManager-1.52
|
NetworkManager-1.52
|
||||||
Overview of changes since NetworkManager-1.50
|
Overview of changes since NetworkManager-1.50
|
||||||
|
|
@ -191,7 +281,7 @@ Overview of changes since NetworkManager-1.42
|
||||||
lead to unexpected behaviors in case of multiconnect profiles.
|
lead to unexpected behaviors in case of multiconnect profiles.
|
||||||
* Set VLAN filtering options on bridge via netlink instead of sysfs.
|
* Set VLAN filtering options on bridge via netlink instead of sysfs.
|
||||||
* nm-cloud-setup now supports IMDSv2 on Amazon EC2.
|
* nm-cloud-setup now supports IMDSv2 on Amazon EC2.
|
||||||
* nmtui now allows to enable or disable Wi-Fi and WWAN radios.
|
* nmtui now supports enabling/disabling Wi-Fi and WWAN radios.
|
||||||
* Honor ignore-carrier=no for bond/bridge/team devices.
|
* Honor ignore-carrier=no for bond/bridge/team devices.
|
||||||
* Add version mismatch warning when running nmcli commands.
|
* Add version mismatch warning when running nmcli commands.
|
||||||
|
|
||||||
|
|
@ -356,7 +446,7 @@ Overview of changes since NetworkManager-1.38
|
||||||
* NetworkManager reads the kernel command line "/proc/cmdline" for several
|
* NetworkManager reads the kernel command line "/proc/cmdline" for several
|
||||||
purposes, including "nm.debug" for enabling debugging and the
|
purposes, including "nm.debug" for enabling debugging and the
|
||||||
"match.kernel-command-line" setting in the profile. NetworkManager now
|
"match.kernel-command-line" setting in the profile. NetworkManager now
|
||||||
first looks now for "/run/NetworkManager/proc-cmdline", which allows to
|
first looks now for "/run/NetworkManager/proc-cmdline", which allows one to
|
||||||
overwrite the command line.
|
overwrite the command line.
|
||||||
* Improve the reapply of non-bridge properties.
|
* Improve the reapply of non-bridge properties.
|
||||||
* Honor adding a Bluetooth NAP connection with all available methods.
|
* Honor adding a Bluetooth NAP connection with all available methods.
|
||||||
|
|
@ -429,7 +519,7 @@ Overview of changes since NetworkManager-1.36
|
||||||
* Workaround libcurl blocking NetworkManager while resolving DNS names.
|
* Workaround libcurl blocking NetworkManager while resolving DNS names.
|
||||||
* nmcli: indicate missing Wi-Fi hardware when showing rfkill setting.
|
* nmcli: indicate missing Wi-Fi hardware when showing rfkill setting.
|
||||||
* nmcli: add connection migrate command to move a profile to a specified
|
* nmcli: add connection migrate command to move a profile to a specified
|
||||||
settings plugin. This allows to convert profiles in the deprecated ifcfg-rh
|
settings plugin. This allows one to convert profiles in the deprecated ifcfg-rh
|
||||||
format to keyfile.
|
format to keyfile.
|
||||||
* Set "src" attribute for routes from DHCPv4 to the leased address. This
|
* Set "src" attribute for routes from DHCPv4 to the leased address. This
|
||||||
helps with source address selection.
|
helps with source address selection.
|
||||||
|
|
@ -561,7 +651,7 @@ and 1.32.12 are also present in NetworkManager-1.34:
|
||||||
* core: fix adding stale local routes when address changes.
|
* core: fix adding stale local routes when address changes.
|
||||||
* initrd: tag generated profiles with origin in user data.
|
* initrd: tag generated profiles with origin in user data.
|
||||||
* core: introduce "allowed-connections" option to disallow
|
* core: introduce "allowed-connections" option to disallow
|
||||||
profiles on a device. This allows to filter out profiles
|
profiles on a device. This allows one to filter out profiles
|
||||||
that originate from initrd.
|
that originate from initrd.
|
||||||
* core: introduce "keep-configuration" device option to forcefully
|
* core: introduce "keep-configuration" device option to forcefully
|
||||||
activate a profile on start.
|
activate a profile on start.
|
||||||
|
|
@ -622,7 +712,7 @@ Overview of changes since NetworkManager-1.30
|
||||||
'nm-daemon-helper' binary is spawned to perform the lookup using
|
'nm-daemon-helper' binary is spawned to perform the lookup using
|
||||||
the 'dns' NSS module.
|
the 'dns' NSS module.
|
||||||
* dhcp: honor "ID_NET_DHCP_BROADCAST" udev attribute to set the broadcast flag.
|
* dhcp: honor "ID_NET_DHCP_BROADCAST" udev attribute to set the broadcast flag.
|
||||||
This allows to configure devices in udev for which DHCPOFFER messages are to be
|
This allows one to configure devices in udev for which DHCPOFFER messages are to be
|
||||||
broadcast.
|
broadcast.
|
||||||
* firewall: add nftables firewall backend for configuring IPv4 NAT with shared
|
* firewall: add nftables firewall backend for configuring IPv4 NAT with shared
|
||||||
mode. Now two backends are supported, "iptables" and "nftables". The default
|
mode. Now two backends are supported, "iptables" and "nftables". The default
|
||||||
|
|
@ -882,16 +972,16 @@ This is a new stable release of NetworkManager. Notable changes include:
|
||||||
in allowed-ips.
|
in allowed-ips.
|
||||||
* Rework implementation of settings plugins and how profiles are presisted
|
* Rework implementation of settings plugins and how profiles are presisted
|
||||||
to disk. This is a large internal refactoring of the settings plugins that
|
to disk. This is a large internal refactoring of the settings plugins that
|
||||||
allows to migrate a connection profile between plugins.
|
allows one to migrate a connection profile between plugins.
|
||||||
* In-memory profiles are now only handled by keyfile plugin and will also be
|
* In-memory profiles are now only handled by keyfile plugin and will also be
|
||||||
persisted to /run directory. This allows to restart NetworkManager without
|
persisted to /run directory. This allows one to restart NetworkManager without
|
||||||
loosing these profiles and it provides a file-system based API for creating
|
loosing these profiles and it provides a file-system based API for creating
|
||||||
in-memory profiles.
|
in-memory profiles.
|
||||||
* Keyfile plugin now supports a read-only directory of profiles under directory
|
* Keyfile plugin now supports a read-only directory of profiles under directory
|
||||||
"/usr/lib/NetworkManager/system-connections". Such profiles still can be modified
|
"/usr/lib/NetworkManager/system-connections". Such profiles still can be modified
|
||||||
and deleted via D-Bus, which results in writing profiles to /etc or /run that
|
and deleted via D-Bus, which results in writing profiles to /etc or /run that
|
||||||
shadow the read-only files.
|
shadow the read-only files.
|
||||||
* Add new D-Bus method AddConnection2() that allows to block autoconnect of
|
* Add new D-Bus method AddConnection2() that allows one to block autoconnect of
|
||||||
the profile at the moment when creating the profile. Also add support for
|
the profile at the moment when creating the profile. Also add support for
|
||||||
this API to libnm.
|
this API to libnm.
|
||||||
* Add flag "no-reapply" to Update2() D-Bus method. Normally, when a connection
|
* Add flag "no-reapply" to Update2() D-Bus method. Normally, when a connection
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,14 @@ contrib/fedora/rpm/NetworkManager.conf for how to enable debug logging
|
||||||
in NetworkManager.
|
in NetworkManager.
|
||||||
|
|
||||||
|
|
||||||
|
Requirements
|
||||||
|
------------
|
||||||
|
|
||||||
|
NetworkManager requires:
|
||||||
|
|
||||||
|
- Linux kernel >= 5.6 for some ethtool options (pause, eee, ring)
|
||||||
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,9 @@
|
||||||
/* Define to path of iptables binary */
|
/* Define to path of iptables binary */
|
||||||
#mesondefine IPTABLES_PATH
|
#mesondefine IPTABLES_PATH
|
||||||
|
|
||||||
|
/* Define to path of ip6tables binary */
|
||||||
|
#mesondefine IP6TABLES_PATH
|
||||||
|
|
||||||
/* Define to path of nft binary */
|
/* Define to path of nft binary */
|
||||||
#mesondefine NFT_PATH
|
#mesondefine NFT_PATH
|
||||||
|
|
||||||
|
|
@ -236,6 +239,15 @@
|
||||||
/* Whether we build with OVS plugin */
|
/* Whether we build with OVS plugin */
|
||||||
#mesondefine WITH_OPENVSWITCH
|
#mesondefine WITH_OPENVSWITCH
|
||||||
|
|
||||||
|
/* Whether we build with team support */
|
||||||
|
#mesondefine WITH_TEAMDCTL
|
||||||
|
|
||||||
|
/* Whether we build with Wi-Fi support */
|
||||||
|
#mesondefine WITH_WIFI
|
||||||
|
|
||||||
|
/* Whether we build with WWAN support */
|
||||||
|
#mesondefine WITH_WWAN
|
||||||
|
|
||||||
/* Define if you have PPP support */
|
/* Define if you have PPP support */
|
||||||
#mesondefine WITH_PPP
|
#mesondefine WITH_PPP
|
||||||
|
|
||||||
|
|
@ -277,3 +289,8 @@
|
||||||
/* Define to 1 if you have history support from -lreadline. */
|
/* Define to 1 if you have history support from -lreadline. */
|
||||||
#mesondefine HAVE_READLINE_HISTORY
|
#mesondefine HAVE_READLINE_HISTORY
|
||||||
|
|
||||||
|
/* Define if NBFT support is enabled */
|
||||||
|
#mesondefine WITH_NBFT
|
||||||
|
|
||||||
|
/* Define to 1 if dlvsym() is available */
|
||||||
|
#mesondefine HAVE_DLVSYM
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ apk add \
|
||||||
'clang' \
|
'clang' \
|
||||||
'curl-dev' \
|
'curl-dev' \
|
||||||
'dbus' \
|
'dbus' \
|
||||||
|
'dbus-dev' \
|
||||||
'elogind-dev' \
|
'elogind-dev' \
|
||||||
'eudev-dev' \
|
'eudev-dev' \
|
||||||
'gcc' \
|
'gcc' \
|
||||||
|
|
@ -24,11 +25,11 @@ apk add \
|
||||||
'jansson-dev' \
|
'jansson-dev' \
|
||||||
'libgudev-dev' \
|
'libgudev-dev' \
|
||||||
'libndp-dev' \
|
'libndp-dev' \
|
||||||
|
'libnvme-dev' \
|
||||||
'libnl3-dev' \
|
'libnl3-dev' \
|
||||||
'libpsl-dev' \
|
'libpsl-dev' \
|
||||||
'libsoup-dev' \
|
'libsoup-dev' \
|
||||||
'libteam-dev' \
|
'libteam-dev' \
|
||||||
'libtool' \
|
|
||||||
'linux-headers' \
|
'linux-headers' \
|
||||||
'meson' \
|
'meson' \
|
||||||
'mobile-broadband-provider-info' \
|
'mobile-broadband-provider-info' \
|
||||||
|
|
|
||||||
|
|
@ -56,12 +56,12 @@ install \
|
||||||
libndp-dev \
|
libndp-dev \
|
||||||
libnewt-dev \
|
libnewt-dev \
|
||||||
libnss3-dev \
|
libnss3-dev \
|
||||||
|
libnvme-dev \
|
||||||
libpolkit-gobject-1-dev \
|
libpolkit-gobject-1-dev \
|
||||||
libpsl-dev \
|
libpsl-dev \
|
||||||
libreadline-dev \
|
libreadline-dev \
|
||||||
libsystemd-dev \
|
libsystemd-dev \
|
||||||
libteam-dev \
|
libteam-dev \
|
||||||
libtool \
|
|
||||||
libudev-dev \
|
libudev-dev \
|
||||||
locales \
|
locales \
|
||||||
meson \
|
meson \
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,8 @@ install \
|
||||||
jq \
|
jq \
|
||||||
libcurl-devel \
|
libcurl-devel \
|
||||||
libndp-devel \
|
libndp-devel \
|
||||||
|
libnvme-devel \
|
||||||
libselinux-devel \
|
libselinux-devel \
|
||||||
libtool \
|
|
||||||
libuuid-devel \
|
libuuid-devel \
|
||||||
meson \
|
meson \
|
||||||
mobile-broadband-provider-info-devel \
|
mobile-broadband-provider-info-devel \
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
%global epoch_version 1
|
%global epoch_version 1
|
||||||
%global real_version __VERSION__
|
%global real_version __VERSION__
|
||||||
|
%global git_tag_version __GIT_TAG_VERSION__
|
||||||
%global rpm_version %{real_version}
|
%global rpm_version %{real_version}
|
||||||
%global release_version __RELEASE_VERSION__
|
%global release_version __RELEASE_VERSION__
|
||||||
%global snapshot __SNAPSHOT__
|
%global snapshot __SNAPSHOT__
|
||||||
|
|
@ -106,6 +107,11 @@
|
||||||
%else
|
%else
|
||||||
%bcond_without iwd
|
%bcond_without iwd
|
||||||
%endif
|
%endif
|
||||||
|
%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10
|
||||||
|
%bcond_without polkit_noauth_group
|
||||||
|
%else
|
||||||
|
%bcond_with polkit_noauth_group
|
||||||
|
%endif
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
@ -153,17 +159,6 @@
|
||||||
%bcond_with ifcfg_migrate
|
%bcond_with ifcfg_migrate
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?fedora}
|
|
||||||
# Although eBPF would be available on Fedora's kernel, it seems
|
|
||||||
# we often get SELinux denials (rh#1651654). But even aside them,
|
|
||||||
# bpf(BPF_MAP_CREATE, ...) randomly fails with EPERM. That might
|
|
||||||
# be related to `ulimit -l`. Anyway, this is not usable at the
|
|
||||||
# moment.
|
|
||||||
%global ebpf_enabled "no"
|
|
||||||
%else
|
|
||||||
%global ebpf_enabled "no"
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Fedora 33 enables LTO by default by setting CFLAGS="-flto -ffat-lto-objects".
|
# Fedora 33 enables LTO by default by setting CFLAGS="-flto -ffat-lto-objects".
|
||||||
# However, we also require "-flto -flto-partition=none", so disable Fedora's
|
# However, we also require "-flto -flto-partition=none", so disable Fedora's
|
||||||
# default and use our configure option --with-lto instead.
|
# default and use our configure option --with-lto instead.
|
||||||
|
|
@ -180,7 +175,7 @@ Group: System Environment/Base
|
||||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||||
URL: https://networkmanager.dev/
|
URL: https://networkmanager.dev/
|
||||||
|
|
||||||
#Source: https://download.gnome.org/sources/NetworkManager/%{real_version_major}/%{name}-%{real_version}.tar.xz
|
#Source: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/releases/%{git_tag_version}/downloads/%{name}-%{real_version}.tar.xz
|
||||||
Source: __SOURCE1__
|
Source: __SOURCE1__
|
||||||
Source1: NetworkManager.conf
|
Source1: NetworkManager.conf
|
||||||
Source2: 00-server.conf
|
Source2: 00-server.conf
|
||||||
|
|
@ -253,7 +248,6 @@ Conflicts: NetworkManager-dispatcher-routing-rules <= 1:1.47.5-3
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: libtool
|
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
BuildRequires: gettext-devel >= 0.19.8
|
BuildRequires: gettext-devel >= 0.19.8
|
||||||
|
|
@ -307,6 +301,7 @@ BuildRequires: libubsan
|
||||||
BuildRequires: firewalld-filesystem
|
BuildRequires: firewalld-filesystem
|
||||||
BuildRequires: iproute
|
BuildRequires: iproute
|
||||||
BuildRequires: iproute-tc
|
BuildRequires: iproute-tc
|
||||||
|
BuildRequires: libnvme-devel >= 1.5
|
||||||
|
|
||||||
Provides: %{name}-dispatcher%{?_isa} = %{epoch}:%{version}-%{release}
|
Provides: %{name}-dispatcher%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
|
@ -597,6 +592,7 @@ Preferably use nmcli instead.
|
||||||
%endif
|
%endif
|
||||||
-Dnft=%{_sbindir}/nft \
|
-Dnft=%{_sbindir}/nft \
|
||||||
-Diptables=%{_sbindir}/iptables \
|
-Diptables=%{_sbindir}/iptables \
|
||||||
|
-Dip6tables=%{_sbindir}/ip6tables \
|
||||||
%if %{with dhclient}
|
%if %{with dhclient}
|
||||||
-Ddhclient=%{_sbindir}/dhclient \
|
-Ddhclient=%{_sbindir}/dhclient \
|
||||||
%else
|
%else
|
||||||
|
|
@ -625,14 +621,10 @@ Preferably use nmcli instead.
|
||||||
%endif
|
%endif
|
||||||
%if %{with wifi}
|
%if %{with wifi}
|
||||||
-Dwifi=true \
|
-Dwifi=true \
|
||||||
%if 0%{?fedora}
|
|
||||||
-Dwext=true \
|
|
||||||
%else
|
|
||||||
-Dwext=false \
|
|
||||||
%endif
|
|
||||||
%else
|
%else
|
||||||
-Dwifi=false \
|
-Dwifi=false \
|
||||||
%endif
|
%endif
|
||||||
|
-Dwext=false \
|
||||||
%if %{with iwd}
|
%if %{with iwd}
|
||||||
-Diwd=true \
|
-Diwd=true \
|
||||||
%else
|
%else
|
||||||
|
|
@ -674,22 +666,20 @@ Preferably use nmcli instead.
|
||||||
-Dselinux=true \
|
-Dselinux=true \
|
||||||
-Dpolkit=true \
|
-Dpolkit=true \
|
||||||
-Dconfig_auth_polkit_default=true \
|
-Dconfig_auth_polkit_default=true \
|
||||||
-Dmodify_system=true \
|
%if %{with polkit_noauth_group}
|
||||||
|
-Dpolkit_noauth_group=wheel \
|
||||||
|
%endif
|
||||||
-Dconcheck=true \
|
-Dconcheck=true \
|
||||||
%if 0%{?fedora}
|
%if 0%{?fedora}
|
||||||
-Dlibpsl=true \
|
-Dlibpsl=true \
|
||||||
%else
|
%else
|
||||||
-Dlibpsl=false \
|
-Dlibpsl=false \
|
||||||
%endif
|
|
||||||
%if %{ebpf_enabled} != "yes"
|
|
||||||
-Debpf=false \
|
|
||||||
%else
|
|
||||||
-Debpf=true \
|
|
||||||
%endif
|
%endif
|
||||||
-Dsession_tracking=systemd \
|
-Dsession_tracking=systemd \
|
||||||
-Dsuspend_resume=systemd \
|
-Dsuspend_resume=systemd \
|
||||||
-Dsystemdsystemunitdir=%{_unitdir} \
|
-Dsystemdsystemunitdir=%{_unitdir} \
|
||||||
-Dsystem_ca_path=/etc/pki/tls/cert.pem \
|
-Dsystemdsystemgeneratordir=%{_systemdgeneratordir} \
|
||||||
|
-Dsystem_ca_path=/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem \
|
||||||
-Ddbus_conf_dir=%{dbus_sys_dir} \
|
-Ddbus_conf_dir=%{dbus_sys_dir} \
|
||||||
-Dtests=yes \
|
-Dtests=yes \
|
||||||
-Dvalgrind=no \
|
-Dvalgrind=no \
|
||||||
|
|
@ -760,6 +750,12 @@ rm -f %{buildroot}%{_libdir}/*.la
|
||||||
rm -f %{buildroot}%{_libdir}/pppd/%{ppp_version}/*.la
|
rm -f %{buildroot}%{_libdir}/pppd/%{ppp_version}/*.la
|
||||||
rm -f %{buildroot}%{nmplugindir}/*.la
|
rm -f %{buildroot}%{nmplugindir}/*.la
|
||||||
|
|
||||||
|
# Don't use the *-initrd.service files yet, wait dracut to support them
|
||||||
|
rm -f %{buildroot}%{_systemdgeneratordir}/nm-initrd-generator.sh
|
||||||
|
rm -f %{buildroot}%{_unitdir}/NetworkManager-config-initrd.service
|
||||||
|
rm -f %{buildroot}%{_unitdir}/NetworkManager-initrd.service
|
||||||
|
rm -f %{buildroot}%{_unitdir}/NetworkManager-wait-online-initrd.service
|
||||||
|
|
||||||
# Ensure the documentation timestamps are constant to avoid multilib conflicts
|
# Ensure the documentation timestamps are constant to avoid multilib conflicts
|
||||||
find %{buildroot}%{_datadir}/gtk-doc -exec touch --reference meson.build '{}' \+
|
find %{buildroot}%{_datadir}/gtk-doc -exec touch --reference meson.build '{}' \+
|
||||||
|
|
||||||
|
|
@ -889,6 +885,7 @@ fi
|
||||||
%{_libexecdir}/nm-dispatcher
|
%{_libexecdir}/nm-dispatcher
|
||||||
%{_libexecdir}/nm-initrd-generator
|
%{_libexecdir}/nm-initrd-generator
|
||||||
%{_libexecdir}/nm-daemon-helper
|
%{_libexecdir}/nm-daemon-helper
|
||||||
|
%{_libexecdir}/nm-libnm-helper
|
||||||
%{_libexecdir}/nm-priv-helper
|
%{_libexecdir}/nm-priv-helper
|
||||||
%dir %{_libdir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
%dir %{nmplugindir}
|
%dir %{nmplugindir}
|
||||||
|
|
@ -920,6 +917,9 @@ fi
|
||||||
%{_datadir}/dbus-1/system-services/org.freedesktop.nm_dispatcher.service
|
%{_datadir}/dbus-1/system-services/org.freedesktop.nm_dispatcher.service
|
||||||
%{_datadir}/dbus-1/system-services/org.freedesktop.nm_priv_helper.service
|
%{_datadir}/dbus-1/system-services/org.freedesktop.nm_priv_helper.service
|
||||||
%{_datadir}/polkit-1/actions/*.policy
|
%{_datadir}/polkit-1/actions/*.policy
|
||||||
|
%if %{with polkit_noauth_group}
|
||||||
|
%{_datadir}/polkit-1/rules.d/org.freedesktop.NetworkManager.rules
|
||||||
|
%endif
|
||||||
%{_prefix}/lib/udev/rules.d/*.rules
|
%{_prefix}/lib/udev/rules.d/*.rules
|
||||||
%{_prefix}/lib/firewalld/zones/nm-shared.xml
|
%{_prefix}/lib/firewalld/zones/nm-shared.xml
|
||||||
# systemd stuff
|
# systemd stuff
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ set -o pipefail
|
||||||
# RELEASE_VERSION=
|
# RELEASE_VERSION=
|
||||||
# SNAPSHOT=
|
# SNAPSHOT=
|
||||||
# VERSION=
|
# VERSION=
|
||||||
|
# GIT_TAG_VERSION=
|
||||||
# COMMIT_FULL=
|
# COMMIT_FULL=
|
||||||
# COMMIT=
|
# COMMIT=
|
||||||
# USERNAME=
|
# USERNAME=
|
||||||
|
|
@ -112,6 +113,7 @@ UUID=`uuidgen`
|
||||||
RELEASE_VERSION="${RELEASE_VERSION:-$(git rev-list HEAD | wc -l)}"
|
RELEASE_VERSION="${RELEASE_VERSION:-$(git rev-list HEAD | wc -l)}"
|
||||||
SNAPSHOT="${SNAPSHOT:-%{nil\}}"
|
SNAPSHOT="${SNAPSHOT:-%{nil\}}"
|
||||||
VERSION="${VERSION:-$(get_version || die "Could not read $VERSION")}"
|
VERSION="${VERSION:-$(get_version || die "Could not read $VERSION")}"
|
||||||
|
GIT_TAG_VERSION="${GIT_TAG_VERSION:-$VERSION}"
|
||||||
COMMIT_FULL="${COMMIT_FULL:-$(git rev-parse --verify HEAD || die "Error reading HEAD revision")}"
|
COMMIT_FULL="${COMMIT_FULL:-$(git rev-parse --verify HEAD || die "Error reading HEAD revision")}"
|
||||||
COMMIT="${COMMIT:-$(printf '%s' "$COMMIT_FULL" | sed 's/^\(.\{10\}\).*/\1/' || die "Error reading HEAD revision")}"
|
COMMIT="${COMMIT:-$(printf '%s' "$COMMIT_FULL" | sed 's/^\(.\{10\}\).*/\1/' || die "Error reading HEAD revision")}"
|
||||||
BCOND_DEFAULT_DEBUG="${BCOND_DEFAULT_DEBUG:-0}"
|
BCOND_DEFAULT_DEBUG="${BCOND_DEFAULT_DEBUG:-0}"
|
||||||
|
|
@ -155,6 +157,7 @@ if [[ "$SOURCE_FROM_GIT" == "1" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LOG "VERSION=$VERSION"
|
LOG "VERSION=$VERSION"
|
||||||
|
LOG "GIT_TAG_VERSION=$GIT_TAG_VERSION"
|
||||||
LOG "RELEASE_VERSION=$RELEASE_VERSION"
|
LOG "RELEASE_VERSION=$RELEASE_VERSION"
|
||||||
LOG "SNAPSHOT=$SNAPSHOT"
|
LOG "SNAPSHOT=$SNAPSHOT"
|
||||||
LOG "COMMIT_FULL=$COMMIT_FULL"
|
LOG "COMMIT_FULL=$COMMIT_FULL"
|
||||||
|
|
@ -207,6 +210,7 @@ cp "$SOURCE_README_IFCFG_MIGRATED" "$TEMP/SOURCES/readme-ifcfg-rh-migrated.txt"
|
||||||
write_changelog
|
write_changelog
|
||||||
|
|
||||||
sed -e "s/__VERSION__/$VERSION/g" \
|
sed -e "s/__VERSION__/$VERSION/g" \
|
||||||
|
-e "s/__GIT_TAG_VERSION__/$GIT_TAG_VERSION/g" \
|
||||||
-e "s/__RELEASE_VERSION__/$RELEASE_VERSION/g" \
|
-e "s/__RELEASE_VERSION__/$RELEASE_VERSION/g" \
|
||||||
-e "s/__SNAPSHOT__/$SNAPSHOT/g" \
|
-e "s/__SNAPSHOT__/$SNAPSHOT/g" \
|
||||||
-e "s/__COMMIT__/$COMMIT/g" \
|
-e "s/__COMMIT__/$COMMIT/g" \
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@ while [[ $# -gt 0 ]]; do
|
||||||
;;
|
;;
|
||||||
--no-auto-with-test)
|
--no-auto-with-test)
|
||||||
# by default, the script adds "-w test" (unless the command line contains
|
# by default, the script adds "-w test" (unless the command line contains
|
||||||
# "-w test" or "-W test"). This flags allows to suppress that automatism.
|
# "-w test" or "-W test"). This flag suppresses that automatism.
|
||||||
# It's really only useful to test the spec file's internal default for the
|
# It's really only useful to test the spec file's internal default for the
|
||||||
# "test" option. Otherwise, you can always just explicitly select "-w test"
|
# "test" option. Otherwise, you can always just explicitly select "-w test"
|
||||||
# or "-W test".
|
# or "-W test".
|
||||||
|
|
@ -222,6 +222,7 @@ if [[ $NO_DIST != 1 ]]; then
|
||||||
-Dconfig_dhcp_default=internal \
|
-Dconfig_dhcp_default=internal \
|
||||||
-Dconfig_dns_rc_manager_default=auto \
|
-Dconfig_dns_rc_manager_default=auto \
|
||||||
-Diptables=/usr/sbin/iptables \
|
-Diptables=/usr/sbin/iptables \
|
||||||
|
-Dip6tables=/usr/sbin/ip6tables \
|
||||||
-Dnft=/usr/bin/nft \
|
-Dnft=/usr/bin/nft \
|
||||||
|| die "Error meson setup"
|
|| die "Error meson setup"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,6 @@ P_CRYPTO="${CRYPTO-}"
|
||||||
P_DBUS_SYS_DIR="${DBUS_SYS_DIR-}"
|
P_DBUS_SYS_DIR="${DBUS_SYS_DIR-}"
|
||||||
P_DHCP_DEFAULT="${DHCP_DEFAULT-}"
|
P_DHCP_DEFAULT="${DHCP_DEFAULT-}"
|
||||||
P_DNS_RC_MANAGER_DEFAULT="${DNS_RC_MANAGER_DEFAULT-}"
|
P_DNS_RC_MANAGER_DEFAULT="${DNS_RC_MANAGER_DEFAULT-}"
|
||||||
P_EBPF_ENABLED="${EBPF_ENABLED-no}"
|
|
||||||
P_FIREWALLD_ZONE="${FIREWALLD_ZONE-}"
|
P_FIREWALLD_ZONE="${FIREWALLD_ZONE-}"
|
||||||
P_IWD="${IWD-}"
|
P_IWD="${IWD-}"
|
||||||
P_LOGGING_BACKEND_DEFAULT="${LOGGING_BACKEND_DEFAULT-}"
|
P_LOGGING_BACKEND_DEFAULT="${LOGGING_BACKEND_DEFAULT-}"
|
||||||
|
|
@ -174,6 +173,7 @@ P_WIFI="${WIFI-1}"
|
||||||
P_WWAN="${WWAN-1}"
|
P_WWAN="${WWAN-1}"
|
||||||
P_TEAM="${TEAM-1}"
|
P_TEAM="${TEAM-1}"
|
||||||
P_BLUETOOTH="${BLUETOOTH-1}"
|
P_BLUETOOTH="${BLUETOOTH-1}"
|
||||||
|
P_IFCFG_RH="${IFCFG_RH-0}"
|
||||||
P_NMTUI="${NMTUI-1}"
|
P_NMTUI="${NMTUI-1}"
|
||||||
P_NM_CLOUD_SETUP="${NM_CLOUD_SETUP-1}"
|
P_NM_CLOUD_SETUP="${NM_CLOUD_SETUP-1}"
|
||||||
P_OVS="${OVS-1}"
|
P_OVS="${OVS-1}"
|
||||||
|
|
@ -203,7 +203,7 @@ if [ -z "$P_FEDORA" -a -z "$P_RHEL" ] ; then
|
||||||
P_FEDORA="$x"
|
P_FEDORA="$x"
|
||||||
P_RHEL=0
|
P_RHEL=0
|
||||||
else
|
else
|
||||||
x="$(grep -q "ID=fedora" /etc/os-release && sed -n 's/VERSION_ID=//p' /etc/os-release)"
|
x="$(grep -q 'ID="rhel"' /etc/os-release && sed -n 's/^VERSION_ID="*\([0-9]*\).*/\1/p' /etc/os-release)"
|
||||||
if test "$x" -gt 0 ; then
|
if test "$x" -gt 0 ; then
|
||||||
P_FEDORA=0
|
P_FEDORA=0
|
||||||
P_RHEL="$x"
|
P_RHEL="$x"
|
||||||
|
|
@ -294,6 +294,14 @@ if [ -z "$P_MODEM_MANAGER_1" ] ; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$TEAM" ] && [ "${P_RHEL-0}" -ge 10 ] ; then
|
||||||
|
P_TEAM=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$IFCFG_RH" ] && [ -n "$P_RHEL" ] && [ "$P_RHEL" -le 9 ] ; then
|
||||||
|
P_IFCFG_RH=1
|
||||||
|
fi
|
||||||
|
|
||||||
if bool "$P_DEBUG" ; then
|
if bool "$P_DEBUG" ; then
|
||||||
P_CFLAGS="-g -Og -fexceptions${P_CFLAGS:+ }$P_CFLAGS"
|
P_CFLAGS="-g -Og -fexceptions${P_CFLAGS:+ }$P_CFLAGS"
|
||||||
else
|
else
|
||||||
|
|
@ -368,6 +376,7 @@ meson setup\
|
||||||
$(args_enable "$P_TEST" --werror) \
|
$(args_enable "$P_TEST" --werror) \
|
||||||
-Dnft="${D_SBINDIR}/nft" \
|
-Dnft="${D_SBINDIR}/nft" \
|
||||||
-Diptables="${D_SBINDIR}/iptables" \
|
-Diptables="${D_SBINDIR}/iptables" \
|
||||||
|
-Dip6tables="${D_SBINDIR}/ip6tables" \
|
||||||
-Ddhclient="${D_SBINDIR}/dhclient" \
|
-Ddhclient="${D_SBINDIR}/dhclient" \
|
||||||
-Ddhcpcd=no \
|
-Ddhcpcd=no \
|
||||||
-Dconfig_dhcp_default="$P_DHCP_DEFAULT" \
|
-Dconfig_dhcp_default="$P_DHCP_DEFAULT" \
|
||||||
|
|
@ -378,7 +387,7 @@ meson setup\
|
||||||
-Db_lto="$(bool_true "$P_LTO")" \
|
-Db_lto="$(bool_true "$P_LTO")" \
|
||||||
-Dlibaudit=yes-disabled-by-default \
|
-Dlibaudit=yes-disabled-by-default \
|
||||||
-Dmodem_manager="$(bool_true "$P_MODEM_MANAGER_1")" \
|
-Dmodem_manager="$(bool_true "$P_MODEM_MANAGER_1")" \
|
||||||
$(args_enable "$P_WIFI" -Dwifi=true -Dwext="$(bool_true "$P_FEDORA")") \
|
$(args_enable "$P_WIFI" -Dwifi=true -Dwext=false) \
|
||||||
$(args_enable "$(bool_not_true "$P_WIFI")" -Dwifi=false ) \
|
$(args_enable "$(bool_not_true "$P_WIFI")" -Dwifi=false ) \
|
||||||
-Diwd="$(bool_true "$P_IWD")" \
|
-Diwd="$(bool_true "$P_IWD")" \
|
||||||
-Dbluez5_dun="$(bool_true "$P_BLUETOOTH")" \
|
-Dbluez5_dun="$(bool_true "$P_BLUETOOTH")" \
|
||||||
|
|
@ -392,18 +401,17 @@ meson setup\
|
||||||
-Dselinux=true \
|
-Dselinux=true \
|
||||||
-Dpolkit=true \
|
-Dpolkit=true \
|
||||||
-Dconfig_auth_polkit_default=true \
|
-Dconfig_auth_polkit_default=true \
|
||||||
-Dmodify_system=true \
|
|
||||||
-Dconcheck=true \
|
-Dconcheck=true \
|
||||||
-Dlibpsl="$(bool_true "$P_FEDORA")" \
|
-Dlibpsl="$(bool_true "$P_FEDORA")" \
|
||||||
-Debpf="$(bool_true "$P_EBPF_ENABLED")" \
|
|
||||||
-Dsession_tracking=systemd \
|
-Dsession_tracking=systemd \
|
||||||
-Dsuspend_resume=systemd \
|
-Dsuspend_resume=systemd \
|
||||||
-Dsystemdsystemunitdir=/usr/lib/systemd/system \
|
-Dsystemdsystemunitdir=/usr/lib/systemd/system \
|
||||||
|
-Dsystemdsystemgeneratordir=/usr/lib/systemd/system-generators \
|
||||||
-Dsystem_ca_path=/etc/pki/tls/cert.pem \
|
-Dsystem_ca_path=/etc/pki/tls/cert.pem \
|
||||||
-Ddbus_conf_dir="$P_DBUS_SYS_DIR" \
|
-Ddbus_conf_dir="$P_DBUS_SYS_DIR" \
|
||||||
-Dtests=yes \
|
-Dtests=yes \
|
||||||
-Dvalgrind=no \
|
-Dvalgrind=no \
|
||||||
-Difcfg_rh=true \
|
-Difcfg_rh="$(bool_true "$P_IFCFG_RH")" \
|
||||||
-Difupdown=false \
|
-Difupdown=false \
|
||||||
$(args_enable "$P_PPP" -Dppp=true -Dpppd="$D_SBINDIR/pppd" -Dpppd_plugin_dir="$D_LIBDIR/pppd/$P_PPP_VERSION") \
|
$(args_enable "$P_PPP" -Dppp=true -Dpppd="$D_SBINDIR/pppd" -Dpppd_plugin_dir="$D_LIBDIR/pppd/$P_PPP_VERSION") \
|
||||||
$(args_enable "$(bool_not_true "$P_PPP")" -Dppp=false ) \
|
$(args_enable "$(bool_not_true "$P_PPP")" -Dppp=false ) \
|
||||||
|
|
|
||||||
|
|
@ -559,9 +559,11 @@ if [[ $GITLAB_TOKEN == "" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# This step is not necessary for authentication, we use it only to provide a meaningful error message.
|
# This step is not necessary for authentication, we use it only to provide a meaningful error message.
|
||||||
curl --request GET --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \
|
GITLAB_USER_ID=$(curl --request GET --header "PRIVATE-TOKEN: $GITLAB_TOKEN" \
|
||||||
"https://gitlab.freedesktop.org/api/v4/personal_access_tokens/self" &>/dev/null \
|
"https://gitlab.freedesktop.org/api/v4/personal_access_tokens/self" 2>/dev/null | jq ".user_id" || true)
|
||||||
|| die "failed to authenticate at gitlab.freedesktop.org with the private token"
|
if [ -z "$GITLAB_USER_ID" ] || [ "$GITLAB_USER_ID" = "null" ]; then
|
||||||
|
die "failed to authenticate to gitlab.freedesktop.org with the private token"
|
||||||
|
fi
|
||||||
|
|
||||||
do_command git push "$ORIGIN" "${BRANCHES[@]}" || die "failed to to push branches ${BRANCHES[@]} to $ORIGIN"
|
do_command git push "$ORIGIN" "${BRANCHES[@]}" || die "failed to to push branches ${BRANCHES[@]} to $ORIGIN"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -265,9 +265,11 @@ detect_dirname() {
|
||||||
# At some point FEDPKG changed the behavior of "prep" command
|
# At some point FEDPKG changed the behavior of "prep" command
|
||||||
# now it generates the directory with "-build" suffix and the
|
# now it generates the directory with "-build" suffix and the
|
||||||
# real directory inside. We just move it out.
|
# real directory inside. We just move it out.
|
||||||
rm -rf $D
|
if [ -d "$D-build" ]; then
|
||||||
mv $D-build/$D .
|
rm -rf "$D"
|
||||||
rm -rf $D-build
|
mv "$D-build/$D" .
|
||||||
|
rm -rf "$D-build"
|
||||||
|
fi
|
||||||
[[ -d "$D" ]] && DIRS=("${DIRS[@]}" "$D")
|
[[ -d "$D" ]] && DIRS=("${DIRS[@]}" "$D")
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,15 @@ _WITH_WERROR=1
|
||||||
_WITH_LIBTEAM="true"
|
_WITH_LIBTEAM="true"
|
||||||
_WITH_DOCS="true"
|
_WITH_DOCS="true"
|
||||||
_WITH_SYSTEMD_LOGIND="true"
|
_WITH_SYSTEMD_LOGIND="true"
|
||||||
|
_WITH_NBFT="true"
|
||||||
if [ $IS_ALPINE = 1 ]; then
|
if [ $IS_ALPINE = 1 ]; then
|
||||||
_WITH_SYSTEMD_LOGIND="false"
|
_WITH_SYSTEMD_LOGIND="false"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! pkgconf 'libnvme >= 1.5'; then
|
||||||
|
_WITH_NBFT="false"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "${NMTST_SEED_RAND+x}" ]; then
|
if [ -z "${NMTST_SEED_RAND+x}" ]; then
|
||||||
NMTST_SEED_RAND="$SRANDOM"
|
NMTST_SEED_RAND="$SRANDOM"
|
||||||
if [ -z "$NMTST_SEED_RAND" ]; then
|
if [ -z "$NMTST_SEED_RAND" ]; then
|
||||||
|
|
@ -79,6 +84,14 @@ if [ "$CC" != gcc ]; then
|
||||||
_WITH_CRYPTO=nss
|
_WITH_CRYPTO=nss
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$WITH_LIBTEAM" != "" ]; then
|
||||||
|
if _is_true "$WITH_LIBTEAM"; then
|
||||||
|
_WITH_LIBTEAM="true"
|
||||||
|
else
|
||||||
|
_WITH_LIBTEAM="false"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$WITH_DOCS" != "" ]; then
|
if [ "$WITH_DOCS" != "" ]; then
|
||||||
if _is_true "$WITH_DOCS"; then
|
if _is_true "$WITH_DOCS"; then
|
||||||
_WITH_DOCS="true"
|
_WITH_DOCS="true"
|
||||||
|
|
@ -156,18 +169,18 @@ meson setup build \
|
||||||
-D ld_gc=false \
|
-D ld_gc=false \
|
||||||
-D session_tracking=no \
|
-D session_tracking=no \
|
||||||
-D systemdsystemunitdir=no \
|
-D systemdsystemunitdir=no \
|
||||||
|
-D systemdsystemgeneratordir=no \
|
||||||
-D systemd_journal=false \
|
-D systemd_journal=false \
|
||||||
-D selinux=false \
|
-D selinux=false \
|
||||||
-D libaudit=no \
|
-D libaudit=no \
|
||||||
-D libpsl=false \
|
-D libpsl=false \
|
||||||
-D vapi=false \
|
-D vapi=false \
|
||||||
-D introspection=$_WITH_DOCS \
|
-D introspection=$_WITH_DOCS \
|
||||||
|
-D man=$_WITH_DOCS \
|
||||||
-D qt=false \
|
-D qt=false \
|
||||||
-D crypto=$_WITH_CRYPTO \
|
-D crypto=$_WITH_CRYPTO \
|
||||||
-D docs=$_WITH_DOCS \
|
-D docs=$_WITH_DOCS \
|
||||||
\
|
\
|
||||||
-D ebpf=false \
|
|
||||||
\
|
|
||||||
-D iwd=true \
|
-D iwd=true \
|
||||||
-D ofono=true \
|
-D ofono=true \
|
||||||
-D teamdctl=$_WITH_LIBTEAM \
|
-D teamdctl=$_WITH_LIBTEAM \
|
||||||
|
|
@ -181,6 +194,8 @@ meson setup build \
|
||||||
-D ifcfg_rh=false \
|
-D ifcfg_rh=false \
|
||||||
-D ifupdown=true \
|
-D ifupdown=true \
|
||||||
\
|
\
|
||||||
|
-D nbft=$_WITH_NBFT \
|
||||||
|
\
|
||||||
#end
|
#end
|
||||||
|
|
||||||
export NM_TEST_CLIENT_CHECK_L10N=1
|
export NM_TEST_CLIENT_CHECK_L10N=1
|
||||||
|
|
|
||||||
24
data/NetworkManager-config-initrd.service.in
Normal file
24
data/NetworkManager-config-initrd.service.in
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
[Unit]
|
||||||
|
Description=NetworkManager Configuration (initrd)
|
||||||
|
AssertPathExists=/etc/initrd-release
|
||||||
|
DefaultDependencies=no
|
||||||
|
Wants=systemd-journald.socket
|
||||||
|
After=systemd-journald.socket
|
||||||
|
Before=systemd-udevd.service systemd-udev-trigger.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStartPre=/bin/sh -c "rm -f /run/NetworkManager/system-connections/*"
|
||||||
|
ExecStart=/bin/sh -c "@libexecdir@/nm-initrd-generator -- $(cat /proc/cmdline)"
|
||||||
|
ExecStartPost=/bin/sh -c ' \
|
||||||
|
for i in /{usr/lib,run,etc}/NetworkManager/system-connections/*; do \
|
||||||
|
[ -f "$i" ] || continue; \
|
||||||
|
mkdir -p /run/NetworkManager/initrd; \
|
||||||
|
: > /run/NetworkManager/initrd/neednet; \
|
||||||
|
break; \
|
||||||
|
done; \
|
||||||
|
if [ -s /run/NetworkManager/initrd/hostname ]; then \
|
||||||
|
cat /run/NetworkManager/initrd/hostname > /proc/sys/kernel/hostname; \
|
||||||
|
fi \
|
||||||
|
'
|
||||||
|
RemainAfterExit=yes
|
||||||
24
data/NetworkManager-initrd.service.in
Normal file
24
data/NetworkManager-initrd.service.in
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
[Unit]
|
||||||
|
Description=NetworkManager (initrd)
|
||||||
|
AssertPathExists=/etc/initrd-release
|
||||||
|
DefaultDependencies=no
|
||||||
|
Wants=systemd-udev-trigger.service network.target
|
||||||
|
After=systemd-udev-trigger.service network-pre.target dbus.service NetworkManager-config-initrd.service
|
||||||
|
Before=network.target
|
||||||
|
BindsTo=dbus.service
|
||||||
|
ConditionPathExists=/run/NetworkManager/initrd/neednet
|
||||||
|
ConditionPathExistsGlob=|/usr/lib/NetworkManager/system-connections/*
|
||||||
|
ConditionPathExistsGlob=|/run/NetworkManager/system-connections/*
|
||||||
|
ConditionPathExistsGlob=|/etc/NetworkManager/system-connections/*
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=dbus
|
||||||
|
BusName=org.freedesktop.NetworkManager
|
||||||
|
ExecReload=/usr/bin/busctl call org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager Reload u 0
|
||||||
|
ExecStart=@sbindir@/NetworkManager
|
||||||
|
# NM doesn't want systemd to kill its children for it
|
||||||
|
KillMode=process
|
||||||
|
Environment=NM_CONFIG_ENABLE_TAG=initrd
|
||||||
|
Restart=on-failure
|
||||||
|
ProtectSystem=true
|
||||||
|
ProtectHome=read-only
|
||||||
23
data/NetworkManager-wait-online-initrd.service.in
Normal file
23
data/NetworkManager-wait-online-initrd.service.in
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
[Unit]
|
||||||
|
Description=NetworkManager Wait Online (initrd)
|
||||||
|
AssertPathExists=/etc/initrd-release
|
||||||
|
DefaultDependencies=no
|
||||||
|
Requires=NetworkManager-initrd.service
|
||||||
|
After=NetworkManager-initrd.service
|
||||||
|
Before=network-online.target
|
||||||
|
ConditionPathExists=/run/NetworkManager/initrd/neednet
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# `nm-online -s` waits until the point when NetworkManager logs
|
||||||
|
# "startup complete". That is when startup actions are settled and
|
||||||
|
# devices and profiles reached a conclusive activated or deactivated
|
||||||
|
# state. It depends on which profiles are configured to autoconnect and
|
||||||
|
# also depends on profile settings like ipv4.may-fail/ipv6.may-fail,
|
||||||
|
# which affect when a profile is considered fully activated.
|
||||||
|
# Check NetworkManager logs to find out why wait-online takes a certain
|
||||||
|
# time.
|
||||||
|
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=@bindir@/nm-online -s -q
|
||||||
|
RemainAfterExit=yes
|
||||||
|
Environment=NM_ONLINE_TIMEOUT=3600
|
||||||
|
|
@ -19,7 +19,7 @@ KillMode=process
|
||||||
# With a huge number of interfaces, starting can take a long time.
|
# With a huge number of interfaces, starting can take a long time.
|
||||||
TimeoutStartSec=600
|
TimeoutStartSec=600
|
||||||
|
|
||||||
CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL CAP_SYS_CHROOT
|
CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE CAP_NET_RAW CAP_BPF CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_MODULE CAP_AUDIT_WRITE CAP_KILL CAP_SYS_CHROOT
|
||||||
|
|
||||||
ProtectSystem=true
|
ProtectSystem=true
|
||||||
ProtectHome=read-only
|
ProtectHome=read-only
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,9 @@ if install_systemdunitdir
|
||||||
'NetworkManager.service',
|
'NetworkManager.service',
|
||||||
'nm-priv-helper.service',
|
'nm-priv-helper.service',
|
||||||
'NetworkManager-wait-online.service',
|
'NetworkManager-wait-online.service',
|
||||||
|
'NetworkManager-config-initrd.service',
|
||||||
|
'NetworkManager-initrd.service',
|
||||||
|
'NetworkManager-wait-online-initrd.service',
|
||||||
]
|
]
|
||||||
|
|
||||||
foreach service: services
|
foreach service: services
|
||||||
|
|
@ -52,21 +55,22 @@ if install_udevdir
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if enable_polkit
|
if enable_polkit
|
||||||
policy = 'org.freedesktop.NetworkManager.policy'
|
|
||||||
|
|
||||||
policy_in = configure_file(
|
|
||||||
input: policy + '.in.in',
|
|
||||||
output: '@BASENAME@',
|
|
||||||
configuration: data_conf,
|
|
||||||
)
|
|
||||||
|
|
||||||
i18n.merge_file(
|
i18n.merge_file(
|
||||||
input: policy_in,
|
input: 'org.freedesktop.NetworkManager.policy.in',
|
||||||
output: '@BASENAME@',
|
output: '@BASENAME@',
|
||||||
po_dir: po_dir,
|
po_dir: po_dir,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: polkit_gobject_policydir,
|
install_dir: polkit_policydir,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if polkit_noauth_group != ''
|
||||||
|
configure_file(
|
||||||
|
input: 'org.freedesktop.NetworkManager.rules.in',
|
||||||
|
output: '@BASENAME@',
|
||||||
|
install_dir: polkit_rulesdir,
|
||||||
|
configuration: {'NM_POLKIT_NOAUTH_GROUP': polkit_noauth_group},
|
||||||
|
)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if enable_firewalld_zone
|
if enable_firewalld_zone
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
Description=NetworkManager Privileged Helper
|
Description=NetworkManager Privileged Helper
|
||||||
|
|
||||||
#
|
#
|
||||||
# nm-priv-helper exists for privilege separation. It allows to run
|
# nm-priv-helper exists for privilege separation. It allows NetworkManager
|
||||||
# NetworkManager without certain capabilities, and ask nm-priv-helper
|
# to run without certain capabilities, and ask nm-priv-helper
|
||||||
# for special operations where more privileges are required.
|
# for special operations where more privileges are required.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,8 +117,8 @@
|
||||||
<message>System policy prevents modification of network settings for all users</message>
|
<message>System policy prevents modification of network settings for all users</message>
|
||||||
<defaults>
|
<defaults>
|
||||||
<allow_any>auth_admin_keep</allow_any>
|
<allow_any>auth_admin_keep</allow_any>
|
||||||
<allow_inactive>@NM_MODIFY_SYSTEM_POLICY@</allow_inactive>
|
<allow_inactive>auth_admin_keep</allow_inactive>
|
||||||
<allow_active>@NM_MODIFY_SYSTEM_POLICY@</allow_active>
|
<allow_active>auth_admin_keep</allow_active>
|
||||||
</defaults>
|
</defaults>
|
||||||
</action>
|
</action>
|
||||||
|
|
||||||
17
data/org.freedesktop.NetworkManager.rules.in
Normal file
17
data/org.freedesktop.NetworkManager.rules.in
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
// NetworkManager authorizations/policy for the @NM_POLKIT_NOAUTH_GROUP@ group.
|
||||||
|
//
|
||||||
|
// DO NOT EDIT THIS FILE, it will be overwritten on update.
|
||||||
|
//
|
||||||
|
// Allow users in the @NM_POLKIT_NOAUTH_GROUP@ group to create system-wide connections without being
|
||||||
|
// prompted for a password if they are in a local console.
|
||||||
|
// This is optional and is only recommended to maintain backwards compatibility
|
||||||
|
// in systems where it was already working in this way. It is discouraged
|
||||||
|
// otherwise.
|
||||||
|
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" &&
|
||||||
|
subject.isInGroup("@NM_POLKIT_NOAUTH_GROUP@") &&
|
||||||
|
subject.local) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
if enable_introspection
|
if enable_introspection
|
||||||
|
xsltproc = find_program('xsltproc')
|
||||||
|
|
||||||
settings = 'settings-spec'
|
settings = 'settings-spec'
|
||||||
output = settings + '.xml'
|
output = settings + '.xml'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -341,6 +341,7 @@ print ("NetworkManager version " + client.get_version())]]></programlisting></in
|
||||||
<xi:include href="xml/nm-setting-ovs-port.xml"/>
|
<xi:include href="xml/nm-setting-ovs-port.xml"/>
|
||||||
<xi:include href="xml/nm-setting-ppp.xml"/>
|
<xi:include href="xml/nm-setting-ppp.xml"/>
|
||||||
<xi:include href="xml/nm-setting-pppoe.xml"/>
|
<xi:include href="xml/nm-setting-pppoe.xml"/>
|
||||||
|
<xi:include href="xml/nm-setting-prefix-delegation.xml"/>
|
||||||
<xi:include href="xml/nm-setting-proxy.xml"/>
|
<xi:include href="xml/nm-setting-proxy.xml"/>
|
||||||
<xi:include href="xml/nm-setting-serial.xml"/>
|
<xi:include href="xml/nm-setting-serial.xml"/>
|
||||||
<xi:include href="xml/nm-setting-sriov.xml"/>
|
<xi:include href="xml/nm-setting-sriov.xml"/>
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ static const char *
|
||||||
nm_state_to_string(NMState state)
|
nm_state_to_string(NMState state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case NM_STATE_ASLEEP:
|
case NM_STATE_DISABLED:
|
||||||
return "asleep";
|
return "network off";
|
||||||
case NM_STATE_CONNECTING:
|
case NM_STATE_CONNECTING:
|
||||||
return "connecting";
|
return "connecting";
|
||||||
case NM_STATE_CONNECTED_LOCAL:
|
case NM_STATE_CONNECTED_LOCAL:
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ def create_nmc(dbus_connection):
|
||||||
# which has an overhead.
|
# which has an overhead.
|
||||||
#
|
#
|
||||||
# Also, split the GObject creation and the init_async() call in two.
|
# Also, split the GObject creation and the init_async() call in two.
|
||||||
# That allows to pass construct-only parameters, in particular like
|
# That allows one to pass construct-only parameters, in particular like
|
||||||
# the instance_flags.
|
# the instance_flags.
|
||||||
|
|
||||||
# Create a separate context for the NMClient. The NMClient is strongly
|
# Create a separate context for the NMClient. The NMClient is strongly
|
||||||
|
|
|
||||||
92
examples/python/gi/secret-agent.py
Executable file
92
examples/python/gi/secret-agent.py
Executable file
|
|
@ -0,0 +1,92 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
|
import gi
|
||||||
|
|
||||||
|
gi.require_version("NM", "1.0")
|
||||||
|
from gi.repository import GLib, NM, Gio
|
||||||
|
|
||||||
|
# This example shows how to implement a very simple secret agent for
|
||||||
|
# NetworkManager. The secret agent registers to the NM daemon and can
|
||||||
|
# provide missing secrets like Wi-Fi or VPN passwords. Set environment
|
||||||
|
# variable "LIBNM_CLIENT_DEBUG=trace" to enable libnm verbose logging.
|
||||||
|
|
||||||
|
|
||||||
|
class SecretAgent(NM.SecretAgentOld):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__(identifier="MySecretAgent")
|
||||||
|
super().init()
|
||||||
|
|
||||||
|
def do_get_secrets(
|
||||||
|
self,
|
||||||
|
connection,
|
||||||
|
connection_path,
|
||||||
|
setting_name,
|
||||||
|
hints,
|
||||||
|
flags,
|
||||||
|
callback,
|
||||||
|
callback_data,
|
||||||
|
):
|
||||||
|
print(
|
||||||
|
"get_secrets for '{}', interface '{}', setting '{}'".format(
|
||||||
|
connection.get_id(), connection.get_interface_name(), setting_name
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
# Implement here the logic to retrieve the secrets.
|
||||||
|
# As an example, we return a hardcoded Wi-Fi PSK.
|
||||||
|
if (
|
||||||
|
connection.get_connection_type() == "802-11-wireless"
|
||||||
|
and setting_name == "802-11-wireless-security"
|
||||||
|
):
|
||||||
|
s_wifi = connection.get_setting_wireless()
|
||||||
|
ssid = NM.utils_ssid_to_utf8(s_wifi.get_ssid().get_data())
|
||||||
|
|
||||||
|
if ssid == "home":
|
||||||
|
secrets = GLib.Variant(
|
||||||
|
"a{sa{sv}}",
|
||||||
|
{
|
||||||
|
"802-11-wireless-security": {
|
||||||
|
"psk": GLib.Variant("s", "abcd1234")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
|
print("Sending secrets {}".format(secrets))
|
||||||
|
callback(self, connection, secrets, None)
|
||||||
|
return
|
||||||
|
|
||||||
|
# We don't have the secret, NM will ask to another agent or fail
|
||||||
|
callback(
|
||||||
|
self,
|
||||||
|
connection,
|
||||||
|
None,
|
||||||
|
GLib.GError.new_literal(
|
||||||
|
NM.SecretAgentError.quark(),
|
||||||
|
"No secrets found",
|
||||||
|
NM.SecretAgentError.NOSECRETS,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
def do_cancel_get_secrets(self, connection_path, connection_name):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def do_save_secrets(self, connection, connection_path, callback, callback_data):
|
||||||
|
# Implement this if you want to store "agent-owned" secrets
|
||||||
|
callback(self, connection, None)
|
||||||
|
|
||||||
|
def do_delete_secrets(self, connection, connection_path, callback, callback_data):
|
||||||
|
# Implement this if you want to store "agent-owned" secrets
|
||||||
|
callback(self, connection, None)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
agent = SecretAgent()
|
||||||
|
loop = GLib.MainLoop()
|
||||||
|
try:
|
||||||
|
loop.run()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("Exiting Secret Agent...")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
@ -321,7 +321,7 @@
|
||||||
<!--
|
<!--
|
||||||
Reapply:
|
Reapply:
|
||||||
@connection: The optional connection settings that will be reapplied on the device. If empty, the currently active settings-connection will be used. The connection cannot arbitrarily differ from the current applied-connection otherwise the call will fail. Only certain changes are supported, like adding or removing IP addresses.
|
@connection: The optional connection settings that will be reapplied on the device. If empty, the currently active settings-connection will be used. The connection cannot arbitrarily differ from the current applied-connection otherwise the call will fail. Only certain changes are supported, like adding or removing IP addresses.
|
||||||
@version_id: If non-zero, the current version id of the applied-connection must match. The current version id can be retrieved via GetAppliedConnection. This optional argument allows to catch concurrent modifications between the GetAppliedConnection call and Reapply.
|
@version_id: If non-zero, the current version id of the applied-connection must match. The current version id can be retrieved via GetAppliedConnection. This optional argument allows one to catch concurrent modifications between the GetAppliedConnection call and Reapply.
|
||||||
@flags: Flags which would modify the behavior of the Reapply call. Invalid flags are rejected.
|
@flags: Flags which would modify the behavior of the Reapply call. Invalid flags are rejected.
|
||||||
|
|
||||||
Attempts to update the configuration of a device without deactivating it.
|
Attempts to update the configuration of a device without deactivating it.
|
||||||
|
|
@ -337,7 +337,7 @@
|
||||||
settings-connection, or call Reapply. The Reapply call allows you to
|
settings-connection, or call Reapply. The Reapply call allows you to
|
||||||
directly update the applied-connection and reconfigure the device. Reapply
|
directly update the applied-connection and reconfigure the device. Reapply
|
||||||
can also be useful if the currently applied-connection is equal to the
|
can also be useful if the currently applied-connection is equal to the
|
||||||
connection that is about to be reapplied. This allows to reconfigure the
|
connection that is about to be reapplied. This allows one to reconfigure the
|
||||||
device and revert external changes like removing or adding an IP address
|
device and revert external changes like removing or adding an IP address
|
||||||
(which NetworkManager doesn't revert automatically because it is assumed
|
(which NetworkManager doesn't revert automatically because it is assumed
|
||||||
that the user made these changes intentionally outside of NetworkManager).
|
that the user made these changes intentionally outside of NetworkManager).
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,11 @@
|
||||||
note that your distribution or other packages may drop configuration snippets for NetworkManager, such
|
note that your distribution or other packages may drop configuration snippets for NetworkManager, such
|
||||||
that they are part of the factory default.
|
that they are part of the factory default.
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
The options that are indicated as boolean can be set to one of these values:
|
||||||
|
<literal>yes</literal>, <literal>true</literal>, <literal>on</literal>, <literal>1</literal>,
|
||||||
|
<literal>no</literal>, <literal>false</literal>, <literal>off</literal>, <literal>0</literal>.
|
||||||
|
</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|
@ -271,8 +276,7 @@ no-auto-default=*
|
||||||
Set the management mode of the hostname. This parameter will
|
Set the management mode of the hostname. This parameter will
|
||||||
affect only the transient hostname. If a valid static hostname is set,
|
affect only the transient hostname. If a valid static hostname is set,
|
||||||
NetworkManager will skip the update of the hostname despite the value of
|
NetworkManager will skip the update of the hostname despite the value of
|
||||||
this option. An hostname empty or equal to 'localhost', 'localhost6',
|
this option. A hostname empty or equal to '(none)' is considered invalid.
|
||||||
'localhost.localdomain' or 'localhost6.localdomain' is considered invalid.
|
|
||||||
</para>
|
</para>
|
||||||
<para><literal>default</literal>: NetworkManager will update the
|
<para><literal>default</literal>: NetworkManager will update the
|
||||||
hostname with the one provided via DHCP or reverse DNS lookup of the
|
hostname with the one provided via DHCP or reverse DNS lookup of the
|
||||||
|
|
@ -896,11 +900,15 @@ ipv6.ip6-privacy=0
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>connection.mptcp-flags</varname></term>
|
<term><varname>connection.mptcp-flags</varname></term>
|
||||||
<listitem><para>If unspecified, the fallback is 0x22 (<literal>"enabled,subflow"</literal>). Note that if sysctl <literal>/proc/sys/net/mptcp/enabled</literal> is disabled, NetworkManager will still not configure endpoints.</para></listitem>
|
<listitem><para>If unspecified, the fallback is 0x122 (<literal>"enabled,subflow,laminar"</literal>). Note that if sysctl <literal>/proc/sys/net/mptcp/enabled</literal> is disabled, NetworkManager will still not configure endpoints.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>connection.dns-over-tls</varname></term>
|
<term><varname>connection.dns-over-tls</varname></term>
|
||||||
<listitem><para>If unspecified, the ultimate default values depends on the DNS plugin. With systemd-resolved the default currently is global setting and for all other plugins "no" (0).</para></listitem>
|
<listitem><para>If unspecified, the ultimate default values depends on the DNS plugin. With systemd-resolved the default currently is its global setting and for all other plugins "no" (0).</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>connection.dnssec</varname></term>
|
||||||
|
<listitem><para>If unspecified, the ultimate default values depends on the DNS plugin. With systemd-resolved the default currently is its global setting and for all other plugins "no" (0).</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>connection.stable-id</varname></term>
|
<term><varname>connection.stable-id</varname></term>
|
||||||
|
|
@ -942,6 +950,10 @@ ipv6.ip6-privacy=0
|
||||||
<term><varname>ip-tunnel.mtu</varname></term>
|
<term><varname>ip-tunnel.mtu</varname></term>
|
||||||
<listitem><para>If configured explicitly to 0, the MTU is not reconfigured during device activation unless it is required due to IPv6 constraints. If left unspecified, a DHCP/IPv6 SLAAC provided value is used or a default of 1500.</para></listitem>
|
<listitem><para>If configured explicitly to 0, the MTU is not reconfigured during device activation unless it is required due to IPv6 constraints. If left unspecified, a DHCP/IPv6 SLAAC provided value is used or a default of 1500.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>ipv4.forwarding</varname></term>
|
||||||
|
<listitem><para>Whether to configure IPv4 sysctl interface-specific forwarding. When enabled, the interface will act as a router to forward the IPv4 packet from one interface to another. If left unspecified, "auto" is used, so NetworkManager sets the IPv4 forwarding if any shared connection is active, or it will use the kernel default value otherwise. The "ipv4.forwarding" property is ignored when "ipv4.method" is set to "shared", because forwarding is always enabled in this case. The accepted values are: 0: disabled, 1: enabled, 2: auto, 3: ignored (leave the forwarding unchanged).</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>ipv4.routed-dns</varname></term>
|
<term><varname>ipv4.routed-dns</varname></term>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
@ -1090,6 +1102,12 @@ ipv6.ip6-privacy=0
|
||||||
<term><varname>sriov.autoprobe-drivers</varname></term>
|
<term><varname>sriov.autoprobe-drivers</varname></term>
|
||||||
<listitem><para>If left unspecified, drivers are autoprobed when the SR-IOV VF gets created.</para></listitem>
|
<listitem><para>If left unspecified, drivers are autoprobed when the SR-IOV VF gets created.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term><varname>sriov.preserve-on-down</varname></term>
|
||||||
|
<listitem><para>Set to 0 or 1 to select whether the SR-IOV parameters are
|
||||||
|
preserved when the connection is deactivated. If left unspecified, default
|
||||||
|
to 0 (parameters are not preserved). </para></listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>vpn.timeout</varname></term>
|
<term><varname>vpn.timeout</varname></term>
|
||||||
<listitem><para>If left unspecified, default value of 60 seconds is used.</para></listitem>
|
<listitem><para>If left unspecified, default value of 60 seconds is used.</para></listitem>
|
||||||
|
|
@ -1236,12 +1254,13 @@ managed=1
|
||||||
<term><varname>managed</varname></term>
|
<term><varname>managed</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Whether the device is managed or not. A device can be
|
A boolean value specifying whether the device is
|
||||||
marked as managed via udev rules (ENV{NM_UNMANAGED}),
|
managed or not. A device can be marked as managed via
|
||||||
or via setting plugins (keyfile.unmanaged-devices).
|
udev rules (ENV{NM_UNMANAGED}), or via setting plugins
|
||||||
This is yet another way. Note that this configuration
|
(keyfile.unmanaged-devices). This is yet another
|
||||||
can be overruled at runtime via D-Bus. Also, it has
|
way. Note that this configuration can be overruled at
|
||||||
higher priority then udev rules.
|
runtime via D-Bus. Also, it has higher priority than
|
||||||
|
udev rules.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
@ -1310,9 +1329,27 @@ managed=1
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry id="check-connectivity">
|
||||||
|
<term><varname>check-connectivity</varname></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
A boolean value specifying whether NetworkManager will perform a connectivity check
|
||||||
|
for this device. Defaults to <literal>yes</literal>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This setting does nothing if the connectivity check has been
|
||||||
|
disabled globally using the
|
||||||
|
<literal>connectivity.enabled</literal> setting.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
<varlistentry id="keep-configuration">
|
<varlistentry id="keep-configuration">
|
||||||
<term><varname>keep-configuration</varname></term>
|
<term><varname>keep-configuration</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
<para>
|
||||||
|
A boolean value indicating whether the existing device
|
||||||
|
configuration is kept at startup.
|
||||||
|
</para>
|
||||||
<para>
|
<para>
|
||||||
On startup, NetworkManager tries to not interfere with
|
On startup, NetworkManager tries to not interfere with
|
||||||
interfaces that are already configured. It does so by
|
interfaces that are already configured. It does so by
|
||||||
|
|
@ -1375,7 +1412,7 @@ managed=1
|
||||||
scanning. This defaults to <literal>yes</literal> in which case
|
scanning. This defaults to <literal>yes</literal> in which case
|
||||||
a random, locally-administered MAC address will be used.
|
a random, locally-administered MAC address will be used.
|
||||||
The setting <literal>wifi.scan-generate-mac-address-mask</literal>
|
The setting <literal>wifi.scan-generate-mac-address-mask</literal>
|
||||||
allows to influence the generated MAC address to use certain vendor
|
can be used to influence the generated MAC address to use certain vendor
|
||||||
OUIs.
|
OUIs.
|
||||||
If disabled, the MAC address during scanning is left unchanged to
|
If disabled, the MAC address during scanning is left unchanged to
|
||||||
whatever is configured.
|
whatever is configured.
|
||||||
|
|
@ -1399,7 +1436,7 @@ managed=1
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Like the per-connection settings <literal>ethernet.generate-mac-address-mask</literal>
|
Like the per-connection settings <literal>ethernet.generate-mac-address-mask</literal>
|
||||||
and <literal>wifi.generate-mac-address-mask</literal>, this allows to configure the
|
and <literal>wifi.generate-mac-address-mask</literal>, this can be used to configure the
|
||||||
generated MAC addresses during scanning. See <citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
generated MAC addresses during scanning. See <citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||||
for details.
|
for details.
|
||||||
</para>
|
</para>
|
||||||
|
|
@ -1409,16 +1446,16 @@ managed=1
|
||||||
<term><varname>wifi.iwd.autoconnect</varname></term>
|
<term><varname>wifi.iwd.autoconnect</varname></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
If <literal>wifi.backend</literal> is <literal>iwd</literal>, setting this to
|
A boolean value. If <literal>wifi.backend</literal> is <literal>iwd</literal>,
|
||||||
<literal>false</literal> forces IWD's autoconnect mechanism to be disabled for
|
setting this to <literal>false</literal> forces IWD's autoconnect mechanism to be
|
||||||
this device and connections will only be initiated by NetworkManager whether
|
disabled for this device and connections will only be initiated by NetworkManager
|
||||||
commanded by a client or automatically. Leaving it <literal>true</literal> (default)
|
whether commanded by a client or automatically. Leaving it <literal>true</literal>
|
||||||
stops NetworkManager from automatically initiating connections and allows
|
(default) stops NetworkManager from automatically initiating connections and allows
|
||||||
IWD to use its network ranking and scanning logic to decide the best networks
|
IWD to use its network ranking and scanning logic to decide the best networks to
|
||||||
to autoconnect to next. Connections' <literal>autoconnect-priority</literal>,
|
autoconnect to next. Connections' <literal>autoconnect-priority</literal>,
|
||||||
<literal>autoconnect-retries</literal> settings will be ignored. Other settings
|
<literal>autoconnect-retries</literal> settings will be ignored. Other settings like
|
||||||
like <literal>permissions</literal> or <literal>multi-connect</literal> may interfere
|
<literal>permissions</literal> or <literal>multi-connect</literal> may interfere with
|
||||||
with IWD connection attempts.
|
IWD connection attempts.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
@ -1477,7 +1514,7 @@ managed=1
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>enabled</varname></term>
|
<term><varname>enabled</varname></term>
|
||||||
<listitem><para>Whether connectivity check is enabled.
|
<listitem><para>A boolean indicating whether connectivity check is enabled.
|
||||||
Note that to enable connectivity check, a valid uri must
|
Note that to enable connectivity check, a valid uri must
|
||||||
also be configured. The value defaults to true, but since
|
also be configured. The value defaults to true, but since
|
||||||
the uri is unset by default, connectivity check may be disabled.
|
the uri is unset by default, connectivity check may be disabled.
|
||||||
|
|
@ -1531,8 +1568,12 @@ managed=1
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title><literal>global-dns</literal> section</title>
|
<title><literal>global-dns</literal> section</title>
|
||||||
<para>This section specifies DNS settings that are applied
|
<para>This section specifies DNS settings that are applied globally. They
|
||||||
globally, in addition to connection-specific ones.</para>
|
override the equivalent options defined in individual connections, making
|
||||||
|
them to be ignored. If a [global-dns-domain-*] section is defined, but this
|
||||||
|
section isn't, an empty [global-dns] section is assumed, thus overwriting
|
||||||
|
connection specific configurations too.
|
||||||
|
</para>
|
||||||
<para>
|
<para>
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
|
@ -1581,7 +1622,7 @@ managed=1
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title><literal>global-dns-domain</literal> sections</title>
|
<title><literal>global-dns-domain</literal> sections</title>
|
||||||
<para>Sections with a name starting with the "global-dns-domain-"
|
<para>Sections with a name starting with the "global-dns-domain-"
|
||||||
prefix allow to define global DNS configuration for specific
|
prefix allow one to define global DNS configuration for specific
|
||||||
domains. The part of section name after "global-dns-domain-"
|
domains. The part of section name after "global-dns-domain-"
|
||||||
specifies the domain name a section applies to (for example, a
|
specifies the domain name a section applies to (for example, a
|
||||||
section could be named "global-dns-domain-foobar.com"). More
|
section could be named "global-dns-domain-foobar.com"). More
|
||||||
|
|
@ -1592,6 +1633,10 @@ managed=1
|
||||||
default domain "*". When the global DNS domains are valid, the
|
default domain "*". When the global DNS domains are valid, the
|
||||||
name servers and domains defined globally override the ones from
|
name servers and domains defined globally override the ones from
|
||||||
active connections.
|
active connections.
|
||||||
|
|
||||||
|
If any global DNS domain is defined but a [global-dns] section isn't,
|
||||||
|
an empty [global-dns] section is assumed, thus overwriting its
|
||||||
|
connection specific configurations too.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
@ -1933,7 +1978,7 @@ interface-name:vboxnet*,except:interface-name:vboxnet2
|
||||||
<literal>"uuid:83037490-1d17-4986-a397-01f1db3a7fc2"</literal></para></listitem>
|
<literal>"uuid:83037490-1d17-4986-a397-01f1db3a7fc2"</literal></para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>id=ID</term>
|
<term>id:ID</term>
|
||||||
<listitem><para>Match the connection by name.</para></listitem>
|
<listitem><para>Match the connection by name.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,5 @@
|
||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
common_ent_file = configure_file(
|
|
||||||
input: 'common.ent.in',
|
|
||||||
output: '@BASENAME@',
|
|
||||||
configuration: data_conf,
|
|
||||||
)
|
|
||||||
|
|
||||||
xsltproc_options = [
|
|
||||||
xsltproc,
|
|
||||||
'--output', '@OUTPUT@',
|
|
||||||
'--path', meson.current_build_dir(),
|
|
||||||
'--xinclude',
|
|
||||||
'--nonet',
|
|
||||||
'--stringparam', 'man.output.quietly', '1',
|
|
||||||
'--stringparam', 'funcsynopsis.style', 'ansi',
|
|
||||||
'--stringparam', 'man.th.extra1.suppress', '1',
|
|
||||||
'--stringparam', 'man.authors.section.enabled', '0',
|
|
||||||
'--stringparam', 'man.copyright.section.enabled', '0',
|
|
||||||
'--stringparam', 'man.th.title.max.length', '30',
|
|
||||||
]
|
|
||||||
|
|
||||||
docbook_xls = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
|
|
||||||
|
|
||||||
mans_xmls = []
|
|
||||||
|
|
||||||
mans = [
|
mans = [
|
||||||
['NetworkManager', '8'],
|
['NetworkManager', '8'],
|
||||||
['NetworkManager-dispatcher', '8'],
|
['NetworkManager-dispatcher', '8'],
|
||||||
|
|
@ -44,12 +20,62 @@ if enable_nm_cloud_setup
|
||||||
mans += [['nm-cloud-setup', '8']]
|
mans += [['nm-cloud-setup', '8']]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
introspection_mans = [
|
||||||
|
['nm-settings-keyfile', '5'],
|
||||||
|
['nm-settings-dbus', '5'],
|
||||||
|
['nm-settings-nmcli', '5'],
|
||||||
|
]
|
||||||
|
|
||||||
|
if enable_ifcfg_rh
|
||||||
|
introspection_mans += [['nm-settings-ifcfg-rh', '5']]
|
||||||
|
endif
|
||||||
|
|
||||||
|
built_mans = []
|
||||||
|
foreach man: mans + introspection_mans
|
||||||
|
name = man[0] + '.' + man[1]
|
||||||
|
if not fs.exists(name)
|
||||||
|
built_mans = []
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
|
||||||
|
built_mans += name
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
if enable_introspection or enable_docs
|
||||||
|
common_ent_file = configure_file(
|
||||||
|
input: 'common.ent.in',
|
||||||
|
output: '@BASENAME@',
|
||||||
|
configuration: data_conf,
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
|
if enable_introspection and (enable_man or enable_docs)
|
||||||
|
xsltproc_options = [
|
||||||
|
find_program('xsltproc'),
|
||||||
|
'--output', '@OUTPUT@',
|
||||||
|
'--path', meson.current_build_dir(),
|
||||||
|
'--xinclude',
|
||||||
|
'--nonet',
|
||||||
|
'--stringparam', 'man.output.quietly', '1',
|
||||||
|
'--stringparam', 'funcsynopsis.style', 'ansi',
|
||||||
|
'--stringparam', 'man.th.extra1.suppress', '1',
|
||||||
|
'--stringparam', 'man.authors.section.enabled', '0',
|
||||||
|
'--stringparam', 'man.copyright.section.enabled', '0',
|
||||||
|
'--stringparam', 'man.th.title.max.length', '30',
|
||||||
|
]
|
||||||
|
|
||||||
|
docbook_xls = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
|
||||||
|
|
||||||
|
mans_xmls = []
|
||||||
|
|
||||||
foreach man: mans
|
foreach man: mans
|
||||||
input = man[0] + '.xml'
|
input = man[0] + '.xml'
|
||||||
content_files += join_paths(meson.current_source_dir(), input)
|
content_files += join_paths(meson.current_source_dir(), input)
|
||||||
|
|
||||||
output = '@0@.@1@'.format(man[0], man[1])
|
output = '@0@.@1@'.format(man[0], man[1])
|
||||||
|
|
||||||
|
# not needed if only html requested
|
||||||
|
if enable_man
|
||||||
custom_target(
|
custom_target(
|
||||||
output,
|
output,
|
||||||
input: input,
|
input: input,
|
||||||
|
|
@ -59,9 +85,9 @@ foreach man: mans
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(nm_mandir, 'man' + man[1]),
|
install_dir: join_paths(nm_mandir, 'man' + man[1]),
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if enable_introspection
|
|
||||||
merge_cmd = files(source_root / 'tools' / 'generate-docs-nm-settings-docs-merge.py')
|
merge_cmd = files(source_root / 'tools' / 'generate-docs-nm-settings-docs-merge.py')
|
||||||
|
|
||||||
name = 'dbus'
|
name = 'dbus'
|
||||||
|
|
@ -124,6 +150,8 @@ if enable_introspection
|
||||||
|
|
||||||
output = '@0@.@1@'.format(man[0], man[1])
|
output = '@0@.@1@'.format(man[0], man[1])
|
||||||
|
|
||||||
|
# not needed if only html requested
|
||||||
|
if enable_man
|
||||||
custom_target(
|
custom_target(
|
||||||
output,
|
output,
|
||||||
input: input,
|
input: input,
|
||||||
|
|
@ -132,5 +160,13 @@ if enable_introspection
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: join_paths(nm_mandir, 'man' + man[1]),
|
install_dir: join_paths(nm_mandir, 'man' + man[1]),
|
||||||
)
|
)
|
||||||
endforeach
|
endif
|
||||||
|
endforeach
|
||||||
|
# not needed if only html requested
|
||||||
|
elif enable_man
|
||||||
|
if built_mans.length() > 0
|
||||||
|
install_man(built_mans)
|
||||||
|
else
|
||||||
|
error('Building manpages requires xsltproc and -Dintrospection=true, and no prebuilt manpages were found. Try building from a release tarball or using -Dman=false.')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -115,9 +115,9 @@
|
||||||
<title>nm-cloud-setup.service systemd unit</title>
|
<title>nm-cloud-setup.service systemd unit</title>
|
||||||
<para>Usually <command>/usr/libexec/nm-cloud-setup</command> is not run directly,
|
<para>Usually <command>/usr/libexec/nm-cloud-setup</command> is not run directly,
|
||||||
but only by <command>systemctl restart nm-cloud-setup.service</command>. This
|
but only by <command>systemctl restart nm-cloud-setup.service</command>. This
|
||||||
ensures that the tool only runs once at any time. It also allows to integrate
|
ensures that the tool only runs once at any time.
|
||||||
with the nm-cloud-setup systemd timer,
|
The unit is also used by the nm-cloud-setup systemd timer and allows
|
||||||
and to enable/disable the service via systemd.</para>
|
enabling/disabling the service via systemd.</para>
|
||||||
|
|
||||||
<para>As you need to set environment variable to configure nm-cloud-setup binary,
|
<para>As you need to set environment variable to configure nm-cloud-setup binary,
|
||||||
you can do so via systemd override files. Try <command>systemctl edit nm-cloud-setup.service</command>.</para>
|
you can do so via systemd override files. Try <command>systemctl edit nm-cloud-setup.service</command>.</para>
|
||||||
|
|
|
||||||
|
|
@ -154,6 +154,7 @@
|
||||||
<member><option>net.ifnames</option></member>
|
<member><option>net.ifnames</option></member>
|
||||||
<member><option>rd.peerdns</option></member>
|
<member><option>rd.peerdns</option></member>
|
||||||
<member><option>rd.iscsi.ibft</option></member>
|
<member><option>rd.iscsi.ibft</option></member>
|
||||||
|
<member><option>rd.nvmf.nonbft</option></member>
|
||||||
<member><option>rd.bootif</option></member>
|
<member><option>rd.bootif</option></member>
|
||||||
<member><option>rd.neednet</option></member>
|
<member><option>rd.neednet</option></member>
|
||||||
<member><option>rd.ethtool</option></member>
|
<member><option>rd.ethtool</option></member>
|
||||||
|
|
@ -161,6 +162,7 @@
|
||||||
<member><option>rd.net.dns-backend</option></member>
|
<member><option>rd.net.dns-backend</option></member>
|
||||||
<member><option>rd.net.dns-resolve-mode</option></member>
|
<member><option>rd.net.dns-resolve-mode</option></member>
|
||||||
<member><option>rd.net.timeout.dhcp</option></member>
|
<member><option>rd.net.timeout.dhcp</option></member>
|
||||||
|
<member><option>rd.net.dhcp.client-id</option></member>
|
||||||
<member><option>rd.net.dhcp.retry</option></member>
|
<member><option>rd.net.dhcp.retry</option></member>
|
||||||
<member><option>rd.net.dhcp.vendor-class</option></member>
|
<member><option>rd.net.dhcp.vendor-class</option></member>
|
||||||
<member><option>rd.net.dhcp.dscp</option></member>
|
<member><option>rd.net.dhcp.dscp</option></member>
|
||||||
|
|
@ -267,6 +269,23 @@
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>NetworkManager supports the
|
||||||
|
<option>rd.net.dhcp.client-id</option>=<replaceable>interface</replaceable>:<replaceable>client-id</replaceable>
|
||||||
|
kernel command line option to set a specific DHCPv4 client identifier
|
||||||
|
for the given interface. The client-id can be specified either as a
|
||||||
|
sequence of bytes in hexadecimal format separated by dashes, or as the
|
||||||
|
character '@' followed by a non-empty string. When using the second
|
||||||
|
format, NetworkManager prepends a zero byte to the given string,
|
||||||
|
according to section 9.14 of RFC 2132. See the "ipv4.dhcp-client-id"
|
||||||
|
section of <link
|
||||||
|
linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
|
||||||
|
for more details. Examples:
|
||||||
|
<literal>rd.net.dhcp.client-id=eth0:01-52-54-00-45-87-42</literal>,
|
||||||
|
<literal>rd.net.dhcp.client-id=enp1s0:@example.com</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|
@ -277,6 +296,7 @@
|
||||||
|
|
||||||
<refsect1 id='see_also'><title>See Also</title>
|
<refsect1 id='see_also'><title>See Also</title>
|
||||||
<para><link linkend='dracut.cmdline'><citerefentry><refentrytitle>dracut.cmdline</refentrytitle><manvolnum>7</manvolnum></citerefentry></link>,
|
<para><link linkend='dracut.cmdline'><citerefentry><refentrytitle>dracut.cmdline</refentrytitle><manvolnum>7</manvolnum></citerefentry></link>,
|
||||||
<link linkend='NetworkManager'><citerefentry><refentrytitle>NetworkManager</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>.</para>
|
<link linkend='NetworkManager'><citerefentry><refentrytitle>NetworkManager</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
|
||||||
|
<link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,10 @@
|
||||||
NetworkManager inserts the records for Bridges into OVSDB when a Port is
|
NetworkManager inserts the records for Bridges into OVSDB when a Port is
|
||||||
attached.
|
attached.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>Known limitation: when the last NetworkManager's owned port is removed,
|
||||||
|
the bridge is removed too, even if there are other externally attached ports.
|
||||||
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
<refsect2>
|
<refsect2>
|
||||||
|
|
@ -102,6 +106,10 @@
|
||||||
exist. Ports can also be configured to do VLAN tagging or Bonding.
|
exist. Ports can also be configured to do VLAN tagging or Bonding.
|
||||||
NetworkManager inserts the records for Ports into OVSDB when an Interface is
|
NetworkManager inserts the records for Ports into OVSDB when an Interface is
|
||||||
attached. Ports must be attached to a Bridge.</para>
|
attached. Ports must be attached to a Bridge.</para>
|
||||||
|
|
||||||
|
<para>Known limitation: when the last NetworkManager's owned interface is removed,
|
||||||
|
the port is removed too, even if there are other externally attached interfaces.
|
||||||
|
</para>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
|
|
||||||
<refsect2>
|
<refsect2>
|
||||||
|
|
|
||||||
|
|
@ -1066,15 +1066,16 @@
|
||||||
<listitem><para><literal>dummy</literal></para></listitem>
|
<listitem><para><literal>dummy</literal></para></listitem>
|
||||||
<listitem><para><literal>generic</literal></para></listitem>
|
<listitem><para><literal>generic</literal></para></listitem>
|
||||||
<listitem><para><literal>gsm</literal></para></listitem>
|
<listitem><para><literal>gsm</literal></para></listitem>
|
||||||
|
<listitem><para><literal>hsr</literal></para></listitem>
|
||||||
<listitem><para><literal>infiniband</literal></para></listitem>
|
<listitem><para><literal>infiniband</literal></para></listitem>
|
||||||
<listitem><para><literal>ip-tunnel</literal></para></listitem>
|
<listitem><para><literal>ip-tunnel</literal></para></listitem>
|
||||||
|
<listitem><para><literal>ipvlan</literal></para></listitem>
|
||||||
|
<listitem><para><literal>loopback</literal></para></listitem>
|
||||||
<listitem><para><literal>macsec</literal></para></listitem>
|
<listitem><para><literal>macsec</literal></para></listitem>
|
||||||
<listitem><para><literal>macvlan</literal></para></listitem>
|
<listitem><para><literal>macvlan</literal></para></listitem>
|
||||||
<listitem><para><literal>olpc-mesh</literal></para></listitem>
|
<listitem><para><literal>olpc-mesh</literal></para></listitem>
|
||||||
<listitem><para><literal>ovs-bridge</literal></para></listitem>
|
<listitem><para><literal>ovs-bridge</literal></para></listitem>
|
||||||
<listitem><para><literal>ovs-dpdk</literal></para></listitem>
|
|
||||||
<listitem><para><literal>ovs-interface</literal></para></listitem>
|
<listitem><para><literal>ovs-interface</literal></para></listitem>
|
||||||
<listitem><para><literal>ovs-patch</literal></para></listitem>
|
|
||||||
<listitem><para><literal>ovs-port</literal></para></listitem>
|
<listitem><para><literal>ovs-port</literal></para></listitem>
|
||||||
<listitem><para><literal>pppoe</literal></para></listitem>
|
<listitem><para><literal>pppoe</literal></para></listitem>
|
||||||
<listitem><para><literal>team</literal></para></listitem>
|
<listitem><para><literal>team</literal></para></listitem>
|
||||||
|
|
|
||||||
126
meson.build
126
meson.build
|
|
@ -5,14 +5,14 @@ project(
|
||||||
# NOTE: When incrementing version also add corresponding
|
# NOTE: When incrementing version also add corresponding
|
||||||
# NM_VERSION_x_y_z macros in
|
# NM_VERSION_x_y_z macros in
|
||||||
# "src/libnm-core-public/nm-version-macros.h.in"
|
# "src/libnm-core-public/nm-version-macros.h.in"
|
||||||
version: '1.52.0',
|
version: '1.57.1',
|
||||||
license: 'GPL2+',
|
license: 'GPL2+',
|
||||||
default_options: [
|
default_options: [
|
||||||
'buildtype=debugoptimized',
|
'buildtype=debugoptimized',
|
||||||
'c_std=gnu11',
|
'c_std=gnu11',
|
||||||
'warning_level=2' # value "2" will add "-Wall" and "-Wextra" to the compiler flags
|
'warning_level=2' # value "2" will add "-Wall" and "-Wextra" to the compiler flags
|
||||||
],
|
],
|
||||||
meson_version: '>= 0.51.0',
|
meson_version: '>= 0.53.0',
|
||||||
)
|
)
|
||||||
|
|
||||||
nm_name = meson.project_name()
|
nm_name = meson.project_name()
|
||||||
|
|
@ -77,6 +77,7 @@ libnm_version = '@0@.@1@.@2@'.format(current - age, age, revision)
|
||||||
|
|
||||||
libnm_pkgincludedir = join_paths(nm_includedir, libnm_name)
|
libnm_pkgincludedir = join_paths(nm_includedir, libnm_name)
|
||||||
|
|
||||||
|
fs = import('fs')
|
||||||
gnome = import('gnome')
|
gnome = import('gnome')
|
||||||
i18n = import('i18n')
|
i18n = import('i18n')
|
||||||
pkg = import('pkgconfig')
|
pkg = import('pkgconfig')
|
||||||
|
|
@ -89,7 +90,6 @@ po_dir = source_root / 'po'
|
||||||
top_inc = include_directories('.')
|
top_inc = include_directories('.')
|
||||||
|
|
||||||
perl = find_program('perl')
|
perl = find_program('perl')
|
||||||
xsltproc = find_program('xsltproc')
|
|
||||||
|
|
||||||
check_exports = find_program(join_paths(source_root, 'tools', 'check-exports.sh'))
|
check_exports = find_program(join_paths(source_root, 'tools', 'check-exports.sh'))
|
||||||
|
|
||||||
|
|
@ -137,6 +137,9 @@ config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix:
|
||||||
config_h.set10('HAVE_DECL_EXPLICIT_BZERO', cc.has_function('explicit_bzero', prefix: '#include <string.h>'))
|
config_h.set10('HAVE_DECL_EXPLICIT_BZERO', cc.has_function('explicit_bzero', prefix: '#include <string.h>'))
|
||||||
config_h.set10('HAVE_DECL_MEMFD_CREATE', cc.has_function('memfd_create', prefix: '#include <sys/mman.h>'))
|
config_h.set10('HAVE_DECL_MEMFD_CREATE', cc.has_function('memfd_create', prefix: '#include <sys/mman.h>'))
|
||||||
|
|
||||||
|
config_h.set10('HAVE_DLVSYM', cc.has_function('dlvsym', prefix: '''#define _GNU_SOURCE
|
||||||
|
#include <dlfcn.h>'''))
|
||||||
|
|
||||||
# types
|
# types
|
||||||
config_h.set('SIZEOF_PID_T', cc.sizeof('pid_t', prefix : '#include <sys/types.h>'))
|
config_h.set('SIZEOF_PID_T', cc.sizeof('pid_t', prefix : '#include <sys/types.h>'))
|
||||||
config_h.set('SIZEOF_UID_T', cc.sizeof('uid_t', prefix : '#include <sys/types.h>'))
|
config_h.set('SIZEOF_UID_T', cc.sizeof('uid_t', prefix : '#include <sys/types.h>'))
|
||||||
|
|
@ -173,13 +176,13 @@ endif
|
||||||
|
|
||||||
enable_lto = get_option('b_lto')
|
enable_lto = get_option('b_lto')
|
||||||
if enable_lto
|
if enable_lto
|
||||||
|
cc_version = cc.version()
|
||||||
if cc.get_id() == 'clang'
|
if cc.get_id() == 'clang'
|
||||||
clang_version = cc.version()
|
if cc_version <= '18.0.0'
|
||||||
if clang_version <= '18.0.0'
|
error('Clang version should be greater than 18.0.0, got : ' + cc_version)
|
||||||
error('Clang version should be greater then 18.0.0 got : ' + clang_version)
|
|
||||||
endif
|
endif
|
||||||
else
|
elif cc_version < '12.0'
|
||||||
# Meson already adds '-flto'
|
# GCC < 12 breaks libnm symbol versioning with LTO, use workarounds
|
||||||
lto_flag = '-flto-partition=none'
|
lto_flag = '-flto-partition=none'
|
||||||
assert(cc.has_argument(lto_flag), '-flto-partition=none not supported. Disable link-time optimization with -Db_lto=false.')
|
assert(cc.has_argument(lto_flag), '-flto-partition=none not supported. Disable link-time optimization with -Db_lto=false.')
|
||||||
common_flags += lto_flag
|
common_flags += lto_flag
|
||||||
|
|
@ -324,12 +327,17 @@ config_h.set10('WITH_CONFIG_PLUGIN_IFUPDOWN', enable_ifupdown)
|
||||||
config_h.set_quoted('NM_DIST_VERSION', dist_version)
|
config_h.set_quoted('NM_DIST_VERSION', dist_version)
|
||||||
|
|
||||||
enable_wifi = get_option('wifi')
|
enable_wifi = get_option('wifi')
|
||||||
|
config_h.set10('WITH_WIFI', enable_wifi)
|
||||||
|
|
||||||
enable_iwd = get_option('iwd')
|
enable_iwd = get_option('iwd')
|
||||||
assert((not enable_iwd) or enable_wifi, 'Enabling iwd support requires Wi-Fi support as well')
|
assert((not enable_iwd) or enable_wifi, 'Enabling iwd support requires Wi-Fi support as well')
|
||||||
config_h.set10('WITH_IWD', enable_iwd)
|
config_h.set10('WITH_IWD', enable_iwd)
|
||||||
|
|
||||||
enable_wext = get_option('wext')
|
wext = get_option('wext')
|
||||||
|
if wext == 'true'
|
||||||
|
error('Wireless Extensions support is deprecated and will be removed in the future. Use -Dwext=force to keep using it')
|
||||||
|
endif
|
||||||
|
enable_wext = (wext == 'force')
|
||||||
config_h.set10('HAVE_WEXT', enable_wext)
|
config_h.set10('HAVE_WEXT', enable_wext)
|
||||||
|
|
||||||
# Checks for libdl - on certain platforms its part of libc
|
# Checks for libdl - on certain platforms its part of libc
|
||||||
|
|
@ -379,6 +387,14 @@ if install_systemdunitdir and systemd_systemdsystemunitdir == ''
|
||||||
systemd_systemdsystemunitdir = systemd_dep.get_variable(pkgconfig: 'systemdsystemunitdir', pkgconfig_define: ['rootprefix', nm_prefix])
|
systemd_systemdsystemunitdir = systemd_dep.get_variable(pkgconfig: 'systemdsystemunitdir', pkgconfig_define: ['rootprefix', nm_prefix])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
systemd_systemdsystemgeneratordir = get_option('systemdsystemgeneratordir')
|
||||||
|
install_systemdgeneratordir = (systemd_systemdsystemgeneratordir != 'no')
|
||||||
|
|
||||||
|
if install_systemdgeneratordir and systemd_systemdsystemgeneratordir == ''
|
||||||
|
assert(systemd_dep.found(), 'systemd required but not found, please provide a valid systemd user generator dir or disable it')
|
||||||
|
systemd_systemdsystemgeneratordir = systemd_dep.get_variable(pkgconfig: 'systemdsystemgeneratordir', pkgconfig_define: ['rootprefix', nm_prefix])
|
||||||
|
endif
|
||||||
|
|
||||||
enable_systemd_journal = get_option('systemd_journal')
|
enable_systemd_journal = get_option('systemd_journal')
|
||||||
if enable_systemd_journal
|
if enable_systemd_journal
|
||||||
assert(libsystemd_dep.found(), 'Missing systemd-journald support')
|
assert(libsystemd_dep.found(), 'Missing systemd-journald support')
|
||||||
|
|
@ -473,19 +489,6 @@ if enable_selinux
|
||||||
endif
|
endif
|
||||||
config_h.set10('HAVE_SELINUX', enable_selinux)
|
config_h.set10('HAVE_SELINUX', enable_selinux)
|
||||||
|
|
||||||
# eBPF support
|
|
||||||
ebpf_opt = get_option('ebpf')
|
|
||||||
# 'auto' means 'false', because there are still issues.
|
|
||||||
if ebpf_opt != 'true'
|
|
||||||
enable_ebpf = false
|
|
||||||
else
|
|
||||||
enable_ebpf = true
|
|
||||||
if not cc.has_header('linux/bpf.h')
|
|
||||||
assert(ebpf_opt != 'true', 'eBPF requires kernel support')
|
|
||||||
enable_ebpf = false
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# libaudit support
|
# libaudit support
|
||||||
libaudit = get_option('libaudit')
|
libaudit = get_option('libaudit')
|
||||||
enable_libaudit = libaudit.contains('yes')
|
enable_libaudit = libaudit.contains('yes')
|
||||||
|
|
@ -504,12 +507,14 @@ if enable_teamdctl
|
||||||
libteamdctl_dep = dependency('libteamdctl', version: '>= 1.9')
|
libteamdctl_dep = dependency('libteamdctl', version: '>= 1.9')
|
||||||
assert(libteamdctl_dep.found(), 'You must have libteamdctl installed to build. Use -Dteamdctl=false to disable it')
|
assert(libteamdctl_dep.found(), 'You must have libteamdctl installed to build. Use -Dteamdctl=false to disable it')
|
||||||
endif
|
endif
|
||||||
|
config_h.set10('WITH_TEAMDCTL', enable_teamdctl)
|
||||||
|
|
||||||
# polkit
|
# polkit
|
||||||
enable_polkit = get_option('polkit')
|
enable_polkit = get_option('polkit')
|
||||||
if enable_polkit
|
if enable_polkit
|
||||||
# FIXME: policydir should be relative to `datadir`, not `prefix`. Fixed in https://gitlab.freedesktop.org/polkit/polkit/merge_requests/2
|
# FIXME: policydir should be relative to `datadir`, not `prefix`. Fixed in https://gitlab.freedesktop.org/polkit/polkit/merge_requests/2
|
||||||
polkit_gobject_policydir = dependency('polkit-gobject-1').get_variable(pkgconfig: 'policydir', pkgconfig_define: ['prefix', nm_prefix])
|
polkit_policydir = dependency('polkit-gobject-1').get_variable(pkgconfig: 'policydir', pkgconfig_define: ['prefix', nm_prefix])
|
||||||
|
polkit_rulesdir = join_paths(fs.parent(polkit_policydir), 'rules.d')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config_auth_polkit_default = get_option('config_auth_polkit_default')
|
config_auth_polkit_default = get_option('config_auth_polkit_default')
|
||||||
|
|
@ -519,6 +524,12 @@ endif
|
||||||
config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT', config_auth_polkit_default)
|
config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT', config_auth_polkit_default)
|
||||||
|
|
||||||
enable_modify_system = get_option('modify_system')
|
enable_modify_system = get_option('modify_system')
|
||||||
|
if enable_modify_system
|
||||||
|
# FIXME: remove this after everyone has stopped using modify_system
|
||||||
|
error('modify_system=true is no longer allowed due to security reasons')
|
||||||
|
endif
|
||||||
|
|
||||||
|
polkit_noauth_group = get_option('polkit_noauth_group')
|
||||||
|
|
||||||
polkit_agent_helper_1_path = get_option('polkit_agent_helper_1')
|
polkit_agent_helper_1_path = get_option('polkit_agent_helper_1')
|
||||||
foreach p : [ '/usr/libexec/polkit-agent-helper-1',
|
foreach p : [ '/usr/libexec/polkit-agent-helper-1',
|
||||||
|
|
@ -613,6 +624,7 @@ if enable_modem_manager
|
||||||
endif
|
endif
|
||||||
config_h.set_quoted('MOBILE_BROADBAND_PROVIDER_INFO_DATABASE', mobile_broadband_provider_info_database)
|
config_h.set_quoted('MOBILE_BROADBAND_PROVIDER_INFO_DATABASE', mobile_broadband_provider_info_database)
|
||||||
endif
|
endif
|
||||||
|
config_h.set10('WITH_WWAN', enable_modem_manager)
|
||||||
|
|
||||||
# Bluez5 DUN support
|
# Bluez5 DUN support
|
||||||
enable_bluez5_dun = get_option('bluez5_dun')
|
enable_bluez5_dun = get_option('bluez5_dun')
|
||||||
|
|
@ -723,6 +735,7 @@ default_paths = ['/sbin', '/usr/sbin']
|
||||||
|
|
||||||
# 0: cmdline option, 1: paths, 2: fallback
|
# 0: cmdline option, 1: paths, 2: fallback
|
||||||
progs = [['iptables', default_paths, '/usr/sbin/iptables'],
|
progs = [['iptables', default_paths, '/usr/sbin/iptables'],
|
||||||
|
['ip6tables', default_paths, '/usr/sbin/ip6tables'],
|
||||||
['nft', default_paths, '/usr/sbin/nft'],
|
['nft', default_paths, '/usr/sbin/nft'],
|
||||||
['dnsmasq', default_paths, ''],
|
['dnsmasq', default_paths, ''],
|
||||||
['modprobe', default_paths, '/sbin/modprobe']
|
['modprobe', default_paths, '/sbin/modprobe']
|
||||||
|
|
@ -812,6 +825,7 @@ if enable_nm_cloud_setup
|
||||||
assert(jansson_dep.found(), 'nm-cloud-setup requires jansson library. Use -Dnm_cloud_setup=false to disable it')
|
assert(jansson_dep.found(), 'nm-cloud-setup requires jansson library. Use -Dnm_cloud_setup=false to disable it')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
enable_man = get_option('man')
|
||||||
enable_docs = get_option('docs')
|
enable_docs = get_option('docs')
|
||||||
|
|
||||||
more_asserts = get_option('more_asserts')
|
more_asserts = get_option('more_asserts')
|
||||||
|
|
@ -910,7 +924,6 @@ endif
|
||||||
test_args = [
|
test_args = [
|
||||||
'--called-from-make',
|
'--called-from-make',
|
||||||
build_root,
|
build_root,
|
||||||
'',
|
|
||||||
enable_valgrind ? valgrind_path : '',
|
enable_valgrind ? valgrind_path : '',
|
||||||
enable_valgrind ? valgrind_suppressions_path : '',
|
enable_valgrind ? valgrind_suppressions_path : '',
|
||||||
'--launch-dbus=auto',
|
'--launch-dbus=auto',
|
||||||
|
|
@ -928,6 +941,14 @@ if python.found()
|
||||||
config_h.set_quoted('TEST_NM_PYTHON', python_path)
|
config_h.set_quoted('TEST_NM_PYTHON', python_path)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# libnvme (NBFT support)
|
||||||
|
enable_nbft = get_option('nbft')
|
||||||
|
if enable_nbft
|
||||||
|
libnvme_dep = dependency('libnvme', version: '>= 1.5', required: false)
|
||||||
|
assert(libnvme_dep.found(), 'NBFT support was requested, but the libnvme library is not available. Use -Dnbft=false to build without it.')
|
||||||
|
endif
|
||||||
|
config_h.set10('WITH_NBFT', enable_nbft)
|
||||||
|
|
||||||
data_conf = configuration_data()
|
data_conf = configuration_data()
|
||||||
data_conf.set('DISTRO_NETWORK_SERVICE', (enable_ifcfg_rh ? 'network.service' : ''))
|
data_conf.set('DISTRO_NETWORK_SERVICE', (enable_ifcfg_rh ? 'network.service' : ''))
|
||||||
data_conf.set('NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT', config_default_logging_audit)
|
data_conf.set('NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT', config_default_logging_audit)
|
||||||
|
|
@ -941,7 +962,6 @@ data_conf.set('NM_DHCP_CLIENTS_ENABLED', ', '.join(config_dhcp_c
|
||||||
data_conf.set('NM_MAJOR_VERSION', nm_major_version)
|
data_conf.set('NM_MAJOR_VERSION', nm_major_version)
|
||||||
data_conf.set('NM_MICRO_VERSION', nm_micro_version)
|
data_conf.set('NM_MICRO_VERSION', nm_micro_version)
|
||||||
data_conf.set('NM_MINOR_VERSION', nm_minor_version)
|
data_conf.set('NM_MINOR_VERSION', nm_minor_version)
|
||||||
data_conf.set('NM_MODIFY_SYSTEM_POLICY', (enable_modify_system ? 'yes' : 'auth_admin_keep'))
|
|
||||||
data_conf.set('NM_VERSION', nm_version)
|
data_conf.set('NM_VERSION', nm_version)
|
||||||
data_conf.set('VERSION', nm_version)
|
data_conf.set('VERSION', nm_version)
|
||||||
data_conf.set('bindir', nm_bindir)
|
data_conf.set('bindir', nm_bindir)
|
||||||
|
|
@ -952,38 +972,6 @@ data_conf.set('nmstatedir', nm_pkgstatedir)
|
||||||
data_conf.set('sbindir', nm_sbindir)
|
data_conf.set('sbindir', nm_sbindir)
|
||||||
data_conf.set('sysconfdir', nm_sysconfdir)
|
data_conf.set('sysconfdir', nm_sysconfdir)
|
||||||
|
|
||||||
# check if we can build setting property documentation
|
|
||||||
'''
|
|
||||||
build_docs=no
|
|
||||||
if test -n "$INTROSPECTION_MAKEFILE"; then
|
|
||||||
# If g-i is installed we know we have python, but we might not have pygobject
|
|
||||||
if ! "$PYTHON" -c 'from gi.repository import GObject' >& /dev/null; then
|
|
||||||
AC_MSG_ERROR(["--enable-introspection aims to build the settings documentation. This requires GObject introspection for python (pygobject)])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_PATH_PROG(PERL, perl)
|
|
||||||
if test -z "$PERL"; then
|
|
||||||
AC_MSG_ERROR([--enable-introspection requires perl])
|
|
||||||
fi
|
|
||||||
AC_PATH_PROG(XSLTPROC, xsltproc)
|
|
||||||
if test -z "$XSLTPROC"; then
|
|
||||||
AC_MSG_ERROR([--enable-introspection requires xsltproc])
|
|
||||||
fi
|
|
||||||
|
|
||||||
have_introspection=yes
|
|
||||||
if test "$enable_gtk_doc" = "yes"; then
|
|
||||||
build_docs=yes
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if test "$enable_gtk_doc" = "yes"; then
|
|
||||||
# large parts of the documentation require introspection/pygobject to extract
|
|
||||||
# the documentation out of the source files. You cannot enable gtk-doc without alone.
|
|
||||||
AC_MSG_ERROR(["--with-gtk-doc requires --enable-introspection"])
|
|
||||||
fi
|
|
||||||
have_introspection=no
|
|
||||||
fi
|
|
||||||
'''
|
|
||||||
|
|
||||||
content_files = []
|
content_files = []
|
||||||
|
|
||||||
subdir('introspection')
|
subdir('introspection')
|
||||||
|
|
@ -1021,9 +1009,14 @@ if enable_qt != 'false'
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# The man/ directory builds a couple targets needed by the docs build too.
|
||||||
|
# If we build with docs but no man, then enter the subdir and only build
|
||||||
|
# some targets.
|
||||||
|
if enable_docs or enable_man
|
||||||
|
subdir('man')
|
||||||
|
endif
|
||||||
if enable_docs
|
if enable_docs
|
||||||
assert(enable_introspection, '-Ddocs=true requires -Dintrospection=true')
|
assert(enable_introspection, '-Ddocs=true requires -Dintrospection=true')
|
||||||
subdir('man')
|
|
||||||
subdir('docs')
|
subdir('docs')
|
||||||
meson.add_dist_script(
|
meson.add_dist_script(
|
||||||
'tools/meson-dist-data.sh',
|
'tools/meson-dist-data.sh',
|
||||||
|
|
@ -1074,7 +1067,7 @@ meson.add_install_script(
|
||||||
nm_pkgstatedir,
|
nm_pkgstatedir,
|
||||||
nm_mandir,
|
nm_mandir,
|
||||||
nm_sysconfdir,
|
nm_sysconfdir,
|
||||||
enable_docs ? '1' : '0',
|
enable_man ? '1' : '0',
|
||||||
enable_ifcfg_rh ? '1' : '0',
|
enable_ifcfg_rh ? '1' : '0',
|
||||||
enable_nm_cloud_setup ? '1' : '0',
|
enable_nm_cloud_setup ? '1' : '0',
|
||||||
install_systemdunitdir ? '1' : '0',
|
install_systemdunitdir ? '1' : '0',
|
||||||
|
|
@ -1084,6 +1077,7 @@ output = '\nSystem paths:\n'
|
||||||
output += ' prefix: ' + nm_prefix + '\n'
|
output += ' prefix: ' + nm_prefix + '\n'
|
||||||
output += ' exec_prefix: ' + nm_prefix + '\n'
|
output += ' exec_prefix: ' + nm_prefix + '\n'
|
||||||
output += ' systemdunitdir: ' + systemd_systemdsystemunitdir + '\n'
|
output += ' systemdunitdir: ' + systemd_systemdsystemunitdir + '\n'
|
||||||
|
output += ' systemdgeneratordir: ' + systemd_systemdsystemgeneratordir + '\n'
|
||||||
output += ' udev_dir: ' + udev_udevdir + '\n'
|
output += ' udev_dir: ' + udev_udevdir + '\n'
|
||||||
output += ' nmbinary: ' + nm_pkgsbindir + '\n'
|
output += ' nmbinary: ' + nm_pkgsbindir + '\n'
|
||||||
output += ' nmconfdir: ' + nm_pkgconfdir + '\n'
|
output += ' nmconfdir: ' + nm_pkgconfdir + '\n'
|
||||||
|
|
@ -1098,17 +1092,7 @@ output += ' dbus_conf_dir: ' + dbus_conf_dir + '\n'
|
||||||
output += '\nPlatform:\n'
|
output += '\nPlatform:\n'
|
||||||
output += ' session tracking: ' + ','.join(session_trackers) + '\n'
|
output += ' session tracking: ' + ','.join(session_trackers) + '\n'
|
||||||
output += ' suspend/resume: ' + suspend_resume + '\n'
|
output += ' suspend/resume: ' + suspend_resume + '\n'
|
||||||
output += ' policykit: ' + enable_polkit.to_string() + ' (default: ' + config_auth_polkit_default + ')'
|
output += ' policykit: ' + enable_polkit.to_string() + ' (default: ' + config_auth_polkit_default + ', noauth_group: "' + polkit_noauth_group + '")\n'
|
||||||
if enable_polkit
|
|
||||||
output += ' ('
|
|
||||||
if enable_modify_system
|
|
||||||
output += 'permissive'
|
|
||||||
else
|
|
||||||
output += 'restrictive'
|
|
||||||
endif
|
|
||||||
output += ' modify.system)'
|
|
||||||
endif
|
|
||||||
output += '\n'
|
|
||||||
output += ' polkit-agent-helper-1: ' + polkit_agent_helper_1_path + '\n'
|
output += ' polkit-agent-helper-1: ' + polkit_agent_helper_1_path + '\n'
|
||||||
output += ' selinux: ' + enable_selinux.to_string() + '\n'
|
output += ' selinux: ' + enable_selinux.to_string() + '\n'
|
||||||
output += ' systemd-journald: ' + enable_systemd_journal.to_string() + ' (default: logging.backend=' + config_logging_backend_default + ')\n'
|
output += ' systemd-journald: ' + enable_systemd_journal.to_string() + ' (default: logging.backend=' + config_logging_backend_default + ')\n'
|
||||||
|
|
@ -1125,6 +1109,7 @@ endif
|
||||||
output += '\n'
|
output += '\n'
|
||||||
output += ' jansson: ' + jansson_msg + '\n'
|
output += ' jansson: ' + jansson_msg + '\n'
|
||||||
output += ' iptables: ' + config_h.get('IPTABLES_PATH') + '\n'
|
output += ' iptables: ' + config_h.get('IPTABLES_PATH') + '\n'
|
||||||
|
output += ' ip6tables: ' + config_h.get('IP6TABLES_PATH') + '\n'
|
||||||
output += ' nft: ' + config_h.get('NFT_PATH') + '\n'
|
output += ' nft: ' + config_h.get('NFT_PATH') + '\n'
|
||||||
output += ' modprobe: ' + config_h.get('MODPROBE_PATH') + '\n'
|
output += ' modprobe: ' + config_h.get('MODPROBE_PATH') + '\n'
|
||||||
output += ' modemmanager-1: ' + enable_modem_manager.to_string() + '\n'
|
output += ' modemmanager-1: ' + enable_modem_manager.to_string() + '\n'
|
||||||
|
|
@ -1171,6 +1156,5 @@ output += 'have-nss: ' + crypto_nss_dep.found().to_string() + ')\n'
|
||||||
output += ' sanitizers: ' + get_option('b_sanitize') + '\n'
|
output += ' sanitizers: ' + get_option('b_sanitize') + '\n'
|
||||||
output += ' Mozilla Public Suffix List: ' + enable_libpsl.to_string() + '\n'
|
output += ' Mozilla Public Suffix List: ' + enable_libpsl.to_string() + '\n'
|
||||||
output += ' vapi: ' + enable_vapi.to_string() + '\n'
|
output += ' vapi: ' + enable_vapi.to_string() + '\n'
|
||||||
output += ' ebpf: ' + enable_ebpf.to_string() + '\n'
|
|
||||||
output += ' readline: ' + with_readline + '\n'
|
output += ' readline: ' + with_readline + '\n'
|
||||||
message(output)
|
message(output)
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
# system paths
|
# system paths
|
||||||
option('systemdsystemunitdir', type: 'string', value: '', description: 'Directory for systemd service files')
|
option('systemdsystemunitdir', type: 'string', value: '', description: 'Directory for systemd service files')
|
||||||
|
option('systemdsystemgeneratordir', type: 'string', value: '', description: 'Directory for systemd generator files')
|
||||||
option('system_ca_path', type: 'string', value: '/etc/ssl/certs', description: 'path to system CA certificates')
|
option('system_ca_path', type: 'string', value: '/etc/ssl/certs', description: 'path to system CA certificates')
|
||||||
option('udev_dir', type: 'string', value: '', description: 'Absolute path of the udev base directory. Set to \'no\' not to install the udev rule')
|
option('udev_dir', type: 'string', value: '', description: 'Absolute path of the udev base directory. Set to \'no\' not to install the udev rule')
|
||||||
option('dbus_conf_dir', type: 'string', value: '', description: 'where D-Bus system.d directory is')
|
option('dbus_conf_dir', type: 'string', value: '', description: 'where D-Bus system.d directory is')
|
||||||
option('kernel_firmware_dir', type: 'string', value: '/lib/firmware', description: 'where kernel firmware directory is (default is /lib/firmware)')
|
option('kernel_firmware_dir', type: 'string', value: '/lib/firmware', description: 'where kernel firmware directory is (default is /lib/firmware)')
|
||||||
option('runtime_dir', type: 'string', value: '', description: 'Directory for transient runtime state [default: LOCALSTATEDIR/run or /run]')
|
option('runtime_dir', type: 'string', value: '', description: 'Directory for transient runtime state [default: LOCALSTATEDIR/run or /run]')
|
||||||
option('iptables', type: 'string', value: '', description: 'path to iptables')
|
option('iptables', type: 'string', value: '', description: 'path to iptables')
|
||||||
|
option('ip6tables', type: 'string', value: '', description: 'path to ip6tables')
|
||||||
option('nft', type: 'string', value: '', description: 'path to nft')
|
option('nft', type: 'string', value: '', description: 'path to nft')
|
||||||
option('dnsmasq', type: 'string', value: '', description: 'path to dnsmasq')
|
option('dnsmasq', type: 'string', value: '', description: 'path to dnsmasq')
|
||||||
option('modprobe', type: 'string', value: '', description: 'path to modprobe')
|
option('modprobe', type: 'string', value: '', description: 'path to modprobe')
|
||||||
|
|
@ -17,7 +19,8 @@ option('session_tracking', type: 'combo', choices: ['systemd', 'elogind', 'no'],
|
||||||
option('suspend_resume', type: 'combo', choices: ['systemd', 'elogind', 'consolekit', 'auto'], value: 'auto', description: 'Build NetworkManager with specific suspend/resume support')
|
option('suspend_resume', type: 'combo', choices: ['systemd', 'elogind', 'consolekit', 'auto'], value: 'auto', description: 'Build NetworkManager with specific suspend/resume support')
|
||||||
option('polkit', type: 'boolean', value: true, description: 'User auth-polkit configuration option.')
|
option('polkit', type: 'boolean', value: true, description: 'User auth-polkit configuration option.')
|
||||||
option('config_auth_polkit_default', type: 'combo', choices: ['default', 'true', 'false', 'root-only'], value: 'default', description: 'Default value for configuration main.auth-polkit.')
|
option('config_auth_polkit_default', type: 'combo', choices: ['default', 'true', 'false', 'root-only'], value: 'default', description: 'Default value for configuration main.auth-polkit.')
|
||||||
option('modify_system', type: 'boolean', value: false, description: 'Allow users to modify system connections')
|
option('modify_system', type: 'boolean', value: false, description: 'Allow users to modify system connections (option no longer supported, don\'t use)')
|
||||||
|
option('polkit_noauth_group', type: 'string', value: '', description: 'Allow users of the selected group, typically sudo or wheel, to modify system connections without introducing a password (discouraged)')
|
||||||
option('polkit_agent_helper_1', type: 'string', value: '', description: 'Path name to the polkit-agent-helper-1 binary from polkit')
|
option('polkit_agent_helper_1', type: 'string', value: '', description: 'Path name to the polkit-agent-helper-1 binary from polkit')
|
||||||
option('selinux', type: 'boolean', value: true, description: 'Build with SELinux')
|
option('selinux', type: 'boolean', value: true, description: 'Build with SELinux')
|
||||||
option('systemd_journal', type: 'boolean', value: true, description: 'Use systemd journal for logging')
|
option('systemd_journal', type: 'boolean', value: true, description: 'Use systemd journal for logging')
|
||||||
|
|
@ -27,7 +30,7 @@ option('hostname_persist', type: 'combo', choices: ['default', 'suse', 'gentoo',
|
||||||
option('libaudit', type: 'combo', choices: ['yes', 'yes-disabled-by-default', 'no'], value: 'yes', description: 'Build with audit daemon support. yes-disabled-by-default enables support, but disables it unless explicitly configured via NetworkManager.conf')
|
option('libaudit', type: 'combo', choices: ['yes', 'yes-disabled-by-default', 'no'], value: 'yes', description: 'Build with audit daemon support. yes-disabled-by-default enables support, but disables it unless explicitly configured via NetworkManager.conf')
|
||||||
|
|
||||||
# features
|
# features
|
||||||
option('wext', type: 'boolean', value: true, description: 'Enable or disable Linux Wireless Extensions')
|
option('wext', type: 'combo', choices: ['true', 'false', 'force' ], value: 'false', description: 'Enable or disable Linux Wireless Extensions (deprecated). wext support will be removed in a future release, don\'t rely on this.')
|
||||||
option('wifi', type: 'boolean', value: true, description: 'enable Wi-Fi support')
|
option('wifi', type: 'boolean', value: true, description: 'enable Wi-Fi support')
|
||||||
option('iwd', type: 'boolean', value: false, description: 'enable iwd support (experimental)')
|
option('iwd', type: 'boolean', value: false, description: 'enable iwd support (experimental)')
|
||||||
option('ppp', type: 'boolean', value: true, description: 'enable PPP/PPPoE support')
|
option('ppp', type: 'boolean', value: true, description: 'enable PPP/PPPoE support')
|
||||||
|
|
@ -43,7 +46,8 @@ option('nmcli', type: 'boolean', value: true, description: 'Build nmcli')
|
||||||
option('nmtui', type: 'boolean', value: true, description: 'Build nmtui')
|
option('nmtui', type: 'boolean', value: true, description: 'Build nmtui')
|
||||||
option('nm_cloud_setup', type: 'boolean', value: true, description: 'Build nm-cloud-setup, a tool for automatically configuring networking in cloud')
|
option('nm_cloud_setup', type: 'boolean', value: true, description: 'Build nm-cloud-setup, a tool for automatically configuring networking in cloud')
|
||||||
option('bluez5_dun', type: 'boolean', value: false, description: 'enable Bluez5 DUN support')
|
option('bluez5_dun', type: 'boolean', value: false, description: 'enable Bluez5 DUN support')
|
||||||
option('ebpf', type: 'combo', choices: ['auto', 'true', 'false'], description: 'Enable eBPF support')
|
option('ebpf', type: 'combo', choices: ['auto', 'true', 'false'], description: 'Enable eBPF support (deprecated)')
|
||||||
|
option('nbft', type: 'boolean', value: true, description: 'Enable NBFT support in the initrd generator')
|
||||||
|
|
||||||
# configuration plugins
|
# configuration plugins
|
||||||
option('config_plugins_default', type: 'string', value: '', description: 'Default configuration option for main.plugins setting, used as fallback if the configuration option is unset')
|
option('config_plugins_default', type: 'string', value: '', description: 'Default configuration option for main.plugins setting, used as fallback if the configuration option is unset')
|
||||||
|
|
@ -65,6 +69,7 @@ option('config_dhcp_default', type: 'combo', choices: ['dhclient', 'dhcpcd', 'in
|
||||||
option('introspection', type: 'boolean', value: true, description: 'Enable introspection for this build')
|
option('introspection', type: 'boolean', value: true, description: 'Enable introspection for this build')
|
||||||
option('vapi', type : 'combo', choices : ['auto', 'true', 'false'], description: 'build Vala bindings')
|
option('vapi', type : 'combo', choices : ['auto', 'true', 'false'], description: 'build Vala bindings')
|
||||||
option('docs', type: 'boolean', value: false, description: 'use to build documentation')
|
option('docs', type: 'boolean', value: false, description: 'use to build documentation')
|
||||||
|
option('man', type: 'boolean', value: true, description: 'Install manpages')
|
||||||
option('tests', type: 'combo', choices: ['yes', 'no', 'root'], value: 'yes', description: 'Build NetworkManager tests')
|
option('tests', type: 'combo', choices: ['yes', 'no', 'root'], value: 'yes', description: 'Build NetworkManager tests')
|
||||||
option('firewalld_zone', type: 'boolean', value: true, description: 'Install and use firewalld zone for shared mode')
|
option('firewalld_zone', type: 'boolean', value: true, description: 'Install and use firewalld zone for shared mode')
|
||||||
option('more_asserts', type: 'string', value: 'auto', description: 'Enable more assertions for debugging (0 = no, 100 = all, default: auto)')
|
option('more_asserts', type: 'string', value: 'auto', description: 'Enable more assertions for debugging (0 = no, 100 = all, default: auto)')
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# List of source files containing translatable strings.
|
# List of source files containing translatable strings.
|
||||||
# Please keep this file sorted alphabetically.
|
# Please keep this file sorted alphabetically.
|
||||||
data/org.freedesktop.NetworkManager.policy.in.in
|
data/org.freedesktop.NetworkManager.policy.in
|
||||||
src/core/NetworkManagerUtils.c
|
src/core/NetworkManagerUtils.c
|
||||||
src/core/devices/adsl/nm-device-adsl.c
|
src/core/devices/adsl/nm-device-adsl.c
|
||||||
src/core/devices/bluetooth/nm-bluez-manager.c
|
src/core/devices/bluetooth/nm-bluez-manager.c
|
||||||
|
|
@ -95,6 +95,7 @@ src/libnm-core-impl/nm-setting-hsr.c
|
||||||
src/libnm-core-impl/nm-setting-infiniband.c
|
src/libnm-core-impl/nm-setting-infiniband.c
|
||||||
src/libnm-core-impl/nm-setting-ip-config.c
|
src/libnm-core-impl/nm-setting-ip-config.c
|
||||||
src/libnm-core-impl/nm-setting-ip-tunnel.c
|
src/libnm-core-impl/nm-setting-ip-tunnel.c
|
||||||
|
src/libnm-core-impl/nm-setting-ipvlan.c
|
||||||
src/libnm-core-impl/nm-setting-ip4-config.c
|
src/libnm-core-impl/nm-setting-ip4-config.c
|
||||||
src/libnm-core-impl/nm-setting-ip6-config.c
|
src/libnm-core-impl/nm-setting-ip6-config.c
|
||||||
src/libnm-core-impl/nm-setting-loopback.c
|
src/libnm-core-impl/nm-setting-loopback.c
|
||||||
|
|
@ -148,6 +149,7 @@ src/libnmc-base/nm-secret-agent-simple.c
|
||||||
src/libnmc-base/nm-vpn-helpers.c
|
src/libnmc-base/nm-vpn-helpers.c
|
||||||
src/libnmc-setting/nm-meta-setting-access.c
|
src/libnmc-setting/nm-meta-setting-access.c
|
||||||
src/libnmc-setting/nm-meta-setting-desc.c
|
src/libnmc-setting/nm-meta-setting-desc.c
|
||||||
|
src/libnmc-setting/nm-meta-setting-desc.h
|
||||||
src/libnmc-setting/settings-docs.h.in
|
src/libnmc-setting/settings-docs.h.in
|
||||||
src/libnmt-newt/nmt-newt-utils.c
|
src/libnmt-newt/nmt-newt-utils.c
|
||||||
src/nm-online/nm-online.c
|
src/nm-online/nm-online.c
|
||||||
|
|
@ -179,6 +181,7 @@ src/nmtui/nmt-page-infiniband.c
|
||||||
src/nmtui/nmt-page-ip-tunnel.c
|
src/nmtui/nmt-page-ip-tunnel.c
|
||||||
src/nmtui/nmt-page-ip4.c
|
src/nmtui/nmt-page-ip4.c
|
||||||
src/nmtui/nmt-page-ip6.c
|
src/nmtui/nmt-page-ip6.c
|
||||||
|
src/nmtui/nmt-page-loopback.c
|
||||||
src/nmtui/nmt-page-macsec.c
|
src/nmtui/nmt-page-macsec.c
|
||||||
src/nmtui/nmt-page-ppp.c
|
src/nmtui/nmt-page-ppp.c
|
||||||
src/nmtui/nmt-page-team-port.c
|
src/nmtui/nmt-page-team-port.c
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,11 @@
|
||||||
contrib/fedora/rpm/
|
contrib/fedora/rpm/
|
||||||
data/NetworkManager-dispatcher.service.in
|
data/NetworkManager-dispatcher.service.in
|
||||||
data/NetworkManager-wait-online.service.in
|
data/NetworkManager-wait-online.service.in
|
||||||
|
data/NetworkManager-wait-online-initrd.service.in
|
||||||
|
data/NetworkManager-initrd.service.in
|
||||||
data/NetworkManager.service.in
|
data/NetworkManager.service.in
|
||||||
data/nm-priv-helper.service.in
|
data/nm-priv-helper.service.in
|
||||||
data/org.freedesktop.NetworkManager.policy.in
|
|
||||||
examples/python/NetworkManager.py
|
|
||||||
examples/python/systray/eggtrayicon.c
|
|
||||||
src/contrib/nm-vpn-editor-plugin-call.h
|
src/contrib/nm-vpn-editor-plugin-call.h
|
||||||
src/contrib/nm-vpn-plugin-utils.c
|
src/contrib/nm-vpn-plugin-utils.c
|
||||||
|
src/libnm-systemd-shared/src/basic/parse-util.c
|
||||||
src/nm-cloud-setup/nm-cloud-setup.service.in
|
src/nm-cloud-setup/nm-cloud-setup.service.in
|
||||||
vpn-daemons/openvpn
|
|
||||||
vpn-daemons/pptp
|
|
||||||
vpn-daemons/vpnc
|
|
||||||
|
|
||||||
# https://bugs.launchpad.net/intltool/+bug/1117944
|
|
||||||
sub/data/org.freedesktop.NetworkManager.policy.in
|
|
||||||
|
|
||||||
# from meson build directory:
|
|
||||||
build/data/org.freedesktop.NetworkManager.policy.in
|
|
||||||
|
|
|
||||||
95
po/ca.po
95
po/ca.po
|
|
@ -8,14 +8,15 @@
|
||||||
# Lubomir Rintel <lkundrak@v3.sk>, 2016. #zanata
|
# Lubomir Rintel <lkundrak@v3.sk>, 2016. #zanata
|
||||||
# Lubomir Rintel <lkundrak@v3.sk>, 2017. #zanata
|
# Lubomir Rintel <lkundrak@v3.sk>, 2017. #zanata
|
||||||
# Thomas Haller <thaller@redhat.com>, 2017. #zanata
|
# Thomas Haller <thaller@redhat.com>, 2017. #zanata
|
||||||
|
# Jordi Mas i Hernàndez <jmas@softcatala.org>, 2025
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: NetworkManager\n"
|
"Project-Id-Version: NetworkManager\n"
|
||||||
"Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/NetworkManager/"
|
"Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/NetworkManager/"
|
||||||
"NetworkManager/issues\n"
|
"NetworkManager/issues\n"
|
||||||
"POT-Creation-Date: 2023-06-16 15:26+0000\n"
|
"POT-Creation-Date: 2023-06-16 15:26+0000\n"
|
||||||
"PO-Revision-Date: 2023-06-17 00:07+0200\n"
|
"PO-Revision-Date: 2025-09-28 00:07+0200\n"
|
||||||
"Last-Translator: Copied by Zanata <copied-by-zanata@zanata.org>\n"
|
"Last-Translator: Jordi Mas i Hernàndez <jmas@softcatala.org>\n"
|
||||||
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
|
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
|
||||||
"Language: ca\n"
|
"Language: ca\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
|
|
@ -355,7 +356,7 @@ msgstr "Connexió WPAN"
|
||||||
|
|
||||||
#: src/core/devices/team/nm-device-team.c:131
|
#: src/core/devices/team/nm-device-team.c:131
|
||||||
msgid "Team connection"
|
msgid "Team connection"
|
||||||
msgstr "Connexió equip"
|
msgstr "Connexió d'equip"
|
||||||
|
|
||||||
#: src/core/devices/wifi/nm-device-olpc-mesh.c:112 src/nmcli/devices.c:1400
|
#: src/core/devices/wifi/nm-device-olpc-mesh.c:112 src/nmcli/devices.c:1400
|
||||||
msgid "Mesh"
|
msgid "Mesh"
|
||||||
|
|
@ -648,7 +649,7 @@ msgstr "Surt després de la configuració inicial"
|
||||||
#: src/core/nm-config.c:639
|
#: src/core/nm-config.c:639
|
||||||
msgid "Don't become a daemon, and log to stderr"
|
msgid "Don't become a daemon, and log to stderr"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"No et converteixis en un dimoni, i envia el registre a la sortida estàndard"
|
"No et converteixis en un dimoni, i envia el registre a la sortida d'error"
|
||||||
|
|
||||||
#: src/core/nm-config.c:648
|
#: src/core/nm-config.c:648
|
||||||
msgid "An http(s) address for checking internet connectivity"
|
msgid "An http(s) address for checking internet connectivity"
|
||||||
|
|
@ -795,7 +796,7 @@ msgstr "La connexió no era una connexió Ethernet o PPPoE."
|
||||||
|
|
||||||
#: src/libnm-client-impl/nm-device-ethernet.c:206
|
#: src/libnm-client-impl/nm-device-ethernet.c:206
|
||||||
msgid "The connection and device differ in S390 subchannels."
|
msgid "The connection and device differ in S390 subchannels."
|
||||||
msgstr "La connexió i el dispositiu difereixen als subcanals 5930."
|
msgstr "La connexió i el dispositiu difereixen als subcanals S390."
|
||||||
|
|
||||||
#: src/libnm-client-impl/nm-device-ethernet.c:223
|
#: src/libnm-client-impl/nm-device-ethernet.c:223
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
@ -881,7 +882,7 @@ msgstr "La connexió no era una connexió tun."
|
||||||
|
|
||||||
#: src/libnm-client-impl/nm-device-team.c:124
|
#: src/libnm-client-impl/nm-device-team.c:124
|
||||||
msgid "The connection was not a team connection."
|
msgid "The connection was not a team connection."
|
||||||
msgstr "La connexió no era una connexió equip."
|
msgstr "La connexió no era una connexió d'equip."
|
||||||
|
|
||||||
#: src/libnm-client-impl/nm-device-tun.c:204
|
#: src/libnm-client-impl/nm-device-tun.c:204
|
||||||
msgid "The connection was not a tun connection."
|
msgid "The connection was not a tun connection."
|
||||||
|
|
@ -1325,27 +1326,27 @@ msgstr ""
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:333
|
#: src/libnm-core-impl/nm-keyfile.c:333
|
||||||
msgid "ignoring missing number"
|
msgid "ignoring missing number"
|
||||||
msgstr "s'ignorarà el número faltant"
|
msgstr "s'ignora el número faltant"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:345
|
#: src/libnm-core-impl/nm-keyfile.c:345
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ignoring invalid number '%s'"
|
msgid "ignoring invalid number '%s'"
|
||||||
msgstr "s'ignorarà el número «%s» no vàlid"
|
msgstr "s'ignora el número «%s» no vàlid"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:374
|
#: src/libnm-core-impl/nm-keyfile.c:374
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ignoring invalid %s address: %s"
|
msgid "ignoring invalid %s address: %s"
|
||||||
msgstr "s'ignorarà l'adreça %s no vàlida: %s"
|
msgstr "s'ignora l'adreça %s no vàlida: %s"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:420
|
#: src/libnm-core-impl/nm-keyfile.c:420
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ignoring invalid gateway '%s' for %s route"
|
msgid "ignoring invalid gateway '%s' for %s route"
|
||||||
msgstr "s'ignorarà la passarel·la «%s» no vàlida per a la ruta %s"
|
msgstr "s'ignora la passarel·la «%s» no vàlida per a la ruta %s"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:442
|
#: src/libnm-core-impl/nm-keyfile.c:442
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "ignoring invalid %s route: %s"
|
msgid "ignoring invalid %s route: %s"
|
||||||
msgstr "s'ignorarà la ruta %s no vàlida: %s"
|
msgstr "s'ignora la ruta %s no vàlida: %s"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:620
|
#: src/libnm-core-impl/nm-keyfile.c:620
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
@ -1361,7 +1362,7 @@ msgstr "caràcter «%c» inesperat per a %s: «%s» (posició %td)"
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "unexpected character '%c' in prefix length for %s: '%s' (position %td)"
|
msgid "unexpected character '%c' in prefix length for %s: '%s' (position %td)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"caràcter «%c» inesperat a la longitud de prefix %s: «%s» (posició %td)<"
|
"caràcter «%c» inesperat a la longitud de prefix %s: «%s» (posició %td)"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:669
|
#: src/libnm-core-impl/nm-keyfile.c:669
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
@ -1413,11 +1414,11 @@ msgstr "s'ignorarà l'adreça %s no vàlida: %s"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:1518
|
#: src/libnm-core-impl/nm-keyfile.c:1518
|
||||||
msgid "ignoring invalid SSID"
|
msgid "ignoring invalid SSID"
|
||||||
msgstr "s'ignorarà l'SSID no vàlida"
|
msgstr "s'ignora l'SSID no vàlida"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:1536
|
#: src/libnm-core-impl/nm-keyfile.c:1536
|
||||||
msgid "ignoring invalid raw password"
|
msgid "ignoring invalid raw password"
|
||||||
msgstr "s'ignorarà la contrasenya sense processar no vàlida"
|
msgstr "s'ignora la contrasenya sense processar no vàlida"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:1681
|
#: src/libnm-core-impl/nm-keyfile.c:1681
|
||||||
msgid "invalid key/cert value"
|
msgid "invalid key/cert value"
|
||||||
|
|
@ -1458,7 +1459,7 @@ msgstr "valor de paritat «%s» no vàlid"
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:1958 src/libnm-core-impl/nm-keyfile.c:3540
|
#: src/libnm-core-impl/nm-keyfile.c:1958 src/libnm-core-impl/nm-keyfile.c:3540
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid setting: %s"
|
msgid "invalid setting: %s"
|
||||||
msgstr "el paràmetre no és vàlid: «%s»"
|
msgstr "el paràmetre no és vàlid: %s"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-keyfile.c:1978
|
#: src/libnm-core-impl/nm-keyfile.c:1978
|
||||||
#, fuzzy, c-format
|
#, fuzzy, c-format
|
||||||
|
|
@ -1973,7 +1974,7 @@ msgstr "file:// URI no és UTF-8 vàlida"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-setting-connection.c:1501
|
#: src/libnm-core-impl/nm-setting-connection.c:1501
|
||||||
msgid "invalid permissions not in format \"user:$UNAME[:]\""
|
msgid "invalid permissions not in format \"user:$UNAME[:]\""
|
||||||
msgstr "els permisos no són vàlids, no estan en el format «user:$UNANE[:]"
|
msgstr "els permisos no són vàlids, no estan en el format «user:$UNAME[:]"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-setting-connection.c:1530
|
#: src/libnm-core-impl/nm-setting-connection.c:1530
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
@ -2086,7 +2087,7 @@ msgstr "«%s» no és un número"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-setting-gsm.c:479
|
#: src/libnm-core-impl/nm-setting-gsm.c:479
|
||||||
msgid "property is empty or wrong size"
|
msgid "property is empty or wrong size"
|
||||||
msgstr "la propietat és buda o de mida incorrecta"
|
msgstr "la propietat és buida o de mida incorrecta"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-setting-gsm.c:492
|
#: src/libnm-core-impl/nm-setting-gsm.c:492
|
||||||
msgid "property must contain only digits"
|
msgid "property must contain only digits"
|
||||||
|
|
@ -2098,12 +2099,12 @@ msgstr "no es pot activar quan hi ha una configuració manual"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-setting-infiniband.c:215
|
#: src/libnm-core-impl/nm-setting-infiniband.c:215
|
||||||
msgid "Must specify a P_Key if specifying parent"
|
msgid "Must specify a P_Key if specifying parent"
|
||||||
msgstr "S'ha d'especificar una P-Key si s'especifica el pare"
|
msgstr "S'ha d'especificar una P_Key si s'especifica el pare"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-setting-infiniband.c:226
|
#: src/libnm-core-impl/nm-setting-infiniband.c:226
|
||||||
msgid "InfiniBand P_Key connection did not specify parent interface name"
|
msgid "InfiniBand P_Key connection did not specify parent interface name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"La connexió InfiniBand P_Key no ha especificat el nom de l'interfície pare"
|
"La connexió InfiniBand P_Key no ha especificat el nom de la interfície pare"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-setting-infiniband.c:234
|
#: src/libnm-core-impl/nm-setting-infiniband.c:234
|
||||||
msgid "the values 0 and 0x8000 are not allowed"
|
msgid "the values 0 and 0x8000 are not allowed"
|
||||||
|
|
@ -2156,12 +2157,12 @@ msgstr "Adreça IPv4 «%s» no és vàlida"
|
||||||
#: src/libnm-core-impl/nm-setting-ip-config.c:106
|
#: src/libnm-core-impl/nm-setting-ip-config.c:106
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Invalid IPv4 address prefix '%u'"
|
msgid "Invalid IPv4 address prefix '%u'"
|
||||||
msgstr "Prefix «%u» d'adreça IPv4 no vàlida"
|
msgstr "Prefix «%u» d'adreça IPv4 no vàlid"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-setting-ip-config.c:107
|
#: src/libnm-core-impl/nm-setting-ip-config.c:107
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Invalid IPv6 address prefix '%u'"
|
msgid "Invalid IPv6 address prefix '%u'"
|
||||||
msgstr "Prefix «%u» d'adreça IPv6 no vàlida<"
|
msgstr "Prefix «%u» d'adreça IPv6 no vàlid"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-setting-ip-config.c:124
|
#: src/libnm-core-impl/nm-setting-ip-config.c:124
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
@ -2208,7 +2209,7 @@ msgstr "el prefix %s no és vàlid"
|
||||||
#: src/libnm-core-impl/nm-setting-ip-config.c:1423
|
#: src/libnm-core-impl/nm-setting-ip-config.c:1423
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s is not a valid route type"
|
msgid "%s is not a valid route type"
|
||||||
msgstr "%s no és un nom de ruta vàlid"
|
msgstr "%s no és un tipus de ruta vàlid"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-setting-ip-config.c:1442
|
#: src/libnm-core-impl/nm-setting-ip-config.c:1442
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
|
|
@ -2432,7 +2433,7 @@ msgstr "La ruta %d. no és vàlida"
|
||||||
#: src/libnm-core-impl/nm-setting-ip-config.c:5638
|
#: src/libnm-core-impl/nm-setting-ip-config.c:5638
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid attribute: %s"
|
msgid "invalid attribute: %s"
|
||||||
msgstr "atribut no vàlid: «%s»"
|
msgstr "atribut no vàlid: %s"
|
||||||
|
|
||||||
#: src/libnm-core-impl/nm-setting-ip-config.c:5658
|
#: src/libnm-core-impl/nm-setting-ip-config.c:5658
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
@ -4105,7 +4106,7 @@ msgstr "«%s» no és vàlid; useu [%s] or [%s]"
|
||||||
#: src/libnmc-base/nm-client-utils.c:176
|
#: src/libnmc-base/nm-client-utils.c:176
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "'%s' is not valid; use [%s], [%s] or [%s]"
|
msgid "'%s' is not valid; use [%s], [%s] or [%s]"
|
||||||
msgstr "«%s» no és vàld, useu [%s], [%s] o [%s]"
|
msgstr "«%s» no és vàlid, useu [%s], [%s] o [%s]"
|
||||||
|
|
||||||
#: src/libnmc-base/nm-client-utils.c:230
|
#: src/libnmc-base/nm-client-utils.c:230
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
@ -4676,7 +4677,7 @@ msgstr "clau privada no vàlida"
|
||||||
#, fuzzy, c-format
|
#, fuzzy, c-format
|
||||||
msgid "Secrets are required to connect WireGuard VPN '%s'"
|
msgid "Secrets are required to connect WireGuard VPN '%s'"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Es requereixen contrasenyes o claus d'encriptació per accedir la xarxa sens "
|
"Es requereixen contrasenyes o claus d'encriptació per accedir la xarxa sense "
|
||||||
"fil «%s»."
|
"fil «%s»."
|
||||||
|
|
||||||
#: src/libnmc-base/nm-secret-agent-simple.c:620
|
#: src/libnmc-base/nm-secret-agent-simple.c:620
|
||||||
|
|
@ -4698,7 +4699,7 @@ msgid ""
|
||||||
"Passwords or encryption keys are required to access the wireless network "
|
"Passwords or encryption keys are required to access the wireless network "
|
||||||
"'%s'."
|
"'%s'."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Es requereixen contrasenyes o claus d'encriptació per accedir la xarxa sens "
|
"Es requereixen contrasenyes o claus d'encriptació per accedir la xarxa sense "
|
||||||
"fil «%s»."
|
"fil «%s»."
|
||||||
|
|
||||||
#: src/libnmc-base/nm-secret-agent-simple.c:886
|
#: src/libnmc-base/nm-secret-agent-simple.c:886
|
||||||
|
|
@ -4709,7 +4710,7 @@ msgstr "Autenticació 802.1X de xarxa amb fil"
|
||||||
#, fuzzy, c-format
|
#, fuzzy, c-format
|
||||||
msgid "Secrets are required to access the wired network '%s'"
|
msgid "Secrets are required to access the wired network '%s'"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Es requereixen contrasenyes o claus d'encriptació per accedir la xarxa sens "
|
"Es requereixen contrasenyes o claus d'encriptació per accedir la xarxa sense "
|
||||||
"fil «%s»."
|
"fil «%s»."
|
||||||
|
|
||||||
#: src/libnmc-base/nm-secret-agent-simple.c:893
|
#: src/libnmc-base/nm-secret-agent-simple.c:893
|
||||||
|
|
@ -5418,9 +5419,9 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Entreu els bytes com una llista de valors hexadecimals.\n"
|
"Entreu els bytes com una llista de valors hexadecimals.\n"
|
||||||
"S'accepten dos formats:\n"
|
"S'accepten dos formats:\n"
|
||||||
"(a) una cadena de dígits exadecimals, on cada dos dígits representen un "
|
"(a) una cadena de dígits hexadecimals, on cada dos dígits representen un "
|
||||||
"byte\n"
|
"byte\n"
|
||||||
"(b) una llista separada per espais de bytes escrits com a dígits hexadecimas "
|
"(b) una llista separada per espais de bytes escrits com a dígits hexadecimals "
|
||||||
"(amb prefix opcional 0x/0X,i un 0 inicial opcional).\n"
|
"(amb prefix opcional 0x/0X,i un 0 inicial opcional).\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Exemples: ab0455a6ea3a74C2\n"
|
"Exemples: ab0455a6ea3a74C2\n"
|
||||||
|
|
@ -5493,7 +5494,7 @@ msgstr "Demora cap endavant"
|
||||||
#: src/libnmc-setting/nm-meta-setting-desc.c:5280
|
#: src/libnmc-setting/nm-meta-setting-desc.c:5280
|
||||||
#: src/nmtui/nmt-page-bridge.c:134
|
#: src/nmtui/nmt-page-bridge.c:134
|
||||||
msgid "Hello time"
|
msgid "Hello time"
|
||||||
msgstr "Temps de benviguda"
|
msgstr "Temps de benvinguda"
|
||||||
|
|
||||||
#: src/libnmc-setting/nm-meta-setting-desc.c:5286
|
#: src/libnmc-setting/nm-meta-setting-desc.c:5286
|
||||||
#: src/nmtui/nmt-page-bridge.c:148
|
#: src/nmtui/nmt-page-bridge.c:148
|
||||||
|
|
@ -5567,7 +5568,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Entreu les connexions secundàries que s'haurien d'activar quan s'activa "
|
"Entreu les connexions secundàries que s'haurien d'activar quan s'activa "
|
||||||
"aquesta connexió. Les connexions es poden especificar o bé per UUID o per ID "
|
"aquesta connexió. Les connexions es poden especificar o bé per UUID o per ID "
|
||||||
"(nom). L'nmcli tradueix transparentment els noms a UUID. Noteu que el "
|
"(nom). nmcli tradueix transparentment els noms a UUID. Noteu que el "
|
||||||
"NetworkManager actualment sols dóna suport els VPN com a connexions "
|
"NetworkManager actualment sols dóna suport els VPN com a connexions "
|
||||||
"secundàries.\n"
|
"secundàries.\n"
|
||||||
"Els elements es poden separar per comes o espais.\n"
|
"Els elements es poden separar per comes o espais.\n"
|
||||||
|
|
@ -5676,7 +5677,7 @@ msgid ""
|
||||||
" priority [prio] [from [src]] [to [dst]], ,...\n"
|
" priority [prio] [from [src]] [to [dst]], ,...\n"
|
||||||
"\n"
|
"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Introduïu una llista de regles d'encaminanent IPv4 amb el següent format:\n"
|
"Introduïu una llista de regles d'encaminament IPv4 amb el següent format:\n"
|
||||||
" priority [prioritat] [from [origen]] [to [destí]], ,...\n"
|
" priority [prioritat] [from [origen]] [to [destí]], ,...\n"
|
||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
@ -5696,7 +5697,7 @@ msgstr ""
|
||||||
"configuració IPv6 \n"
|
"configuració IPv6 \n"
|
||||||
"és «auto» aquests servidors DNS s'annexen als que retorna (si retorna cap) "
|
"és «auto» aquests servidors DNS s'annexen als que retorna (si retorna cap) "
|
||||||
"la \n"
|
"la \n"
|
||||||
"configuració automatica. Els servidors DNS no es poden usar amb els métodes "
|
"configuració automàtica. Els servidors DNS no es poden usar amb els mètodes "
|
||||||
"de \n"
|
"de \n"
|
||||||
"configuracó DNS «shared» o «link-local», atès que no hi una xarxa superior. "
|
"configuracó DNS «shared» o «link-local», atès que no hi una xarxa superior. "
|
||||||
"A tots\n"
|
"A tots\n"
|
||||||
|
|
@ -8151,12 +8152,12 @@ msgstr ""
|
||||||
"canonada (|) o un ampersand (&). El primer indica que l'element és opcional "
|
"canonada (|) o un ampersand (&). El primer indica que l'element és opcional "
|
||||||
"i el segon significa que és obligatori. Si hi ha algun element opcional, "
|
"i el segon significa que és obligatori. Si hi ha algun element opcional, "
|
||||||
"llavors la coincidència avalua a cert si almenys un dels elements opcionals "
|
"llavors la coincidència avalua a cert si almenys un dels elements opcionals "
|
||||||
"coincideix (O lògicà). Si hi ha elements obligatoris, llavors tots han de "
|
"coincideix (O lògica). Si hi ha elements obligatoris, llavors tots han de "
|
||||||
"coincidir (I lògica). Per defecte, un element és opcional. Això significa "
|
"coincidir (I lògica). Per defecte, un element és opcional. Això significa "
|
||||||
"que un element «foo» es comporta igual que «|foo». Un element també es pot "
|
"que un element «foo» es comporta igual que «|foo». Un element també es pot "
|
||||||
"invertir amb el símbol d'exclamació (!) entre el símbol de la canonada (o de "
|
"invertir amb el símbol d'exclamació (!) entre el símbol de la canonada (o de "
|
||||||
"l'ampersand) i abans del patró. Tingueu en compte que «!foo» és una drecera "
|
"l'ampersand) i abans del patró. Tingueu en compte que «!foo» és una drecera "
|
||||||
"per al patró obligatòri «&!foo». Finalment, es pot utilitzar una barra "
|
"per al patró obligatori «&!foo». Finalment, es pot utilitzar una barra "
|
||||||
"inversa al començament de l'element (després dels caràcters especials "
|
"inversa al començament de l'element (després dels caràcters especials "
|
||||||
"opcionals) per no considerar-lo inici del patró. Per exemple, «\\!a» és una "
|
"opcionals) per no considerar-lo inici del patró. Per exemple, «\\!a» és una "
|
||||||
"coincidència obligatòria per literalment «!a»."
|
"coincidència obligatòria per literalment «!a»."
|
||||||
|
|
@ -10722,7 +10723,7 @@ msgstr "Error: «%s» no és una connexió activa.\n"
|
||||||
|
|
||||||
#: src/nmcli/connections.c:3436
|
#: src/nmcli/connections.c:3436
|
||||||
msgid "Error: not all active connections found."
|
msgid "Error: not all active connections found."
|
||||||
msgstr "Error: No s'han trobar totes les connexions actives."
|
msgstr "Error: No s'han trobat totes les connexions actives."
|
||||||
|
|
||||||
#: src/nmcli/connections.c:3444
|
#: src/nmcli/connections.c:3444
|
||||||
msgid "Error: no active connection provided."
|
msgid "Error: no active connection provided."
|
||||||
|
|
@ -11041,7 +11042,7 @@ msgstr ""
|
||||||
"Verifica si el paràmetre o la connexió és vàlida i es pot desar més tard.\n"
|
"Verifica si el paràmetre o la connexió és vàlida i es pot desar més tard.\n"
|
||||||
"Indica valors no vàlids quan hi ha un error. Alguns errors es poden "
|
"Indica valors no vàlids quan hi ha un error. Alguns errors es poden "
|
||||||
"corregir\n"
|
"corregir\n"
|
||||||
"automàticaent amb l'opció «fix».\n"
|
"automàticament amb l'opció «fix».\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Exemples: nmcli> verify\n"
|
"Exemples: nmcli> verify\n"
|
||||||
" nmcli> verify fix\n"
|
" nmcli> verify fix\n"
|
||||||
|
|
@ -11063,7 +11064,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"save [persistent|temporary] :: desa la connexió\n"
|
"save [persistent|temporary] :: desa la connexió\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Envia el perfil de la connexió al NetworManager que o bé la desarà de forma\n"
|
"Envia el perfil de la connexió al NetworkManager que o bé la desarà de forma\n"
|
||||||
"persistent o bé sols la mantindrà a la memòria. «desa» sense cap argument\n"
|
"persistent o bé sols la mantindrà a la memòria. «desa» sense cap argument\n"
|
||||||
"significa «desa de forma persistent».\n"
|
"significa «desa de forma persistent».\n"
|
||||||
"Noteu que un cop que deseu el perfile de forma persistent aquestes "
|
"Noteu que un cop que deseu el perfile de forma persistent aquestes "
|
||||||
|
|
@ -11485,7 +11486,7 @@ msgstr "Opció no vàlida de verificació: %s\n"
|
||||||
#: src/nmcli/connections.c:8486
|
#: src/nmcli/connections.c:8486
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Verify setting '%s': %s\n"
|
msgid "Verify setting '%s': %s\n"
|
||||||
msgstr "Verifica el paràmere «%s»: %s\n"
|
msgstr "Verifica el paràmetre «%s»: %s\n"
|
||||||
|
|
||||||
#: src/nmcli/connections.c:8501
|
#: src/nmcli/connections.c:8501
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
@ -11552,12 +11553,12 @@ msgstr "Error: no es pot activar la connexió: %s.\n"
|
||||||
#: src/nmcli/connections.c:8679
|
#: src/nmcli/connections.c:8679
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error: Failed to activate '%s' (%s) connection: %s\n"
|
msgid "Error: Failed to activate '%s' (%s) connection: %s\n"
|
||||||
msgstr "Error: no s'ha pogut desconnectar la connexió «%s» (%s): %s\n"
|
msgstr "Error: no s'ha pogut activar la connexió «%s» (%s): %s\n"
|
||||||
|
|
||||||
#: src/nmcli/connections.c:8686
|
#: src/nmcli/connections.c:8686
|
||||||
msgid "Monitoring connection activation (press any key to continue)\n"
|
msgid "Monitoring connection activation (press any key to continue)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"S'està supervisant l'activació de la connexio (premeu qualsevol teclar per "
|
"S'està supervisant l'activació de la connexió (premeu qualsevol tecla per "
|
||||||
"continuar)\n"
|
"continuar)\n"
|
||||||
|
|
||||||
#: src/nmcli/connections.c:8721
|
#: src/nmcli/connections.c:8721
|
||||||
|
|
@ -11582,7 +11583,7 @@ msgstr "Configuració actual del nmcli:\n"
|
||||||
#: src/nmcli/connections.c:8753
|
#: src/nmcli/connections.c:8753
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Invalid configuration option '%s'; allowed [%s]\n"
|
msgid "Invalid configuration option '%s'; allowed [%s]\n"
|
||||||
msgstr "Opció de configuració no vàida: «%s»; es permet [%s]\n"
|
msgstr "Opció de configuració no vàlida: «%s»; es permet [%s]\n"
|
||||||
|
|
||||||
#: src/nmcli/connections.c:8985
|
#: src/nmcli/connections.c:8985
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
|
|
@ -12396,7 +12397,7 @@ msgstr "Error: no s'ha pogut afegir/activar la connexió nova: %s"
|
||||||
#: src/nmcli/devices.c:2266
|
#: src/nmcli/devices.c:2266
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error: Device activation failed: %s"
|
msgid "Error: Device activation failed: %s"
|
||||||
msgstr "Error: no s'ha pogut activar el dispositu: %s"
|
msgstr "Error: no s'ha pogut activar el dispositiu: %s"
|
||||||
|
|
||||||
#: src/nmcli/devices.c:2322
|
#: src/nmcli/devices.c:2322
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
@ -12603,7 +12604,7 @@ msgstr "Contrasenya: "
|
||||||
#: src/nmcli/devices.c:4172
|
#: src/nmcli/devices.c:4172
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "'%s' is not valid WPA PSK"
|
msgid "'%s' is not valid WPA PSK"
|
||||||
msgstr "«%s» no és una WPS PSK vàlida"
|
msgstr "«%s» no és una WPA PSK vàlida"
|
||||||
|
|
||||||
#: src/nmcli/devices.c:4193
|
#: src/nmcli/devices.c:4193
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
@ -13538,7 +13539,7 @@ msgstr "Error: s'esperava l'argument «%s», però s'ha proporcionat «%s»."
|
||||||
#: src/nmcli/utils.c:315
|
#: src/nmcli/utils.c:315
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error: Unexpected argument '%s'"
|
msgid "Error: Unexpected argument '%s'"
|
||||||
msgstr "Error: argument inesperat «%s»."
|
msgstr "Error: argument inesperat «%s»"
|
||||||
|
|
||||||
#: src/nmcli/utils.c:702
|
#: src/nmcli/utils.c:702
|
||||||
#, fuzzy, c-format
|
#, fuzzy, c-format
|
||||||
|
|
@ -13897,7 +13898,7 @@ msgstr "«%s» <"
|
||||||
#. NB: the ordering/numbering here corresponds to NmtPageBondMonitoringMode
|
#. NB: the ordering/numbering here corresponds to NmtPageBondMonitoringMode
|
||||||
#: src/nmtui/nmt-page-bond.c:92
|
#: src/nmtui/nmt-page-bond.c:92
|
||||||
msgid "MII (recommended)"
|
msgid "MII (recommended)"
|
||||||
msgstr "MII (recomendat)"
|
msgstr "MII (recomanat)"
|
||||||
|
|
||||||
#: src/nmtui/nmt-page-bond.c:93
|
#: src/nmtui/nmt-page-bond.c:93
|
||||||
msgid "ARP"
|
msgid "ARP"
|
||||||
|
|
@ -14543,7 +14544,7 @@ msgstr ""
|
||||||
|
|
||||||
#: src/nmtui/nmtui-edit.c:394 src/nmtui/nmtui-edit.c:410
|
#: src/nmtui/nmtui-edit.c:394 src/nmtui/nmtui-edit.c:410
|
||||||
msgid "New Connection"
|
msgid "New Connection"
|
||||||
msgstr "Connexions nova"
|
msgstr "Connexió nova"
|
||||||
|
|
||||||
#: src/nmtui/nmtui-edit.c:452
|
#: src/nmtui/nmtui-edit.c:452
|
||||||
#, c-format
|
#, c-format
|
||||||
|
|
|
||||||
2
po/it.po
2
po/it.po
|
|
@ -12596,7 +12596,7 @@ msgstr "Digitare «help» o «?» per i comandi disponibili."
|
||||||
#. TRANSLATORS: do not translate 'print', leave it as it is
|
#. TRANSLATORS: do not translate 'print', leave it as it is
|
||||||
#: src/nmcli/connections.c:9072
|
#: src/nmcli/connections.c:9072
|
||||||
msgid "Type 'print' to show all the connection properties."
|
msgid "Type 'print' to show all the connection properties."
|
||||||
msgstr "Digitare «stampa» per mostrare tutte le proprietà della connessione."
|
msgstr "Digitare «print» per mostrare tutte le proprietà della connessione."
|
||||||
|
|
||||||
#. TRANSLATORS: do not translate 'describe', leave it as it is
|
#. TRANSLATORS: do not translate 'describe', leave it as it is
|
||||||
#: src/nmcli/connections.c:9075
|
#: src/nmcli/connections.c:9075
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
i18n.gettext(nm_name, preset: 'glib')
|
i18n.gettext(nm_name, preset: 'glib')
|
||||||
|
|
||||||
|
test(
|
||||||
|
'check-potfile-list',
|
||||||
|
find_program(join_paths(source_root, 'src/tests/check-potfile-list.py'))
|
||||||
|
)
|
||||||
9510
po/pt_BR.po
9510
po/pt_BR.po
File diff suppressed because it is too large
Load diff
|
|
@ -11,7 +11,7 @@
|
||||||
*
|
*
|
||||||
* This uses the NMVpnEditorPluginVT and allows a user (nm-applet)
|
* This uses the NMVpnEditorPluginVT and allows a user (nm-applet)
|
||||||
* to directly communicate with a VPN plugin using API that is newer
|
* to directly communicate with a VPN plugin using API that is newer
|
||||||
* then the current libnm version. That is, it allows to call to a VPN
|
* then the current libnm version. That is, it allows a user to call to a VPN
|
||||||
* plugin bypassing libnm. */
|
* plugin bypassing libnm. */
|
||||||
|
|
||||||
#include <NetworkManager.h>
|
#include <NetworkManager.h>
|
||||||
|
|
|
||||||
|
|
@ -155,3 +155,33 @@ nm_vpn_plugin_utils_load_editor(const char *module_path,
|
||||||
g_return_val_if_fail(NM_IS_VPN_EDITOR(editor), NULL);
|
g_return_val_if_fail(NM_IS_VPN_EDITOR(editor), NULL);
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
nm_vpn_plugin_utils_get_cert_path(const char *plugin)
|
||||||
|
{
|
||||||
|
const char *path;
|
||||||
|
|
||||||
|
g_return_val_if_fail(plugin, NULL);
|
||||||
|
|
||||||
|
/* Users can set NM_CERT_PATH=~/.cert to be compatible with the certificate
|
||||||
|
* directory used in the past. */
|
||||||
|
path = g_getenv("NM_CERT_PATH");
|
||||||
|
if (path)
|
||||||
|
return g_build_filename(path, plugin, NULL);
|
||||||
|
|
||||||
|
/* Otherwise use XDG_DATA_HOME. We use subdirectory "networkmanagement/certificates"
|
||||||
|
* because the SELinux policy already has rules to set the correct labels in that
|
||||||
|
* directory. */
|
||||||
|
path = g_getenv("XDG_DATA_HOME");
|
||||||
|
if (path)
|
||||||
|
return g_build_filename(path, "networkmanagement", "certificates", plugin, NULL);
|
||||||
|
|
||||||
|
/* Use the default value for XDG_DATA_HOME */
|
||||||
|
return g_build_filename(g_get_home_dir(),
|
||||||
|
".local",
|
||||||
|
"share",
|
||||||
|
"networkmanagement",
|
||||||
|
"certificates",
|
||||||
|
plugin,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,4 +24,6 @@ NMVpnEditor *nm_vpn_plugin_utils_load_editor(const char *modul
|
||||||
gpointer user_data,
|
gpointer user_data,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
char *nm_vpn_plugin_utils_get_cert_path(const char *plugin);
|
||||||
|
|
||||||
#endif /* __NM_VPN_PLUGIN_UTILS_H__ */
|
#endif /* __NM_VPN_PLUGIN_UTILS_H__ */
|
||||||
|
|
|
||||||
|
|
@ -1509,7 +1509,6 @@ nm_utils_ip_route_attribute_to_platform(int addr_family,
|
||||||
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_INITCWND, r->initcwnd, UINT32, uint32, 0);
|
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_INITCWND, r->initcwnd, UINT32, uint32, 0);
|
||||||
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_INITRWND, r->initrwnd, UINT32, uint32, 0);
|
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_INITRWND, r->initrwnd, UINT32, uint32, 0);
|
||||||
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_MTU, r->mtu, UINT32, uint32, 0);
|
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_MTU, r->mtu, UINT32, uint32, 0);
|
||||||
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_RTO_MIN, r->rto_min, UINT32, uint32, 0);
|
|
||||||
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_QUICKACK, r->quickack, BOOLEAN, boolean, FALSE);
|
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_QUICKACK, r->quickack, BOOLEAN, boolean, FALSE);
|
||||||
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_LOCK_WINDOW, r->lock_window, BOOLEAN, boolean, FALSE);
|
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_LOCK_WINDOW, r->lock_window, BOOLEAN, boolean, FALSE);
|
||||||
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_LOCK_CWND, r->lock_cwnd, BOOLEAN, boolean, FALSE);
|
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_LOCK_CWND, r->lock_cwnd, BOOLEAN, boolean, FALSE);
|
||||||
|
|
@ -1518,6 +1517,18 @@ nm_utils_ip_route_attribute_to_platform(int addr_family,
|
||||||
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_LOCK_MTU, r->lock_mtu, BOOLEAN, boolean, FALSE);
|
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_LOCK_MTU, r->lock_mtu, BOOLEAN, boolean, FALSE);
|
||||||
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_LOCK_ADVMSS, r->lock_mss, BOOLEAN, boolean, FALSE);
|
GET_ATTR(NM_IP_ROUTE_ATTRIBUTE_LOCK_ADVMSS, r->lock_mss, BOOLEAN, boolean, FALSE);
|
||||||
|
|
||||||
|
{
|
||||||
|
GVariant *_variant = nm_ip_route_get_attribute(s_route, NM_IP_ROUTE_ATTRIBUTE_RTO_MIN);
|
||||||
|
|
||||||
|
if (_variant && g_variant_is_of_type(_variant, G_VARIANT_TYPE_UINT32)) {
|
||||||
|
r->rto_min = g_variant_get_uint32(_variant);
|
||||||
|
r->rto_min_set = TRUE;
|
||||||
|
} else {
|
||||||
|
r->rto_min = 0;
|
||||||
|
r->rto_min_set = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((variant = nm_ip_route_get_attribute(s_route, NM_IP_ROUTE_ATTRIBUTE_SRC))
|
if ((variant = nm_ip_route_get_attribute(s_route, NM_IP_ROUTE_ATTRIBUTE_SRC))
|
||||||
&& g_variant_is_of_type(variant, G_VARIANT_TYPE_STRING)) {
|
&& g_variant_is_of_type(variant, G_VARIANT_TYPE_STRING)) {
|
||||||
if (inet_pton(addr_family, g_variant_get_string(variant, NULL), &addr) == 1) {
|
if (inet_pton(addr_family, g_variant_get_string(variant, NULL), &addr) == 1) {
|
||||||
|
|
|
||||||
|
|
@ -137,14 +137,6 @@ link_changed(NMDevice *device, const NMPlatformLink *pllink)
|
||||||
nm_device_parent_set_ifindex(device, parent);
|
nm_device_parent_set_ifindex(device, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
|
|
||||||
{
|
|
||||||
if (!nm_device_parent_get_device(device))
|
|
||||||
return FALSE;
|
|
||||||
return NM_DEVICE_CLASS(nm_device_6lowpan_parent_class)->is_available(device, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
complete_connection(NMDevice *device,
|
complete_connection(NMDevice *device,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
|
|
@ -237,7 +229,6 @@ nm_device_6lowpan_class_init(NMDevice6LowpanClass *klass)
|
||||||
device_class->get_generic_capabilities = get_generic_capabilities;
|
device_class->get_generic_capabilities = get_generic_capabilities;
|
||||||
device_class->get_configured_mtu = nm_device_get_configured_mtu_for_wired;
|
device_class->get_configured_mtu = nm_device_get_configured_mtu_for_wired;
|
||||||
device_class->link_changed = link_changed;
|
device_class->link_changed = link_changed;
|
||||||
device_class->is_available = is_available;
|
|
||||||
device_class->parent_changed_notify = parent_changed_notify;
|
device_class->parent_changed_notify = parent_changed_notify;
|
||||||
device_class->update_connection = update_connection;
|
device_class->update_connection = update_connection;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,7 @@
|
||||||
NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE, NM_SETTING_BOND_OPTION_PRIMARY_RESELECT, \
|
NM_SETTING_BOND_OPTION_PACKETS_PER_SLAVE, NM_SETTING_BOND_OPTION_PRIMARY_RESELECT, \
|
||||||
NM_SETTING_BOND_OPTION_RESEND_IGMP, NM_SETTING_BOND_OPTION_USE_CARRIER, \
|
NM_SETTING_BOND_OPTION_RESEND_IGMP, NM_SETTING_BOND_OPTION_USE_CARRIER, \
|
||||||
NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP, \
|
NM_SETTING_BOND_OPTION_XMIT_HASH_POLICY, NM_SETTING_BOND_OPTION_NUM_GRAT_ARP, \
|
||||||
NM_SETTING_BOND_OPTION_PEER_NOTIF_DELAY, NM_SETTING_BOND_OPTION_ARP_MISSED_MAX, \
|
NM_SETTING_BOND_OPTION_PEER_NOTIF_DELAY, NM_SETTING_BOND_OPTION_ARP_MISSED_MAX
|
||||||
NM_SETTING_BOND_OPTION_LACP_ACTIVE
|
|
||||||
|
|
||||||
#define OPTIONS_REAPPLY_FULL \
|
#define OPTIONS_REAPPLY_FULL \
|
||||||
OPTIONS_REAPPLY_SUBSET, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE, \
|
OPTIONS_REAPPLY_SUBSET, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE, \
|
||||||
|
|
@ -142,7 +141,7 @@ _set_bond_attr(NMDevice *device, const char *attr, const char *value)
|
||||||
{ \
|
{ \
|
||||||
gs_free char *_tmp = (value); \
|
gs_free char *_tmp = (value); \
|
||||||
\
|
\
|
||||||
_set_bond_attr(device, NM_SETTING_BOND_OPTION_ARP_IP_TARGET, _tmp); \
|
_set_bond_attr(device, attr, _tmp); \
|
||||||
} \
|
} \
|
||||||
G_STMT_END
|
G_STMT_END
|
||||||
|
|
||||||
|
|
@ -902,7 +901,7 @@ reapply_connection(NMDevice *device, NMConnection *con_old, NMConnection *con_ne
|
||||||
mode = _nm_setting_bond_mode_from_string(value);
|
mode = _nm_setting_bond_mode_from_string(value);
|
||||||
g_return_if_fail(mode != NM_BOND_MODE_UNKNOWN);
|
g_return_if_fail(mode != NM_BOND_MODE_UNKNOWN);
|
||||||
|
|
||||||
/* Below we set only the bond options that kernel allows to modify
|
/* Below we set only the bond options that the kernel allows modifying
|
||||||
* while keeping the bond interface up */
|
* while keeping the bond interface up */
|
||||||
|
|
||||||
set_bond_arp_ip_targets(device, s_bond);
|
set_bond_arp_ip_targets(device, s_bond);
|
||||||
|
|
|
||||||
|
|
@ -735,6 +735,11 @@ merge_bridge_vlan_default_pvid(NMPlatformBridgeVlan *vlans, guint *num_vlans, gu
|
||||||
gboolean has_pvid = FALSE;
|
gboolean has_pvid = FALSE;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
|
if (default_pvid == 0) {
|
||||||
|
/* default_pvid=0 means that the default PVID is disabled. No need to merge it. */
|
||||||
|
return vlans;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < *num_vlans; i++) {
|
for (i = 0; i < *num_vlans; i++) {
|
||||||
if (vlans[i].pvid) {
|
if (vlans[i].pvid) {
|
||||||
has_pvid = TRUE;
|
has_pvid = TRUE;
|
||||||
|
|
@ -1061,7 +1066,7 @@ attach_port(NMDevice *device,
|
||||||
|
|
||||||
plat_vlans = setting_vlans_to_platform(vlans, &num_vlans);
|
plat_vlans = setting_vlans_to_platform(vlans, &num_vlans);
|
||||||
|
|
||||||
/* Since the link was just enportd, there are no existing VLANs
|
/* Since the link was just attached, there are no existing VLANs
|
||||||
* (except for the default one) and so there's no need to flush. */
|
* (except for the default one) and so there's no need to flush. */
|
||||||
|
|
||||||
if (plat_vlans
|
if (plat_vlans
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
#include <libudev.h>
|
#include <libudev.h>
|
||||||
#include <linux/if_ether.h>
|
#include <linux/if_ether.h>
|
||||||
|
|
||||||
#include "NetworkManagerUtils.h"
|
|
||||||
#include "NetworkManagerUtils.h"
|
#include "NetworkManagerUtils.h"
|
||||||
#include "libnm-core-aux-intern/nm-libnm-core-utils.h"
|
#include "libnm-core-aux-intern/nm-libnm-core-utils.h"
|
||||||
#include "libnm-core-intern/nm-core-internal.h"
|
#include "libnm-core-intern/nm-core-internal.h"
|
||||||
|
|
@ -630,10 +629,17 @@ build_supplicant_config(NMDeviceEthernet *self, GError **error)
|
||||||
mtu = nm_platform_link_get_mtu(nm_device_get_platform(NM_DEVICE(self)),
|
mtu = nm_platform_link_get_mtu(nm_device_get_platform(NM_DEVICE(self)),
|
||||||
nm_device_get_ifindex(NM_DEVICE(self)));
|
nm_device_get_ifindex(NM_DEVICE(self)));
|
||||||
|
|
||||||
config = nm_supplicant_config_new(NM_SUPPL_CAP_MASK_NONE);
|
config = nm_supplicant_config_new(NM_SUPPL_CAP_MASK_NONE,
|
||||||
|
nm_utils_get_connection_first_permissions_user(connection));
|
||||||
|
|
||||||
security = nm_connection_get_setting_802_1x(connection);
|
security = nm_connection_get_setting_802_1x(connection);
|
||||||
if (!nm_supplicant_config_add_setting_8021x(config, security, con_uuid, mtu, TRUE, error)) {
|
if (!nm_supplicant_config_add_setting_8021x(config,
|
||||||
|
security,
|
||||||
|
con_uuid,
|
||||||
|
mtu,
|
||||||
|
TRUE,
|
||||||
|
nm_device_get_private_files(NM_DEVICE(self)),
|
||||||
|
error)) {
|
||||||
g_prefix_error(error, "802-1x-setting: ");
|
g_prefix_error(error, "802-1x-setting: ");
|
||||||
g_clear_object(&config);
|
g_clear_object(&config);
|
||||||
}
|
}
|
||||||
|
|
@ -701,6 +707,9 @@ supplicant_iface_start(NMDeviceEthernet *self)
|
||||||
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE(self);
|
NMDeviceEthernetPrivate *priv = NM_DEVICE_ETHERNET_GET_PRIVATE(self);
|
||||||
gs_unref_object NMSupplicantConfig *config = NULL;
|
gs_unref_object NMSupplicantConfig *config = NULL;
|
||||||
gs_free_error GError *error = NULL;
|
gs_free_error GError *error = NULL;
|
||||||
|
NMActRequest *request;
|
||||||
|
NMActiveConnection *controller_ac;
|
||||||
|
NMDevice *controller;
|
||||||
|
|
||||||
config = build_supplicant_config(self, &error);
|
config = build_supplicant_config(self, &error);
|
||||||
if (!config) {
|
if (!config) {
|
||||||
|
|
@ -715,6 +724,16 @@ supplicant_iface_start(NMDeviceEthernet *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
nm_supplicant_interface_disconnect(priv->supplicant.iface);
|
nm_supplicant_interface_disconnect(priv->supplicant.iface);
|
||||||
|
|
||||||
|
/* Tell the supplicant in which bridge the interface is */
|
||||||
|
if ((request = nm_device_get_act_request(NM_DEVICE(self)))
|
||||||
|
&& (controller_ac = nm_active_connection_get_controller(NM_ACTIVE_CONNECTION(request)))
|
||||||
|
&& (controller = nm_active_connection_get_device(controller_ac))
|
||||||
|
&& nm_device_get_device_type(controller) == NM_DEVICE_TYPE_BRIDGE) {
|
||||||
|
nm_supplicant_interface_set_bridge(priv->supplicant.iface, nm_device_get_iface(controller));
|
||||||
|
} else
|
||||||
|
nm_supplicant_interface_set_bridge(priv->supplicant.iface, NULL);
|
||||||
|
|
||||||
nm_supplicant_interface_assoc(priv->supplicant.iface, config, supplicant_iface_assoc_cb, self);
|
nm_supplicant_interface_assoc(priv->supplicant.iface, config, supplicant_iface_assoc_cb, self);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -1894,7 +1913,7 @@ get_ip_method_auto(NMDevice *device, int addr_family)
|
||||||
/* We cannot do DHCPv4 on a PPP link, instead we get "auto" IP addresses
|
/* We cannot do DHCPv4 on a PPP link, instead we get "auto" IP addresses
|
||||||
* by pppd. Return "manual" here, which has the suitable effect to a
|
* by pppd. Return "manual" here, which has the suitable effect to a
|
||||||
* (zero) manual addresses in addition. */
|
* (zero) manual addresses in addition. */
|
||||||
return NM_SETTING_IP6_CONFIG_METHOD_MANUAL;
|
return NM_SETTING_IP4_CONFIG_METHOD_MANUAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NM_SETTING_IP6_CONFIG_METHOD_AUTO;
|
return NM_SETTING_IP6_CONFIG_METHOD_AUTO;
|
||||||
|
|
|
||||||
|
|
@ -94,8 +94,10 @@ update_properties(NMDevice *device)
|
||||||
CHECK_PROPERTY_CHANGED(multicast_spec, PROP_MULTICAST_SPEC);
|
CHECK_PROPERTY_CHANGED(multicast_spec, PROP_MULTICAST_SPEC);
|
||||||
CHECK_PROPERTY_CHANGED(prp, PROP_PRP);
|
CHECK_PROPERTY_CHANGED(prp, PROP_PRP);
|
||||||
|
|
||||||
if (!nm_ether_addr_equal(&priv->props.supervision_address, &props->supervision_address))
|
if (!nm_ether_addr_equal(&priv->props.supervision_address, &props->supervision_address)) {
|
||||||
|
priv->props.supervision_address = props->supervision_address;
|
||||||
_notify(self, PROP_SUPERVISION_ADDRESS);
|
_notify(self, PROP_SUPERVISION_ADDRESS);
|
||||||
|
}
|
||||||
|
|
||||||
g_object_thaw_notify((GObject *) device);
|
g_object_thaw_notify((GObject *) device);
|
||||||
}
|
}
|
||||||
|
|
@ -115,28 +117,50 @@ create_and_realize(NMDevice *device,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
const char *iface = nm_device_get_iface(device);
|
const char *iface = nm_device_get_iface(device);
|
||||||
|
nm_auto_free char *err_msg = NULL;
|
||||||
NMSettingHsr *s_hsr;
|
NMSettingHsr *s_hsr;
|
||||||
NMPlatformLnkHsr lnk = {};
|
NMPlatformLnkHsr lnk = {};
|
||||||
int r;
|
int r = 0;
|
||||||
|
|
||||||
s_hsr = _nm_connection_get_setting(connection, NM_TYPE_SETTING_HSR);
|
s_hsr = _nm_connection_get_setting(connection, NM_TYPE_SETTING_HSR);
|
||||||
|
|
||||||
nm_assert(s_hsr);
|
nm_assert(s_hsr);
|
||||||
|
|
||||||
if (nm_setting_hsr_get_port1(s_hsr) != NULL)
|
if (nm_setting_hsr_get_port1(s_hsr) != NULL)
|
||||||
lnk.port1 = nm_platform_link_get_ifindex(NM_PLATFORM_GET, nm_setting_hsr_get_port1(s_hsr));
|
lnk.port1 = nm_platform_link_get_ifindex(NM_PLATFORM_GET, nm_setting_hsr_get_port1(s_hsr));
|
||||||
if (nm_setting_hsr_get_port2(s_hsr) != NULL)
|
if (nm_setting_hsr_get_port2(s_hsr) != NULL)
|
||||||
lnk.port2 = nm_platform_link_get_ifindex(NM_PLATFORM_GET, nm_setting_hsr_get_port2(s_hsr));
|
lnk.port2 = nm_platform_link_get_ifindex(NM_PLATFORM_GET, nm_setting_hsr_get_port2(s_hsr));
|
||||||
|
if (nm_setting_hsr_get_interlink(s_hsr) != NULL) {
|
||||||
|
const char *ifname = nm_setting_hsr_get_interlink(s_hsr);
|
||||||
|
int ifindex = nm_platform_link_get_ifindex(NM_PLATFORM_GET, ifname);
|
||||||
|
|
||||||
|
if (ifindex <= 0) {
|
||||||
|
err_msg = g_strdup_printf("interlink port '%s' does not exist", ifname);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
lnk.interlink = ifindex;
|
||||||
|
}
|
||||||
|
|
||||||
lnk.multicast_spec = nm_setting_hsr_get_multicast_spec(s_hsr);
|
lnk.multicast_spec = nm_setting_hsr_get_multicast_spec(s_hsr);
|
||||||
lnk.prp = nm_setting_hsr_get_prp(s_hsr);
|
lnk.prp = nm_setting_hsr_get_prp(s_hsr);
|
||||||
|
lnk.protocol_version = nm_setting_hsr_get_protocol_version(s_hsr);
|
||||||
|
|
||||||
r = nm_platform_link_hsr_add(nm_device_get_platform(device), iface, &lnk, out_plink);
|
r = nm_platform_link_hsr_add(nm_device_get_platform(device), iface, &lnk, out_plink);
|
||||||
|
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
|
err_msg = g_strdup(nm_strerror(r) ?: "unknown");
|
||||||
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
|
if (err_msg) {
|
||||||
g_set_error(error,
|
g_set_error(error,
|
||||||
NM_DEVICE_ERROR,
|
NM_DEVICE_ERROR,
|
||||||
NM_DEVICE_ERROR_CREATION_FAILED,
|
NM_DEVICE_ERROR_CREATION_FAILED,
|
||||||
"Failed to create HSR interface '%s' for '%s': %s",
|
"Failed to create HSR interface '%s' for '%s': %s",
|
||||||
iface,
|
iface,
|
||||||
nm_connection_get_id(connection),
|
nm_connection_get_id(connection),
|
||||||
nm_strerror(r));
|
err_msg);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -221,16 +221,6 @@ get_generic_capabilities(NMDevice *device)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static gboolean
|
|
||||||
is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
|
|
||||||
{
|
|
||||||
if (!nm_device_parent_get_device(device))
|
|
||||||
return FALSE;
|
|
||||||
return NM_DEVICE_CLASS(nm_device_ipvlan_parent_class)->is_available(device, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
check_connection_compatible(NMDevice *device,
|
check_connection_compatible(NMDevice *device,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
|
|
@ -376,7 +366,6 @@ nm_device_ipvlan_class_init(NMDeviceIpvlanClass *klass)
|
||||||
device_class->check_connection_compatible = check_connection_compatible;
|
device_class->check_connection_compatible = check_connection_compatible;
|
||||||
device_class->create_and_realize = create_and_realize;
|
device_class->create_and_realize = create_and_realize;
|
||||||
device_class->get_generic_capabilities = get_generic_capabilities;
|
device_class->get_generic_capabilities = get_generic_capabilities;
|
||||||
device_class->is_available = is_available;
|
|
||||||
device_class->link_changed = link_changed;
|
device_class->link_changed = link_changed;
|
||||||
device_class->update_connection = update_connection;
|
device_class->update_connection = update_connection;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,8 @@ build_supplicant_config(NMDeviceMacsec *self, GError **error)
|
||||||
mtu = nm_platform_link_get_mtu(nm_device_get_platform(NM_DEVICE(self)),
|
mtu = nm_platform_link_get_mtu(nm_device_get_platform(NM_DEVICE(self)),
|
||||||
nm_device_get_ifindex(NM_DEVICE(self)));
|
nm_device_get_ifindex(NM_DEVICE(self)));
|
||||||
|
|
||||||
config = nm_supplicant_config_new(NM_SUPPL_CAP_MASK_NONE);
|
config = nm_supplicant_config_new(NM_SUPPL_CAP_MASK_NONE,
|
||||||
|
nm_utils_get_connection_first_permissions_user(connection));
|
||||||
|
|
||||||
s_macsec = nm_device_get_applied_setting(NM_DEVICE(self), NM_TYPE_SETTING_MACSEC);
|
s_macsec = nm_device_get_applied_setting(NM_DEVICE(self), NM_TYPE_SETTING_MACSEC);
|
||||||
|
|
||||||
|
|
@ -227,7 +228,13 @@ build_supplicant_config(NMDeviceMacsec *self, GError **error)
|
||||||
|
|
||||||
if (nm_setting_macsec_get_mode(s_macsec) == NM_SETTING_MACSEC_MODE_EAP) {
|
if (nm_setting_macsec_get_mode(s_macsec) == NM_SETTING_MACSEC_MODE_EAP) {
|
||||||
s_8021x = nm_connection_get_setting_802_1x(connection);
|
s_8021x = nm_connection_get_setting_802_1x(connection);
|
||||||
if (!nm_supplicant_config_add_setting_8021x(config, s_8021x, con_uuid, mtu, TRUE, error)) {
|
if (!nm_supplicant_config_add_setting_8021x(config,
|
||||||
|
s_8021x,
|
||||||
|
con_uuid,
|
||||||
|
mtu,
|
||||||
|
TRUE,
|
||||||
|
nm_device_get_private_files(NM_DEVICE(self)),
|
||||||
|
error)) {
|
||||||
g_prefix_error(error, "802-1x-setting: ");
|
g_prefix_error(error, "802-1x-setting: ");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
@ -433,6 +440,9 @@ supplicant_iface_start(NMDeviceMacsec *self)
|
||||||
NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE(self);
|
NMDeviceMacsecPrivate *priv = NM_DEVICE_MACSEC_GET_PRIVATE(self);
|
||||||
gs_unref_object NMSupplicantConfig *config = NULL;
|
gs_unref_object NMSupplicantConfig *config = NULL;
|
||||||
gs_free_error GError *error = NULL;
|
gs_free_error GError *error = NULL;
|
||||||
|
NMActRequest *request;
|
||||||
|
NMActiveConnection *controller_ac;
|
||||||
|
NMDevice *controller;
|
||||||
|
|
||||||
config = build_supplicant_config(self, &error);
|
config = build_supplicant_config(self, &error);
|
||||||
if (!config) {
|
if (!config) {
|
||||||
|
|
@ -445,6 +455,16 @@ supplicant_iface_start(NMDeviceMacsec *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
nm_supplicant_interface_disconnect(priv->supplicant.iface);
|
nm_supplicant_interface_disconnect(priv->supplicant.iface);
|
||||||
|
|
||||||
|
/* Tell the supplicant in which bridge the interface is */
|
||||||
|
if ((request = nm_device_get_act_request(NM_DEVICE(self)))
|
||||||
|
&& (controller_ac = nm_active_connection_get_controller(NM_ACTIVE_CONNECTION(request)))
|
||||||
|
&& (controller = nm_active_connection_get_device(controller_ac))
|
||||||
|
&& nm_device_get_device_type(controller) == NM_DEVICE_TYPE_BRIDGE) {
|
||||||
|
nm_supplicant_interface_set_bridge(priv->supplicant.iface, nm_device_get_iface(controller));
|
||||||
|
} else
|
||||||
|
nm_supplicant_interface_set_bridge(priv->supplicant.iface, NULL);
|
||||||
|
|
||||||
nm_supplicant_interface_assoc(priv->supplicant.iface, config, supplicant_iface_assoc_cb, self);
|
nm_supplicant_interface_assoc(priv->supplicant.iface, config, supplicant_iface_assoc_cb, self);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -683,14 +703,6 @@ get_generic_capabilities(NMDevice *dev)
|
||||||
|
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
|
|
||||||
static gboolean
|
|
||||||
is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
|
|
||||||
{
|
|
||||||
if (!nm_device_parent_get_device(device))
|
|
||||||
return FALSE;
|
|
||||||
return NM_DEVICE_CLASS(nm_device_macsec_parent_class)->is_available(device, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
create_and_realize(NMDevice *device,
|
create_and_realize(NMDevice *device,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
|
|
@ -903,7 +915,6 @@ nm_device_macsec_class_init(NMDeviceMacsecClass *klass)
|
||||||
device_class->deactivate = deactivate;
|
device_class->deactivate = deactivate;
|
||||||
device_class->get_generic_capabilities = get_generic_capabilities;
|
device_class->get_generic_capabilities = get_generic_capabilities;
|
||||||
device_class->link_changed = link_changed;
|
device_class->link_changed = link_changed;
|
||||||
device_class->is_available = is_available;
|
|
||||||
device_class->parent_changed_notify = parent_changed_notify;
|
device_class->parent_changed_notify = parent_changed_notify;
|
||||||
device_class->state_changed = device_state_changed;
|
device_class->state_changed = device_state_changed;
|
||||||
device_class->get_configured_mtu = nm_device_get_configured_mtu_wired_parent;
|
device_class->get_configured_mtu = nm_device_get_configured_mtu_wired_parent;
|
||||||
|
|
|
||||||
|
|
@ -270,16 +270,6 @@ get_generic_capabilities(NMDevice *device)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static gboolean
|
|
||||||
is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
|
|
||||||
{
|
|
||||||
if (!nm_device_parent_get_device(device))
|
|
||||||
return FALSE;
|
|
||||||
return NM_DEVICE_CLASS(nm_device_macvlan_parent_class)->is_available(device, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
check_connection_compatible(NMDevice *device,
|
check_connection_compatible(NMDevice *device,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
|
|
@ -508,7 +498,6 @@ nm_device_macvlan_class_init(NMDeviceMacvlanClass *klass)
|
||||||
device_class->create_and_realize = create_and_realize;
|
device_class->create_and_realize = create_and_realize;
|
||||||
device_class->get_generic_capabilities = get_generic_capabilities;
|
device_class->get_generic_capabilities = get_generic_capabilities;
|
||||||
device_class->get_configured_mtu = nm_device_get_configured_mtu_wired_parent;
|
device_class->get_configured_mtu = nm_device_get_configured_mtu_wired_parent;
|
||||||
device_class->is_available = is_available;
|
|
||||||
device_class->link_changed = link_changed;
|
device_class->link_changed = link_changed;
|
||||||
device_class->parent_changed_notify = parent_changed_notify;
|
device_class->parent_changed_notify = parent_changed_notify;
|
||||||
device_class->update_connection = update_connection;
|
device_class->update_connection = update_connection;
|
||||||
|
|
|
||||||
|
|
@ -115,9 +115,6 @@ gboolean nm_device_sysctl_ip_conf_set(NMDevice *self,
|
||||||
|
|
||||||
NML3ConfigData *nm_device_create_l3_config_data(NMDevice *self, NMIPConfigSource source);
|
NML3ConfigData *nm_device_create_l3_config_data(NMDevice *self, NMIPConfigSource source);
|
||||||
|
|
||||||
NML3ConfigData *nm_device_create_l3_config_data_from_connection(NMDevice *self,
|
|
||||||
NMConnection *connection);
|
|
||||||
|
|
||||||
void nm_device_ip_method_dhcp4_start(NMDevice *self);
|
void nm_device_ip_method_dhcp4_start(NMDevice *self);
|
||||||
|
|
||||||
void nm_device_ip_method_autoconf6_start(NMDevice *self);
|
void nm_device_ip_method_autoconf6_start(NMDevice *self);
|
||||||
|
|
@ -179,4 +176,6 @@ void nm_device_auth_request(NMDevice *self,
|
||||||
|
|
||||||
void nm_device_link_properties_set(NMDevice *self, gboolean reapply);
|
void nm_device_link_properties_set(NMDevice *self, gboolean reapply);
|
||||||
|
|
||||||
|
GHashTable *nm_device_get_private_files(NMDevice *self);
|
||||||
|
|
||||||
#endif /* NM_DEVICE_PRIVATE_H */
|
#endif /* NM_DEVICE_PRIVATE_H */
|
||||||
|
|
|
||||||
|
|
@ -242,12 +242,14 @@ create_and_realize(NMDevice *device,
|
||||||
g_return_val_if_reached(FALSE);
|
g_return_val_if_reached(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
owner = _nm_utils_ascii_str_to_int64(nm_setting_tun_get_owner(s_tun), 10, 0, G_MAXINT32, -1);
|
owner =
|
||||||
|
_nm_utils_ascii_str_to_int64(nm_setting_tun_get_owner(s_tun), 10, 0, G_MAXUINT32 - 1, -1);
|
||||||
if (owner != -1) {
|
if (owner != -1) {
|
||||||
props.owner_valid = TRUE;
|
props.owner_valid = TRUE;
|
||||||
props.owner = owner;
|
props.owner = owner;
|
||||||
}
|
}
|
||||||
group = _nm_utils_ascii_str_to_int64(nm_setting_tun_get_group(s_tun), 10, 0, G_MAXINT32, -1);
|
group =
|
||||||
|
_nm_utils_ascii_str_to_int64(nm_setting_tun_get_group(s_tun), 10, 0, G_MAXUINT32 - 1, -1);
|
||||||
if (group != -1) {
|
if (group != -1) {
|
||||||
props.group_valid = TRUE;
|
props.group_valid = TRUE;
|
||||||
props.group = group;
|
props.group = group;
|
||||||
|
|
@ -278,7 +280,7 @@ _same_og(const char *str, gboolean og_valid, guint32 og_num)
|
||||||
{
|
{
|
||||||
gint64 v;
|
gint64 v;
|
||||||
|
|
||||||
v = _nm_utils_ascii_str_to_int64(str, 10, 0, G_MAXINT32, -1);
|
v = _nm_utils_ascii_str_to_int64(str, 10, 0, G_MAXUINT32 - 1, -1);
|
||||||
return (!og_valid && (v == (gint64) -1)) || (og_valid && (((guint32) v) == og_num));
|
return (!og_valid && (v == (gint64) -1)) || (og_valid && (((guint32) v) == og_num));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -135,13 +135,17 @@ NM_UTILS_LOOKUP_STR_DEFINE(
|
||||||
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_LINK_NOT_INIT,
|
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_LINK_NOT_INIT,
|
||||||
"unmanaged-link-not-init"),
|
"unmanaged-link-not-init"),
|
||||||
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_QUITTING, "unmanaged-quitting"),
|
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_QUITTING, "unmanaged-quitting"),
|
||||||
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_SLEEPING, "unmanaged-sleeping"),
|
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_MANAGER_DISABLED,
|
||||||
|
"unmanaged-nm-disabled"),
|
||||||
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_USER_CONF, "unmanaged-user-conf"),
|
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_USER_CONF, "unmanaged-user-conf"),
|
||||||
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_USER_EXPLICIT,
|
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_USER_EXPLICIT,
|
||||||
"unmanaged-user-explicit"),
|
"unmanaged-user-explicit"),
|
||||||
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_USER_SETTINGS,
|
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_USER_SETTINGS,
|
||||||
"unmanaged-user-settings"),
|
"unmanaged-user-settings"),
|
||||||
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_USER_UDEV, "unmanaged-user-udev"), );
|
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_UNMANAGED_USER_UDEV, "unmanaged-user-udev"),
|
||||||
|
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_NETWORKING_OFF, "networking-off"),
|
||||||
|
NM_UTILS_LOOKUP_STR_ITEM(NM_DEVICE_STATE_REASON_MODEM_NO_OPERATOR_CODE,
|
||||||
|
"modem-no-operator-code"), );
|
||||||
|
|
||||||
NM_UTILS_LOOKUP_STR_DEFINE(nm_device_mtu_source_to_string,
|
NM_UTILS_LOOKUP_STR_DEFINE(nm_device_mtu_source_to_string,
|
||||||
NMDeviceMtuSource,
|
NMDeviceMtuSource,
|
||||||
|
|
@ -235,7 +239,7 @@ resolve_addr_helper_cb(GObject *source, GAsyncResult *result, gpointer user_data
|
||||||
gs_free_error GError *error = NULL;
|
gs_free_error GError *error = NULL;
|
||||||
gs_free char *output = NULL;
|
gs_free char *output = NULL;
|
||||||
|
|
||||||
output = nm_utils_spawn_helper_finish(result, &error);
|
output = nm_utils_spawn_helper_finish_string(result, &error);
|
||||||
if (nm_utils_error_is_cancelled(error))
|
if (nm_utils_error_is_cancelled(error))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -274,6 +278,7 @@ resolve_addr_spawn_helper(ResolveAddrInfo *info, ResolveAddrService services)
|
||||||
nm_inet_ntop(info->addr_family, &info->address, addr_str);
|
nm_inet_ntop(info->addr_family, &info->address, addr_str);
|
||||||
_LOG2D(info, "start lookup via nm-daemon-helper using services: %s", str);
|
_LOG2D(info, "start lookup via nm-daemon-helper using services: %s", str);
|
||||||
nm_utils_spawn_helper(NM_MAKE_STRV("resolve-address", addr_str, str),
|
nm_utils_spawn_helper(NM_MAKE_STRV("resolve-address", addr_str, str),
|
||||||
|
FALSE,
|
||||||
g_task_get_cancellable(info->task),
|
g_task_get_cancellable(info->task),
|
||||||
resolve_addr_helper_cb,
|
resolve_addr_helper_cb,
|
||||||
info);
|
info);
|
||||||
|
|
|
||||||
|
|
@ -292,16 +292,6 @@ get_generic_capabilities(NMDevice *device)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static gboolean
|
|
||||||
is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
|
|
||||||
{
|
|
||||||
if (!nm_device_parent_get_device(device))
|
|
||||||
return FALSE;
|
|
||||||
return NM_DEVICE_CLASS(nm_device_vlan_parent_class)->is_available(device, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
check_connection_compatible(NMDevice *device,
|
check_connection_compatible(NMDevice *device,
|
||||||
NMConnection *connection,
|
NMConnection *connection,
|
||||||
|
|
@ -561,7 +551,6 @@ nm_device_vlan_class_init(NMDeviceVlanClass *klass)
|
||||||
device_class->act_stage1_prepare_set_hwaddr_ethernet = TRUE;
|
device_class->act_stage1_prepare_set_hwaddr_ethernet = TRUE;
|
||||||
device_class->act_stage1_prepare = act_stage1_prepare;
|
device_class->act_stage1_prepare = act_stage1_prepare;
|
||||||
device_class->get_configured_mtu = nm_device_get_configured_mtu_wired_parent;
|
device_class->get_configured_mtu = nm_device_get_configured_mtu_wired_parent;
|
||||||
device_class->is_available = is_available;
|
|
||||||
device_class->parent_changed_notify = parent_changed_notify;
|
device_class->parent_changed_notify = parent_changed_notify;
|
||||||
|
|
||||||
device_class->check_connection_compatible = check_connection_compatible;
|
device_class->check_connection_compatible = check_connection_compatible;
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,7 @@ attach_port(NMDevice *device,
|
||||||
|
|
||||||
_LOGI(LOGD_DEVICE, "attached VRF port %s", port_iface);
|
_LOGI(LOGD_DEVICE, "attached VRF port %s", port_iface);
|
||||||
} else
|
} else
|
||||||
_LOGI(LOGD_BOND, "VRF port %s was attached", port_iface);
|
_LOGI(LOGD_DEVICE, "VRF port %s was attached", port_iface);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
#include "nm-active-connection.h"
|
#include "nm-active-connection.h"
|
||||||
#include "nm-act-request.h"
|
#include "nm-act-request.h"
|
||||||
#include "dns/nm-dns-manager.h"
|
#include "dns/nm-dns-manager.h"
|
||||||
|
#include "nm-firewall-utils.h"
|
||||||
|
|
||||||
#define _NMLOG_DEVICE_TYPE NMDeviceWireGuard
|
#define _NMLOG_DEVICE_TYPE NMDeviceWireGuard
|
||||||
#include "nm-device-logging.h"
|
#include "nm-device-logging.h"
|
||||||
|
|
@ -1207,6 +1208,40 @@ skip:
|
||||||
*out_allowed_ips_data = g_steal_pointer(&allowed_ips);
|
*out_allowed_ips_data = g_steal_pointer(&allowed_ips);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_configure_firewall(NMDeviceWireGuard *self, NMConnection *connection, int addr_family, gboolean up)
|
||||||
|
{
|
||||||
|
NMDeviceWireGuardPrivate *priv = NM_DEVICE_WIREGUARD_GET_PRIVATE(self);
|
||||||
|
const char *ip_iface;
|
||||||
|
NMSettingIPConfig *ip_config;
|
||||||
|
|
||||||
|
ip_iface = nm_device_get_ip_iface(NM_DEVICE(self));
|
||||||
|
|
||||||
|
nm_assert(ip_iface);
|
||||||
|
|
||||||
|
switch (addr_family) {
|
||||||
|
case AF_INET:
|
||||||
|
if (!priv->auto_default_route_enabled_4)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ip_config = nm_connection_get_setting_ip4_config(connection);
|
||||||
|
break;
|
||||||
|
case AF_INET6:
|
||||||
|
if (!priv->auto_default_route_enabled_6)
|
||||||
|
return;
|
||||||
|
|
||||||
|
ip_config = nm_connection_get_setting_ip6_config(connection);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
nm_assert_not_reached();
|
||||||
|
}
|
||||||
|
|
||||||
|
nm_assert(ip_config);
|
||||||
|
nm_assert(priv->auto_default_route_fwmark);
|
||||||
|
|
||||||
|
nm_firewall_config_set_wg_rule(ip_iface, ip_config, priv->auto_default_route_fwmark, up);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -1300,6 +1335,18 @@ create_and_realize(NMDevice *device,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
deactivate(NMDevice *device)
|
||||||
|
{
|
||||||
|
NMDeviceWireGuard *self = NM_DEVICE_WIREGUARD(device);
|
||||||
|
NMConnection *connection = nm_device_get_applied_connection(NM_DEVICE(self));
|
||||||
|
|
||||||
|
if (connection) {
|
||||||
|
_configure_firewall(self, connection, AF_INET, FALSE);
|
||||||
|
_configure_firewall(self, connection, AF_INET6, FALSE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -1625,6 +1672,57 @@ act_stage2_config(NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
skip_peer_route(const NMIPAddr *peer_addr,
|
||||||
|
guint peer_addr_prefix,
|
||||||
|
int addr_family,
|
||||||
|
NMSettingIPConfig *s_ip)
|
||||||
|
{
|
||||||
|
guint num_addresses;
|
||||||
|
guint i;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If the allowed-ip subnet is already reachable on the interface via the
|
||||||
|
* prefix route of a static IP address, skip adding the peer route.
|
||||||
|
* We don't want to override the prefix route with a new one because the
|
||||||
|
* prefix route also specifies the correct source IP address.
|
||||||
|
*
|
||||||
|
* wg-quick does something similar here:
|
||||||
|
* https://git.zx2c4.com/wireguard-tools/tree/src/wg-quick/linux.bash?h=v1.0.20250521#n177
|
||||||
|
* The condition in wg-quick is a bit different because it checks that no
|
||||||
|
* duplicate route exists on the interface. We can't do exactly the same
|
||||||
|
* because here we don't have visibility on all the platform routes.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!s_ip)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
num_addresses = nm_setting_ip_config_get_num_addresses(s_ip);
|
||||||
|
for (i = 0; i < num_addresses; i++) {
|
||||||
|
NMIPAddr setting_addr;
|
||||||
|
NMIPAddr peer_addr_tmp;
|
||||||
|
guint setting_prefix;
|
||||||
|
NMIPAddress *a;
|
||||||
|
|
||||||
|
peer_addr_tmp = *peer_addr;
|
||||||
|
|
||||||
|
a = nm_setting_ip_config_get_address(s_ip, i);
|
||||||
|
nm_ip_address_get_address_binary(a, &setting_addr);
|
||||||
|
setting_prefix = nm_ip_address_get_prefix(a);
|
||||||
|
|
||||||
|
if (setting_prefix > peer_addr_prefix)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
nm_ip_addr_clear_host_address(addr_family, &setting_addr, NULL, setting_prefix);
|
||||||
|
nm_ip_addr_clear_host_address(addr_family, &peer_addr_tmp, NULL, setting_prefix);
|
||||||
|
|
||||||
|
if (nm_ip_addr_equal(addr_family, &peer_addr_tmp, &setting_addr))
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static const NML3ConfigData *
|
static const NML3ConfigData *
|
||||||
_get_dev2_ip_config(NMDeviceWireGuard *self, int addr_family)
|
_get_dev2_ip_config(NMDeviceWireGuard *self, int addr_family)
|
||||||
{
|
{
|
||||||
|
|
@ -1691,6 +1789,7 @@ _get_dev2_ip_config(NMDeviceWireGuard *self, int addr_family)
|
||||||
|
|
||||||
n_aips = nm_wireguard_peer_get_allowed_ips_len(peer);
|
n_aips = nm_wireguard_peer_get_allowed_ips_len(peer);
|
||||||
for (j = 0; j < n_aips; j++) {
|
for (j = 0; j < n_aips; j++) {
|
||||||
|
NMSettingIPConfig *s_ip;
|
||||||
NMPlatformIPXRoute rt;
|
NMPlatformIPXRoute rt;
|
||||||
NMIPAddr addrbin;
|
NMIPAddr addrbin;
|
||||||
const char *aip;
|
const char *aip;
|
||||||
|
|
@ -1699,6 +1798,7 @@ _get_dev2_ip_config(NMDeviceWireGuard *self, int addr_family)
|
||||||
guint32 rtable_coerced;
|
guint32 rtable_coerced;
|
||||||
|
|
||||||
aip = nm_wireguard_peer_get_allowed_ip(peer, j, &valid);
|
aip = nm_wireguard_peer_get_allowed_ip(peer, j, &valid);
|
||||||
|
s_ip = nm_connection_get_setting_ip_config(connection, addr_family);
|
||||||
|
|
||||||
if (!valid || !nm_inet_parse_with_prefix_bin(addr_family, aip, NULL, &addrbin, &prefix))
|
if (!valid || !nm_inet_parse_with_prefix_bin(addr_family, aip, NULL, &addrbin, &prefix))
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -1707,9 +1807,6 @@ _get_dev2_ip_config(NMDeviceWireGuard *self, int addr_family)
|
||||||
prefix = (addr_family == AF_INET) ? 32 : 128;
|
prefix = (addr_family == AF_INET) ? 32 : 128;
|
||||||
|
|
||||||
if (prefix == 0) {
|
if (prefix == 0) {
|
||||||
NMSettingIPConfig *s_ip;
|
|
||||||
|
|
||||||
s_ip = nm_connection_get_setting_ip_config(connection, addr_family);
|
|
||||||
if (nm_setting_ip_config_get_never_default(s_ip))
|
if (nm_setting_ip_config_get_never_default(s_ip))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -1722,6 +1819,9 @@ _get_dev2_ip_config(NMDeviceWireGuard *self, int addr_family)
|
||||||
|
|
||||||
nm_ip_addr_clear_host_address(addr_family, &addrbin, NULL, prefix);
|
nm_ip_addr_clear_host_address(addr_family, &addrbin, NULL, prefix);
|
||||||
|
|
||||||
|
if (skip_peer_route(&addrbin, prefix, addr_family, s_ip))
|
||||||
|
continue;
|
||||||
|
|
||||||
rtable_coerced = route_table_coerced;
|
rtable_coerced = route_table_coerced;
|
||||||
|
|
||||||
if (prefix == 0 && auto_default_route_enabled) {
|
if (prefix == 0 && auto_default_route_enabled) {
|
||||||
|
|
@ -1768,6 +1868,10 @@ act_stage3_ip_config(NMDevice *device, int addr_family)
|
||||||
nm_auto_unref_l3cd const NML3ConfigData *l3cd = NULL;
|
nm_auto_unref_l3cd const NML3ConfigData *l3cd = NULL;
|
||||||
|
|
||||||
l3cd = _get_dev2_ip_config(NM_DEVICE_WIREGUARD(device), addr_family);
|
l3cd = _get_dev2_ip_config(NM_DEVICE_WIREGUARD(device), addr_family);
|
||||||
|
_configure_firewall(NM_DEVICE_WIREGUARD(device),
|
||||||
|
nm_device_get_applied_connection(device),
|
||||||
|
addr_family,
|
||||||
|
TRUE);
|
||||||
nm_device_devip_set_state(device, addr_family, NM_DEVICE_IP_STATE_READY, l3cd);
|
nm_device_devip_set_state(device, addr_family, NM_DEVICE_IP_STATE_READY, l3cd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1866,6 +1970,10 @@ reapply_connection(NMDevice *device, NMConnection *con_old, NMConnection *con_ne
|
||||||
|
|
||||||
if (state >= NM_DEVICE_STATE_CONFIG) {
|
if (state >= NM_DEVICE_STATE_CONFIG) {
|
||||||
priv->auto_default_route_refresh = TRUE;
|
priv->auto_default_route_refresh = TRUE;
|
||||||
|
|
||||||
|
_configure_firewall(self, con_old, AF_INET, FALSE);
|
||||||
|
_configure_firewall(self, con_old, AF_INET6, FALSE);
|
||||||
|
|
||||||
link_config(NM_DEVICE_WIREGUARD(device), "reapply", LINK_CONFIG_MODE_REAPPLY, NULL);
|
link_config(NM_DEVICE_WIREGUARD(device), "reapply", LINK_CONFIG_MODE_REAPPLY, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2018,6 +2126,7 @@ nm_device_wireguard_class_init(NMDeviceWireGuardClass *klass)
|
||||||
|
|
||||||
device_class->state_changed = device_state_changed;
|
device_class->state_changed = device_state_changed;
|
||||||
device_class->create_and_realize = create_and_realize;
|
device_class->create_and_realize = create_and_realize;
|
||||||
|
device_class->deactivate = deactivate;
|
||||||
device_class->act_stage2_config = act_stage2_config;
|
device_class->act_stage2_config = act_stage2_config;
|
||||||
device_class->act_stage2_config_also_for_external_or_assume = TRUE;
|
device_class->act_stage2_config_also_for_external_or_assume = TRUE;
|
||||||
device_class->act_stage3_ip_config = act_stage3_ip_config;
|
device_class->act_stage3_ip_config = act_stage3_ip_config;
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -209,8 +209,6 @@ typedef struct _NMDeviceClass {
|
||||||
|
|
||||||
bool act_stage1_prepare_set_hwaddr_ethernet : 1;
|
bool act_stage1_prepare_set_hwaddr_ethernet : 1;
|
||||||
|
|
||||||
bool can_reapply_change_ovs_external_ids : 1;
|
|
||||||
|
|
||||||
bool allow_autoconnect_on_external : 1;
|
bool allow_autoconnect_on_external : 1;
|
||||||
|
|
||||||
NMRfkillType rfkill_type : 4;
|
NMRfkillType rfkill_type : 4;
|
||||||
|
|
@ -583,7 +581,8 @@ void nm_device_copy_ip6_dns_config(NMDevice *self, NMDevice *from_device);
|
||||||
/**
|
/**
|
||||||
* NMUnmanagedFlags:
|
* NMUnmanagedFlags:
|
||||||
* @NM_UNMANAGED_NONE: placeholder value
|
* @NM_UNMANAGED_NONE: placeholder value
|
||||||
* @NM_UNMANAGED_SLEEPING: %TRUE when unmanaged because NM is sleeping.
|
* @NM_UNMANAGED_MANAGER_DISABLED: %TRUE when unmanaged because NM is disabled.
|
||||||
|
* Currently, this happens when sleeping or with networking disabled.
|
||||||
* @NM_UNMANAGED_QUITTING: %TRUE when unmanaged because NM is shutting down.
|
* @NM_UNMANAGED_QUITTING: %TRUE when unmanaged because NM is shutting down.
|
||||||
* @NM_UNMANAGED_PLATFORM_INIT: %TRUE when unmanaged because platform link not
|
* @NM_UNMANAGED_PLATFORM_INIT: %TRUE when unmanaged because platform link not
|
||||||
* yet initialized. Unrealized device are also unmanaged for this reason.
|
* yet initialized. Unrealized device are also unmanaged for this reason.
|
||||||
|
|
@ -612,7 +611,7 @@ typedef enum {
|
||||||
|
|
||||||
/* these flags are authoritative. If one of them is set,
|
/* these flags are authoritative. If one of them is set,
|
||||||
* the device cannot be managed. */
|
* the device cannot be managed. */
|
||||||
NM_UNMANAGED_SLEEPING = (1LL << 0),
|
NM_UNMANAGED_MANAGER_DISABLED = (1LL << 0),
|
||||||
NM_UNMANAGED_QUITTING = (1LL << 1),
|
NM_UNMANAGED_QUITTING = (1LL << 1),
|
||||||
NM_UNMANAGED_PLATFORM_INIT = (1LL << 2),
|
NM_UNMANAGED_PLATFORM_INIT = (1LL << 2),
|
||||||
NM_UNMANAGED_USER_EXPLICIT = (1LL << 3),
|
NM_UNMANAGED_USER_EXPLICIT = (1LL << 3),
|
||||||
|
|
@ -854,4 +853,7 @@ void nm_routing_rules_sync(NMConnection *applied_connection,
|
||||||
NMDevice *self,
|
NMDevice *self,
|
||||||
NMNetns *netns);
|
NMNetns *netns);
|
||||||
|
|
||||||
|
NML3ConfigData *nm_device_create_l3_config_data_from_connection(NMDevice *self,
|
||||||
|
NMConnection *connection);
|
||||||
|
|
||||||
#endif /* __NETWORKMANAGER_DEVICE_H__ */
|
#endif /* __NETWORKMANAGER_DEVICE_H__ */
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,7 @@ format_string(const guint8 *data, gsize len, gboolean allow_trim, char **out_to_
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (memchr(data, len, '\0'))
|
if (memchr(data, '\0', len))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return nm_utils_buf_utf8safe_escape(data,
|
return nm_utils_buf_utf8safe_escape(data,
|
||||||
|
|
|
||||||
|
|
@ -135,13 +135,41 @@ nm_device_ovs_reapply_connection(NMDevice *self, NMConnection *con_old, NMConnec
|
||||||
nm_ovsdb_set_reapply(nm_ovsdb_get(),
|
nm_ovsdb_set_reapply(nm_ovsdb_get(),
|
||||||
device_type,
|
device_type,
|
||||||
nm_device_get_ip_iface(self),
|
nm_device_get_ip_iface(self),
|
||||||
nm_connection_get_uuid(con_new),
|
nm_simple_connection_new_clone(con_new),
|
||||||
_nm_connection_get_setting(con_old, NM_TYPE_SETTING_OVS_EXTERNAL_IDS),
|
_nm_connection_get_setting(con_old, NM_TYPE_SETTING_OVS_EXTERNAL_IDS),
|
||||||
_nm_connection_get_setting(con_new, NM_TYPE_SETTING_OVS_EXTERNAL_IDS),
|
_nm_connection_get_setting(con_new, NM_TYPE_SETTING_OVS_EXTERNAL_IDS),
|
||||||
_nm_connection_get_setting(con_old, NM_TYPE_SETTING_OVS_OTHER_CONFIG),
|
_nm_connection_get_setting(con_old, NM_TYPE_SETTING_OVS_OTHER_CONFIG),
|
||||||
_nm_connection_get_setting(con_new, NM_TYPE_SETTING_OVS_OTHER_CONFIG));
|
_nm_connection_get_setting(con_new, NM_TYPE_SETTING_OVS_OTHER_CONFIG));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
can_reapply_change(NMDevice *device,
|
||||||
|
const char *setting_name,
|
||||||
|
NMSetting *s_old,
|
||||||
|
NMSetting *s_new,
|
||||||
|
GHashTable *diffs,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
NMDeviceClass *device_class = NM_DEVICE_CLASS(nm_device_ovs_bridge_parent_class);
|
||||||
|
|
||||||
|
if (nm_streq(setting_name, NM_SETTING_OVS_BRIDGE_SETTING_NAME)) {
|
||||||
|
return nm_device_hash_check_invalid_keys(diffs,
|
||||||
|
NM_SETTING_OVS_BRIDGE_SETTING_NAME,
|
||||||
|
error,
|
||||||
|
NM_SETTING_OVS_BRIDGE_FAIL_MODE,
|
||||||
|
NM_SETTING_OVS_BRIDGE_MCAST_SNOOPING_ENABLE,
|
||||||
|
NM_SETTING_OVS_BRIDGE_RSTP_ENABLE,
|
||||||
|
NM_SETTING_OVS_BRIDGE_STP_ENABLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NM_IN_STRSET(setting_name,
|
||||||
|
NM_SETTING_OVS_EXTERNAL_IDS_SETTING_NAME,
|
||||||
|
NM_SETTING_OVS_OTHER_CONFIG_SETTING_NAME))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return device_class->can_reapply_change(device, setting_name, s_old, s_new, diffs, error);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -180,6 +208,6 @@ nm_device_ovs_bridge_class_init(NMDeviceOvsBridgeClass *klass)
|
||||||
device_class->ready_for_ip_config = ready_for_ip_config;
|
device_class->ready_for_ip_config = ready_for_ip_config;
|
||||||
device_class->attach_port = attach_port;
|
device_class->attach_port = attach_port;
|
||||||
device_class->detach_port = detach_port;
|
device_class->detach_port = detach_port;
|
||||||
device_class->can_reapply_change_ovs_external_ids = TRUE;
|
device_class->can_reapply_change = can_reapply_change;
|
||||||
device_class->reapply_connection = nm_device_ovs_reapply_connection;
|
device_class->reapply_connection = nm_device_ovs_reapply_connection;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
#include "nm-setting-ovs-bridge.h"
|
#include "nm-setting-ovs-bridge.h"
|
||||||
#include "nm-setting-ovs-interface.h"
|
#include "nm-setting-ovs-interface.h"
|
||||||
#include "nm-setting-ovs-port.h"
|
#include "nm-setting-ovs-port.h"
|
||||||
|
#include "nm-setting-ovs-external-ids.h"
|
||||||
|
#include "nm-setting-ovs-other-config.h"
|
||||||
|
|
||||||
#define _NMLOG_DEVICE_TYPE NMDeviceOvsInterface
|
#define _NMLOG_DEVICE_TYPE NMDeviceOvsInterface
|
||||||
#include "devices/nm-device-logging.h"
|
#include "devices/nm-device-logging.h"
|
||||||
|
|
@ -26,16 +28,18 @@ typedef struct {
|
||||||
NMOvsdb *ovsdb;
|
NMOvsdb *ovsdb;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
/* The source for the idle handler to set the TUN ifindex */
|
/* The signal id for the TUN link-changed event */
|
||||||
GSource *tun_set_ifindex_idle_source;
|
gulong tun_link_signal_id;
|
||||||
|
/* The idle handler source for the TUN link-changed event */
|
||||||
|
GSource *tun_link_idle_source;
|
||||||
|
/* The ifindex for the TUN link-changed event */
|
||||||
|
int tun_ifindex;
|
||||||
|
|
||||||
/* The cloned MAC to set */
|
/* The cloned MAC to set */
|
||||||
char *cloned_mac;
|
char *cloned_mac;
|
||||||
/* The id for the signal watching the TUN link to appear/change */
|
|
||||||
gulong tun_link_signal_id;
|
|
||||||
/* The TUN ifindex to set in the idle handler */
|
|
||||||
int tun_ifindex;
|
|
||||||
/* Whether we have determined the cloned MAC */
|
/* Whether we have determined the cloned MAC */
|
||||||
bool cloned_mac_evaluated : 1;
|
bool cloned_mac_evaluated : 1;
|
||||||
|
|
||||||
/* Whether we are waiting for the kernel link */
|
/* Whether we are waiting for the kernel link */
|
||||||
bool waiting : 1;
|
bool waiting : 1;
|
||||||
} wait_link;
|
} wait_link;
|
||||||
|
|
@ -261,39 +265,33 @@ ready_for_ip_config(NMDevice *device, gboolean is_manual)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
_set_ip_ifindex_tun(gpointer user_data)
|
_netdev_tun_link_cb_in_idle(gpointer user_data)
|
||||||
{
|
{
|
||||||
NMDevice *device = user_data;
|
NMDevice *device = user_data;
|
||||||
NMDeviceOvsInterface *self = NM_DEVICE_OVS_INTERFACE(device);
|
NMDeviceOvsInterface *self = NM_DEVICE_OVS_INTERFACE(device);
|
||||||
NMDeviceOvsInterfacePrivate *priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE(self);
|
NMDeviceOvsInterfacePrivate *priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE(self);
|
||||||
|
|
||||||
|
if (nm_device_get_ip_ifindex(device) <= 0) {
|
||||||
_LOGT(LOGD_CORE,
|
_LOGT(LOGD_CORE,
|
||||||
"ovs-wait-link: setting ip-ifindex %d from tun interface",
|
"ovs-wait-link: setting ip-ifindex %d from tun link",
|
||||||
priv->wait_link.tun_ifindex);
|
priv->wait_link.tun_ifindex);
|
||||||
|
|
||||||
nm_clear_g_source_inst(&priv->wait_link.tun_set_ifindex_idle_source);
|
|
||||||
|
|
||||||
nm_device_set_ip_ifindex(device, priv->wait_link.tun_ifindex);
|
nm_device_set_ip_ifindex(device, priv->wait_link.tun_ifindex);
|
||||||
|
}
|
||||||
|
|
||||||
if (check_waiting_for_link(device, "set-ip-ifindex-tun")) {
|
if (check_waiting_for_link(device, "tun-link-changed")) {
|
||||||
/* If the link is not ready, it means the MAC is not set yet. We don't have
|
nm_clear_g_source_inst(&priv->wait_link.tun_link_idle_source);
|
||||||
* a convenient way to monitor for ip-ifindex changes other than listening
|
|
||||||
* for platform events again.*/
|
|
||||||
nm_assert(!priv->wait_link.tun_link_signal_id);
|
|
||||||
priv->wait_link.tun_link_signal_id = g_signal_connect(nm_device_get_platform(device),
|
|
||||||
NM_PLATFORM_SIGNAL_LINK_CHANGED,
|
|
||||||
G_CALLBACK(_netdev_tun_link_cb),
|
|
||||||
self);
|
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
_LOGT(LOGD_CORE, "tun link is ready");
|
_LOGT(LOGD_CORE, "ovs-wait-link: tun link is ready");
|
||||||
|
|
||||||
nm_device_link_properties_set(device, FALSE);
|
nm_device_link_properties_set(device, FALSE);
|
||||||
|
nm_device_bring_up(device);
|
||||||
|
|
||||||
nm_device_devip_set_state(device, AF_INET, NM_DEVICE_IP_STATE_PENDING, NULL);
|
nm_device_devip_set_state(device, AF_INET, NM_DEVICE_IP_STATE_PENDING, NULL);
|
||||||
nm_device_devip_set_state(device, AF_INET6, NM_DEVICE_IP_STATE_PENDING, NULL);
|
nm_device_devip_set_state(device, AF_INET6, NM_DEVICE_IP_STATE_PENDING, NULL);
|
||||||
nm_device_activate_schedule_stage3_ip_config(device, FALSE);
|
nm_device_activate_schedule_stage3_ip_config(device, FALSE);
|
||||||
|
nm_clear_g_signal_handler(nm_device_get_platform(device), &priv->wait_link.tun_link_signal_id);
|
||||||
|
nm_clear_g_source_inst(&priv->wait_link.tun_link_idle_source);
|
||||||
|
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
@ -309,40 +307,28 @@ _netdev_tun_link_cb(NMPlatform *platform,
|
||||||
const NMPlatformSignalChangeType change_type = change_type_i;
|
const NMPlatformSignalChangeType change_type = change_type_i;
|
||||||
NMDeviceOvsInterface *self = NM_DEVICE_OVS_INTERFACE(device);
|
NMDeviceOvsInterface *self = NM_DEVICE_OVS_INTERFACE(device);
|
||||||
NMDeviceOvsInterfacePrivate *priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE(self);
|
NMDeviceOvsInterfacePrivate *priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE(self);
|
||||||
int ip_ifindex;
|
|
||||||
|
|
||||||
|
/* This is the handler for the link-changed platform events. It is triggered for all
|
||||||
|
* link changes. Keep only the ones matching our device. */
|
||||||
|
if (!NM_IN_SET(change_type, NM_PLATFORM_SIGNAL_ADDED, NM_PLATFORM_SIGNAL_CHANGED))
|
||||||
|
return;
|
||||||
if (pllink->type != NM_LINK_TYPE_TUN || !nm_streq0(pllink->name, nm_device_get_iface(device)))
|
if (pllink->type != NM_LINK_TYPE_TUN || !nm_streq0(pllink->name, nm_device_get_iface(device)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ip_ifindex = nm_device_get_ip_ifindex(device);
|
|
||||||
if (ip_ifindex > 0) {
|
|
||||||
/* When we have an ifindex, we are only waiting for the MAC to settle */
|
|
||||||
if (change_type != NM_PLATFORM_SIGNAL_CHANGED)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (!check_waiting_for_link(device, "tun-link-changed")) {
|
|
||||||
_LOGT(LOGD_CORE, "ovs-wait-link: tun link is ready, cloned MAC is set");
|
|
||||||
|
|
||||||
nm_clear_g_signal_handler(platform, &priv->wait_link.tun_link_signal_id);
|
|
||||||
nm_device_link_properties_set(device, FALSE);
|
|
||||||
|
|
||||||
nm_device_devip_set_state(device, AF_INET, NM_DEVICE_IP_STATE_PENDING, NULL);
|
|
||||||
nm_device_devip_set_state(device, AF_INET6, NM_DEVICE_IP_STATE_PENDING, NULL);
|
|
||||||
nm_device_activate_schedule_stage3_ip_config(device, FALSE);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* No ip-ifindex on the device, set it when the link appears */
|
|
||||||
if (change_type != NM_PLATFORM_SIGNAL_ADDED)
|
|
||||||
return;
|
|
||||||
|
|
||||||
_LOGT(LOGD_CORE,
|
_LOGT(LOGD_CORE,
|
||||||
"ovs-wait-link: found matching tun interface, schedule set-ip-ifindex(%d)",
|
"ovs-wait-link: got platform event \'%s\' for ifindex %d, scheduling idle handler",
|
||||||
|
change_type == NM_PLATFORM_SIGNAL_ADDED ? "added" : "changed",
|
||||||
ifindex);
|
ifindex);
|
||||||
nm_clear_g_signal_handler(platform, &priv->wait_link.tun_link_signal_id);
|
|
||||||
|
/* The handler is invoked by the platform synchronously in the netlink receive loop.
|
||||||
|
* We can't perform other platform operations (like bringing the interface up) since
|
||||||
|
* the code there is not re-entrant. Schedule an idle handler. */
|
||||||
|
nm_clear_g_source_inst(&priv->wait_link.tun_link_idle_source);
|
||||||
|
priv->wait_link.tun_link_idle_source =
|
||||||
|
nm_g_idle_add_source(_netdev_tun_link_cb_in_idle, device);
|
||||||
priv->wait_link.tun_ifindex = ifindex;
|
priv->wait_link.tun_ifindex = ifindex;
|
||||||
priv->wait_link.tun_set_ifindex_idle_source = nm_g_idle_add_source(_set_ip_ifindex_tun, device);
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
@ -464,7 +450,7 @@ act_stage3_ip_config(NMDevice *device, int addr_family)
|
||||||
nm_device_activate_schedule_stage3_ip_config(device, TRUE);
|
nm_device_activate_schedule_stage3_ip_config(device, TRUE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
nm_clear_g_source_inst(&priv->wait_link.tun_set_ifindex_idle_source);
|
nm_clear_g_source_inst(&priv->wait_link.tun_link_idle_source);
|
||||||
nm_clear_g_signal_handler(nm_device_get_platform(device), &priv->wait_link.tun_link_signal_id);
|
nm_clear_g_signal_handler(nm_device_get_platform(device), &priv->wait_link.tun_link_signal_id);
|
||||||
|
|
||||||
nm_device_link_properties_set(device, FALSE);
|
nm_device_link_properties_set(device, FALSE);
|
||||||
|
|
@ -488,7 +474,7 @@ deactivate(NMDevice *device)
|
||||||
priv->wait_link.cloned_mac_evaluated = FALSE;
|
priv->wait_link.cloned_mac_evaluated = FALSE;
|
||||||
nm_clear_g_free(&priv->wait_link.cloned_mac);
|
nm_clear_g_free(&priv->wait_link.cloned_mac);
|
||||||
nm_clear_g_signal_handler(nm_device_get_platform(device), &priv->wait_link.tun_link_signal_id);
|
nm_clear_g_signal_handler(nm_device_get_platform(device), &priv->wait_link.tun_link_signal_id);
|
||||||
nm_clear_g_source_inst(&priv->wait_link.tun_set_ifindex_idle_source);
|
nm_clear_g_source_inst(&priv->wait_link.tun_link_idle_source);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
@ -581,7 +567,7 @@ deactivate_async(NMDevice *device,
|
||||||
_LOGT(LOGD_CORE, "deactivate: start async");
|
_LOGT(LOGD_CORE, "deactivate: start async");
|
||||||
|
|
||||||
nm_clear_g_signal_handler(nm_device_get_platform(device), &priv->wait_link.tun_link_signal_id);
|
nm_clear_g_signal_handler(nm_device_get_platform(device), &priv->wait_link.tun_link_signal_id);
|
||||||
nm_clear_g_source_inst(&priv->wait_link.tun_set_ifindex_idle_source);
|
nm_clear_g_source_inst(&priv->wait_link.tun_link_idle_source);
|
||||||
priv->wait_link.tun_ifindex = -1;
|
priv->wait_link.tun_ifindex = -1;
|
||||||
priv->wait_link.cloned_mac_evaluated = FALSE;
|
priv->wait_link.cloned_mac_evaluated = FALSE;
|
||||||
nm_clear_g_free(&priv->wait_link.cloned_mac);
|
nm_clear_g_free(&priv->wait_link.cloned_mac);
|
||||||
|
|
@ -647,6 +633,28 @@ can_update_from_platform_link(NMDevice *device, const NMPlatformLink *plink)
|
||||||
return !plink || nm_device_get_state(device) != NM_DEVICE_STATE_DEACTIVATING;
|
return !plink || nm_device_get_state(device) != NM_DEVICE_STATE_DEACTIVATING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
can_reapply_change(NMDevice *device,
|
||||||
|
const char *setting_name,
|
||||||
|
NMSetting *s_old,
|
||||||
|
NMSetting *s_new,
|
||||||
|
GHashTable *diffs,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
NMDeviceClass *device_class = NM_DEVICE_CLASS(nm_device_ovs_interface_parent_class);
|
||||||
|
|
||||||
|
if (NM_IN_STRSET(setting_name,
|
||||||
|
NM_SETTING_OVS_EXTERNAL_IDS_SETTING_NAME,
|
||||||
|
NM_SETTING_OVS_OTHER_CONFIG_SETTING_NAME)) {
|
||||||
|
/* TODO: it's currently not possible to reapply those settings on OVS
|
||||||
|
* system interfaces because they have type != "ovs-interface" (e.g.
|
||||||
|
* "ethernet") */
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return device_class->can_reapply_change(device, setting_name, s_old, s_new, diffs, error);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -682,7 +690,7 @@ dispose(GObject *object)
|
||||||
|
|
||||||
nm_assert(!priv->wait_link.waiting);
|
nm_assert(!priv->wait_link.waiting);
|
||||||
nm_assert(priv->wait_link.tun_link_signal_id == 0);
|
nm_assert(priv->wait_link.tun_link_signal_id == 0);
|
||||||
nm_assert(!priv->wait_link.tun_set_ifindex_idle_source);
|
nm_assert(!priv->wait_link.tun_link_idle_source);
|
||||||
|
|
||||||
if (priv->ovsdb) {
|
if (priv->ovsdb) {
|
||||||
g_signal_handlers_disconnect_by_func(priv->ovsdb, G_CALLBACK(ovsdb_ready), self);
|
g_signal_handlers_disconnect_by_func(priv->ovsdb, G_CALLBACK(ovsdb_ready), self);
|
||||||
|
|
@ -727,6 +735,6 @@ nm_device_ovs_interface_class_init(NMDeviceOvsInterfaceClass *klass)
|
||||||
device_class->can_unmanaged_external_down = can_unmanaged_external_down;
|
device_class->can_unmanaged_external_down = can_unmanaged_external_down;
|
||||||
device_class->set_platform_mtu = set_platform_mtu;
|
device_class->set_platform_mtu = set_platform_mtu;
|
||||||
device_class->get_configured_mtu = nm_device_get_configured_mtu_for_wired;
|
device_class->get_configured_mtu = nm_device_get_configured_mtu_for_wired;
|
||||||
device_class->can_reapply_change_ovs_external_ids = TRUE;
|
device_class->can_reapply_change = can_reapply_change;
|
||||||
device_class->reapply_connection = nm_device_ovs_reapply_connection;
|
device_class->reapply_connection = nm_device_ovs_reapply_connection;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
#include "nm-setting-connection.h"
|
#include "nm-setting-connection.h"
|
||||||
#include "nm-setting-ovs-port.h"
|
#include "nm-setting-ovs-port.h"
|
||||||
#include "nm-setting-ovs-interface.h"
|
#include "nm-setting-ovs-interface.h"
|
||||||
|
#include "nm-setting-ovs-external-ids.h"
|
||||||
|
#include "nm-setting-ovs-other-config.h"
|
||||||
#include "nm-setting-wired.h"
|
#include "nm-setting-wired.h"
|
||||||
|
|
||||||
#define _NMLOG_DEVICE_TYPE NMDeviceOvsPort
|
#define _NMLOG_DEVICE_TYPE NMDeviceOvsPort
|
||||||
|
|
@ -256,6 +258,37 @@ detach_port(NMDevice *device,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
can_reapply_change(NMDevice *device,
|
||||||
|
const char *setting_name,
|
||||||
|
NMSetting *s_old,
|
||||||
|
NMSetting *s_new,
|
||||||
|
GHashTable *diffs,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
NMDeviceClass *device_class = NM_DEVICE_CLASS(nm_device_ovs_port_parent_class);
|
||||||
|
|
||||||
|
if (nm_streq(setting_name, NM_SETTING_OVS_PORT_SETTING_NAME)) {
|
||||||
|
return nm_device_hash_check_invalid_keys(diffs,
|
||||||
|
NM_SETTING_OVS_PORT_SETTING_NAME,
|
||||||
|
error,
|
||||||
|
NM_SETTING_OVS_PORT_TAG,
|
||||||
|
NM_SETTING_OVS_PORT_VLAN_MODE,
|
||||||
|
NM_SETTING_OVS_PORT_BOND_UPDELAY,
|
||||||
|
NM_SETTING_OVS_PORT_BOND_DOWNDELAY,
|
||||||
|
NM_SETTING_OVS_PORT_LACP,
|
||||||
|
NM_SETTING_OVS_PORT_BOND_MODE,
|
||||||
|
NM_SETTING_OVS_PORT_TRUNKS);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NM_IN_STRSET(setting_name,
|
||||||
|
NM_SETTING_OVS_EXTERNAL_IDS_SETTING_NAME,
|
||||||
|
NM_SETTING_OVS_OTHER_CONFIG_SETTING_NAME))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return device_class->can_reapply_change(device, setting_name, s_old, s_new, diffs, error);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -293,6 +326,6 @@ nm_device_ovs_port_class_init(NMDeviceOvsPortClass *klass)
|
||||||
device_class->ready_for_ip_config = ready_for_ip_config;
|
device_class->ready_for_ip_config = ready_for_ip_config;
|
||||||
device_class->attach_port = attach_port;
|
device_class->attach_port = attach_port;
|
||||||
device_class->detach_port = detach_port;
|
device_class->detach_port = detach_port;
|
||||||
device_class->can_reapply_change_ovs_external_ids = TRUE;
|
device_class->can_reapply_change = can_reapply_change;
|
||||||
device_class->reapply_connection = nm_device_ovs_reapply_connection;
|
device_class->reapply_connection = nm_device_ovs_reapply_connection;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,6 @@ new_device_from_type(const char *name, NMDeviceType device_type)
|
||||||
const char *type_desc;
|
const char *type_desc;
|
||||||
NMLinkType link_type = NM_LINK_TYPE_NONE;
|
NMLinkType link_type = NM_LINK_TYPE_NONE;
|
||||||
|
|
||||||
if (nm_manager_get_device(NM_MANAGER_GET, name, device_type))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if (device_type == NM_DEVICE_TYPE_OVS_INTERFACE) {
|
if (device_type == NM_DEVICE_TYPE_OVS_INTERFACE) {
|
||||||
type = NM_TYPE_DEVICE_OVS_INTERFACE;
|
type = NM_TYPE_DEVICE_OVS_INTERFACE;
|
||||||
type_desc = "Open vSwitch Interface";
|
type_desc = "Open vSwitch Interface";
|
||||||
|
|
@ -89,6 +86,7 @@ new_device_from_type(const char *name, NMDeviceType device_type)
|
||||||
type = NM_TYPE_DEVICE_OVS_BRIDGE;
|
type = NM_TYPE_DEVICE_OVS_BRIDGE;
|
||||||
type_desc = "Open vSwitch Bridge";
|
type_desc = "Open vSwitch Bridge";
|
||||||
} else {
|
} else {
|
||||||
|
_LOGT(name, NULL, "Unrecognized link type: %d", device_type);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -125,6 +123,11 @@ ovsdb_device_added(NMOvsdb *ovsdb,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nm_manager_get_device(NM_MANAGER_GET, name, device_type)) {
|
||||||
|
_LOGT(name, NULL, "Device already registered with manager, skipping.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
device = new_device_from_type(name, device_type);
|
device = new_device_from_type(name, device_type);
|
||||||
if (!device)
|
if (!device)
|
||||||
return;
|
return;
|
||||||
|
|
@ -288,23 +291,31 @@ create_device(NMDeviceFactory *self,
|
||||||
{
|
{
|
||||||
NMDeviceType device_type = NM_DEVICE_TYPE_UNKNOWN;
|
NMDeviceType device_type = NM_DEVICE_TYPE_UNKNOWN;
|
||||||
const char *connection_type = NULL;
|
const char *connection_type = NULL;
|
||||||
|
const char *connection_uuid = NULL;
|
||||||
|
|
||||||
if (g_strcmp0(iface, "ovs-system") == 0) {
|
if (g_strcmp0(iface, "ovs-system") == 0) {
|
||||||
*out_ignore = TRUE;
|
*out_ignore = TRUE;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connection)
|
if (connection) {
|
||||||
connection_type = nm_connection_get_connection_type(connection);
|
connection_type = nm_connection_get_connection_type(connection);
|
||||||
|
connection_uuid = nm_connection_get_uuid(connection);
|
||||||
|
}
|
||||||
|
|
||||||
if (plink)
|
if (plink) {
|
||||||
|
_LOGD(iface, connection_uuid, "creating OVS interface (from a platform link)");
|
||||||
device_type = NM_DEVICE_TYPE_OVS_INTERFACE;
|
device_type = NM_DEVICE_TYPE_OVS_INTERFACE;
|
||||||
else if (g_strcmp0(connection_type, NM_SETTING_OVS_INTERFACE_SETTING_NAME) == 0)
|
} else if (nm_streq0(connection_type, NM_SETTING_OVS_INTERFACE_SETTING_NAME)) {
|
||||||
|
_LOGD(iface, connection_uuid, "creating OVS interface (from setting)");
|
||||||
device_type = NM_DEVICE_TYPE_OVS_INTERFACE;
|
device_type = NM_DEVICE_TYPE_OVS_INTERFACE;
|
||||||
else if (g_strcmp0(connection_type, NM_SETTING_OVS_PORT_SETTING_NAME) == 0)
|
} else if (nm_streq0(connection_type, NM_SETTING_OVS_PORT_SETTING_NAME)) {
|
||||||
|
_LOGD(iface, connection_uuid, "creating OVS port (from setting)");
|
||||||
device_type = NM_DEVICE_TYPE_OVS_PORT;
|
device_type = NM_DEVICE_TYPE_OVS_PORT;
|
||||||
else if (g_strcmp0(connection_type, NM_SETTING_OVS_BRIDGE_SETTING_NAME) == 0)
|
} else if (nm_streq0(connection_type, NM_SETTING_OVS_BRIDGE_SETTING_NAME)) {
|
||||||
|
_LOGD(iface, connection_uuid, "creating OVS bridge (from setting)");
|
||||||
device_type = NM_DEVICE_TYPE_OVS_BRIDGE;
|
device_type = NM_DEVICE_TYPE_OVS_BRIDGE;
|
||||||
|
}
|
||||||
|
|
||||||
return new_device_from_type(iface, device_type);
|
return new_device_from_type(iface, device_type);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ typedef union {
|
||||||
struct {
|
struct {
|
||||||
NMDeviceType device_type;
|
NMDeviceType device_type;
|
||||||
char *ifname;
|
char *ifname;
|
||||||
char *connection_uuid;
|
NMConnection *connection;
|
||||||
GHashTable *external_ids_old;
|
GHashTable *external_ids_old;
|
||||||
GHashTable *external_ids_new;
|
GHashTable *external_ids_new;
|
||||||
GHashTable *other_config_old;
|
GHashTable *other_config_old;
|
||||||
|
|
@ -244,22 +244,19 @@ static void cleanup_check_ready(NMOvsdb *self);
|
||||||
|
|
||||||
#define OVSDB_METHOD_PAYLOAD_SET_REAPPLY(xdevice_type, \
|
#define OVSDB_METHOD_PAYLOAD_SET_REAPPLY(xdevice_type, \
|
||||||
xifname, \
|
xifname, \
|
||||||
xconnection_uuid, \
|
xconnection, \
|
||||||
xexternal_ids_old, \
|
xexternal_ids_old, \
|
||||||
xexternal_ids_new, \
|
xexternal_ids_new, \
|
||||||
xother_config_old, \
|
xother_config_old, \
|
||||||
xother_config_new) \
|
xother_config_new) \
|
||||||
(&((const OvsdbMethodPayload) { \
|
(&((const OvsdbMethodPayload) { \
|
||||||
.set_reapply = \
|
.set_reapply = {.device_type = xdevice_type, \
|
||||||
{ \
|
|
||||||
.device_type = xdevice_type, \
|
|
||||||
.ifname = (char *) NM_CONSTCAST(char, (xifname)), \
|
.ifname = (char *) NM_CONSTCAST(char, (xifname)), \
|
||||||
.connection_uuid = (char *) NM_CONSTCAST(char, (xconnection_uuid)), \
|
.connection = (xconnection), \
|
||||||
.external_ids_old = (xexternal_ids_old), \
|
.external_ids_old = (xexternal_ids_old), \
|
||||||
.external_ids_new = (xexternal_ids_new), \
|
.external_ids_new = (xexternal_ids_new), \
|
||||||
.other_config_old = (xother_config_old), \
|
.other_config_old = (xother_config_old), \
|
||||||
.other_config_new = (xother_config_new), \
|
.other_config_new = (xother_config_new)}, \
|
||||||
}, \
|
|
||||||
}))
|
}))
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
@ -316,7 +313,7 @@ _call_complete(OvsdbMethodCall *call, json_t *response, GError *error)
|
||||||
break;
|
break;
|
||||||
case OVSDB_SET_REAPPLY:
|
case OVSDB_SET_REAPPLY:
|
||||||
nm_clear_g_free(&call->payload.set_reapply.ifname);
|
nm_clear_g_free(&call->payload.set_reapply.ifname);
|
||||||
nm_clear_g_free(&call->payload.set_reapply.connection_uuid);
|
nm_clear_g_object(&call->payload.set_reapply.connection);
|
||||||
nm_clear_pointer(&call->payload.set_reapply.external_ids_old, g_hash_table_destroy);
|
nm_clear_pointer(&call->payload.set_reapply.external_ids_old, g_hash_table_destroy);
|
||||||
nm_clear_pointer(&call->payload.set_reapply.external_ids_new, g_hash_table_destroy);
|
nm_clear_pointer(&call->payload.set_reapply.external_ids_new, g_hash_table_destroy);
|
||||||
nm_clear_pointer(&call->payload.set_reapply.other_config_old, g_hash_table_destroy);
|
nm_clear_pointer(&call->payload.set_reapply.other_config_old, g_hash_table_destroy);
|
||||||
|
|
@ -478,7 +475,7 @@ ovsdb_call_method(NMOvsdb *self,
|
||||||
case OVSDB_SET_REAPPLY:
|
case OVSDB_SET_REAPPLY:
|
||||||
call->payload.set_reapply.device_type = payload->set_reapply.device_type;
|
call->payload.set_reapply.device_type = payload->set_reapply.device_type;
|
||||||
call->payload.set_reapply.ifname = g_strdup(payload->set_reapply.ifname);
|
call->payload.set_reapply.ifname = g_strdup(payload->set_reapply.ifname);
|
||||||
call->payload.set_reapply.connection_uuid = g_strdup(payload->set_reapply.connection_uuid);
|
call->payload.set_reapply.connection = payload->set_reapply.connection;
|
||||||
call->payload.set_reapply.external_ids_old =
|
call->payload.set_reapply.external_ids_old =
|
||||||
nm_g_hash_table_ref(payload->set_reapply.external_ids_old);
|
nm_g_hash_table_ref(payload->set_reapply.external_ids_old);
|
||||||
call->payload.set_reapply.external_ids_new =
|
call->payload.set_reapply.external_ids_new =
|
||||||
|
|
@ -488,8 +485,8 @@ ovsdb_call_method(NMOvsdb *self,
|
||||||
call->payload.set_reapply.other_config_new =
|
call->payload.set_reapply.other_config_new =
|
||||||
nm_g_hash_table_ref(payload->set_reapply.other_config_new);
|
nm_g_hash_table_ref(payload->set_reapply.other_config_new);
|
||||||
_LOGT_call(call,
|
_LOGT_call(call,
|
||||||
"new: set external-ids/other-config con-uuid=%s, interface=%s",
|
"new: reapply con-uuid=%s, interface=%s",
|
||||||
call->payload.set_reapply.connection_uuid,
|
nm_connection_get_uuid(payload->set_reapply.connection),
|
||||||
call->payload.set_reapply.ifname);
|
call->payload.set_reapply.ifname);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -907,11 +904,13 @@ _insert_interface(json_t *params,
|
||||||
guint32 n_rxq;
|
guint32 n_rxq;
|
||||||
guint32 n_rxq_desc;
|
guint32 n_rxq_desc;
|
||||||
guint32 n_txq_desc;
|
guint32 n_txq_desc;
|
||||||
|
NMSettingOvsDpdkLscInterrupt lsc_int;
|
||||||
|
|
||||||
devargs = nm_setting_ovs_dpdk_get_devargs(s_ovs_dpdk);
|
devargs = nm_setting_ovs_dpdk_get_devargs(s_ovs_dpdk);
|
||||||
n_rxq = nm_setting_ovs_dpdk_get_n_rxq(s_ovs_dpdk);
|
n_rxq = nm_setting_ovs_dpdk_get_n_rxq(s_ovs_dpdk);
|
||||||
n_rxq_desc = nm_setting_ovs_dpdk_get_n_rxq_desc(s_ovs_dpdk);
|
n_rxq_desc = nm_setting_ovs_dpdk_get_n_rxq_desc(s_ovs_dpdk);
|
||||||
n_txq_desc = nm_setting_ovs_dpdk_get_n_txq_desc(s_ovs_dpdk);
|
n_txq_desc = nm_setting_ovs_dpdk_get_n_txq_desc(s_ovs_dpdk);
|
||||||
|
lsc_int = nm_setting_ovs_dpdk_get_lsc_interrupt(s_ovs_dpdk);
|
||||||
|
|
||||||
dpdk_array = json_array();
|
dpdk_array = json_array();
|
||||||
|
|
||||||
|
|
@ -933,6 +932,17 @@ _insert_interface(json_t *params,
|
||||||
json_pack("[s,s]", "n_txq_desc", nm_sprintf_buf(sbuf, "%u", n_txq_desc)));
|
json_pack("[s,s]", "n_txq_desc", nm_sprintf_buf(sbuf, "%u", n_txq_desc)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (lsc_int) {
|
||||||
|
case NM_SETTING_OVS_DPDK_LSC_INTERRUPT_IGNORE:
|
||||||
|
break;
|
||||||
|
case NM_SETTING_OVS_DPDK_LSC_INTERRUPT_ENABLED:
|
||||||
|
json_array_append_new(dpdk_array, json_pack("[s,s]", "dpdk-lsc-interrupt", "true"));
|
||||||
|
break;
|
||||||
|
case NM_SETTING_OVS_DPDK_LSC_INTERRUPT_DISABLED:
|
||||||
|
json_array_append_new(dpdk_array, json_pack("[s,s]", "dpdk-lsc-interrupt", "false"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
json_array_append_new(options, dpdk_array);
|
json_array_append_new(options, dpdk_array);
|
||||||
|
|
||||||
} else if (s_ovs_patch) {
|
} else if (s_ovs_patch) {
|
||||||
|
|
@ -976,65 +986,79 @@ _insert_interface(json_t *params,
|
||||||
"rowInterface"));
|
"rowInterface"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* _insert_port:
|
|
||||||
*
|
|
||||||
* Returns an commands that adds new port from a given connection.
|
|
||||||
*/
|
|
||||||
static void
|
static void
|
||||||
_insert_port(json_t *params, NMConnection *port, json_t *new_interfaces)
|
ovsdb_row_set_string_or_null(json_t *row, const char *key, const char *str)
|
||||||
|
{
|
||||||
|
/* ovsdb represents a NULL string (no value) as an empty set */
|
||||||
|
if (str) {
|
||||||
|
json_object_set_new(row, key, json_string(str));
|
||||||
|
} else {
|
||||||
|
json_object_set_new(row, key, json_pack("[s, []]", "set"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static json_t *
|
||||||
|
create_port_row_object(NMConnection *connection)
|
||||||
{
|
{
|
||||||
NMSettingOvsPort *s_ovs_port;
|
NMSettingOvsPort *s_ovs_port;
|
||||||
const char *vlan_mode = NULL;
|
|
||||||
json_t *trunks = NULL;
|
|
||||||
guint tag = 0;
|
|
||||||
const char *lacp = NULL;
|
|
||||||
const char *bond_mode = NULL;
|
|
||||||
guint bond_updelay = 0;
|
|
||||||
guint bond_downdelay = 0;
|
|
||||||
json_t *row;
|
json_t *row;
|
||||||
|
const char *s;
|
||||||
|
guint u;
|
||||||
|
|
||||||
s_ovs_port = nm_connection_get_setting_ovs_port(port);
|
s_ovs_port = nm_connection_get_setting_ovs_port(connection);
|
||||||
|
nm_assert(s_ovs_port);
|
||||||
|
|
||||||
row = json_object();
|
row = json_object();
|
||||||
|
|
||||||
if (s_ovs_port) {
|
s = nm_setting_ovs_port_get_vlan_mode(s_ovs_port);
|
||||||
|
ovsdb_row_set_string_or_null(row, "vlan_mode", s);
|
||||||
|
|
||||||
|
u = nm_setting_ovs_port_get_tag(s_ovs_port);
|
||||||
|
json_object_set_new(row, "tag", u != 0 ? json_integer(u) : json_pack("[s, []]", "set"));
|
||||||
|
|
||||||
|
u = nm_setting_ovs_port_get_bond_updelay(s_ovs_port);
|
||||||
|
json_object_set_new(row, "bond_updelay", json_integer(u));
|
||||||
|
|
||||||
|
u = nm_setting_ovs_port_get_bond_downdelay(s_ovs_port);
|
||||||
|
json_object_set_new(row, "bond_downdelay", json_integer(u));
|
||||||
|
|
||||||
|
s = nm_setting_ovs_port_get_lacp(s_ovs_port);
|
||||||
|
ovsdb_row_set_string_or_null(row, "lacp", s);
|
||||||
|
|
||||||
|
s = nm_setting_ovs_port_get_bond_mode(s_ovs_port);
|
||||||
|
ovsdb_row_set_string_or_null(row, "bond_mode", s);
|
||||||
|
|
||||||
|
{
|
||||||
const GPtrArray *ranges;
|
const GPtrArray *ranges;
|
||||||
guint i;
|
json_t *trunks = json_array();
|
||||||
guint64 start;
|
guint64 start;
|
||||||
guint64 end;
|
guint64 end;
|
||||||
|
guint i;
|
||||||
vlan_mode = nm_setting_ovs_port_get_vlan_mode(s_ovs_port);
|
|
||||||
tag = nm_setting_ovs_port_get_tag(s_ovs_port);
|
|
||||||
lacp = nm_setting_ovs_port_get_lacp(s_ovs_port);
|
|
||||||
bond_mode = nm_setting_ovs_port_get_bond_mode(s_ovs_port);
|
|
||||||
bond_updelay = nm_setting_ovs_port_get_bond_updelay(s_ovs_port);
|
|
||||||
bond_downdelay = nm_setting_ovs_port_get_bond_downdelay(s_ovs_port);
|
|
||||||
|
|
||||||
ranges = _nm_setting_ovs_port_get_trunks_arr(s_ovs_port);
|
ranges = _nm_setting_ovs_port_get_trunks_arr(s_ovs_port);
|
||||||
for (i = 0; i < ranges->len; i++) {
|
for (i = 0; i < ranges->len; i++) {
|
||||||
if (!trunks)
|
|
||||||
trunks = json_array();
|
|
||||||
nm_range_get_range(ranges->pdata[i], &start, &end);
|
nm_range_get_range(ranges->pdata[i], &start, &end);
|
||||||
for (; start <= end; start++)
|
for (; start <= end; start++)
|
||||||
json_array_append_new(trunks, json_integer(start));
|
json_array_append_new(trunks, json_integer(start));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
json_object_set_new(row, "trunks", json_pack("[s, o]", "set", trunks));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vlan_mode)
|
return row;
|
||||||
json_object_set_new(row, "vlan_mode", json_string(vlan_mode));
|
}
|
||||||
if (tag)
|
|
||||||
json_object_set_new(row, "tag", json_integer(tag));
|
/**
|
||||||
if (trunks)
|
* _insert_port:
|
||||||
json_object_set_new(row, "trunks", json_pack("[s, o]", "set", trunks));
|
*
|
||||||
if (lacp)
|
* Returns a command that adds new port from a given connection.
|
||||||
json_object_set_new(row, "lacp", json_string(lacp));
|
*/
|
||||||
if (bond_mode)
|
static void
|
||||||
json_object_set_new(row, "bond_mode", json_string(bond_mode));
|
_insert_port(json_t *params, NMConnection *port, json_t *new_interfaces)
|
||||||
if (bond_updelay)
|
{
|
||||||
json_object_set_new(row, "bond_updelay", json_integer(bond_updelay));
|
json_t *row;
|
||||||
if (bond_downdelay)
|
|
||||||
json_object_set_new(row, "bond_downdelay", json_integer(bond_downdelay));
|
row = create_port_row_object(port);
|
||||||
|
|
||||||
json_object_set_new(row, "name", json_string(nm_connection_get_interface_name(port)));
|
json_object_set_new(row, "name", json_string(nm_connection_get_interface_name(port)));
|
||||||
json_object_set_new(row, "interfaces", json_pack("[s, O]", "set", new_interfaces));
|
json_object_set_new(row, "interfaces", json_pack("[s, O]", "set", new_interfaces));
|
||||||
|
|
@ -1058,10 +1082,50 @@ _insert_port(json_t *params, NMConnection *port, json_t *new_interfaces)
|
||||||
"rowPort"));
|
"rowPort"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static json_t *
|
||||||
|
create_bridge_row_object(NMConnection *connection, gboolean is_reapply)
|
||||||
|
{
|
||||||
|
NMSettingOvsBridge *s_ovs_bridge;
|
||||||
|
json_t *row;
|
||||||
|
gboolean b;
|
||||||
|
const char *s;
|
||||||
|
|
||||||
|
s_ovs_bridge = nm_connection_get_setting_ovs_bridge(connection);
|
||||||
|
nm_assert(s_ovs_bridge);
|
||||||
|
|
||||||
|
row = json_object();
|
||||||
|
|
||||||
|
b = nm_setting_ovs_bridge_get_mcast_snooping_enable(s_ovs_bridge);
|
||||||
|
json_object_set_new(row, "mcast_snooping_enable", json_boolean(b));
|
||||||
|
|
||||||
|
b = nm_setting_ovs_bridge_get_rstp_enable(s_ovs_bridge);
|
||||||
|
json_object_set_new(row, "rstp_enable", json_boolean(b));
|
||||||
|
|
||||||
|
b = nm_setting_ovs_bridge_get_stp_enable(s_ovs_bridge);
|
||||||
|
json_object_set_new(row, "stp_enable", json_boolean(b));
|
||||||
|
|
||||||
|
s = nm_setting_ovs_bridge_get_fail_mode(s_ovs_bridge);
|
||||||
|
ovsdb_row_set_string_or_null(row, "fail_mode", s);
|
||||||
|
|
||||||
|
if (!is_reapply) {
|
||||||
|
/* The datapath type can't be reapplied because after changing it,
|
||||||
|
* ovs removes the existing ovs-interface and creates a tun one (or
|
||||||
|
* vice-versa). */
|
||||||
|
s = nm_setting_ovs_bridge_get_datapath_type(s_ovs_bridge);
|
||||||
|
if (s) {
|
||||||
|
/* Cannot use ovsdb_row_set_string_or_null() here as the column
|
||||||
|
* is a set and must not be empty. */
|
||||||
|
json_object_set_new(row, "datapath_type", json_string(s));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* _insert_bridge:
|
* _insert_bridge:
|
||||||
*
|
*
|
||||||
* Returns an commands that adds new bridge from a given connection.
|
* Returns a command that adds new bridge from a given connection.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_insert_bridge(json_t *params,
|
_insert_bridge(json_t *params,
|
||||||
|
|
@ -1070,36 +1134,9 @@ _insert_bridge(json_t *params,
|
||||||
json_t *new_ports,
|
json_t *new_ports,
|
||||||
const char *cloned_mac)
|
const char *cloned_mac)
|
||||||
{
|
{
|
||||||
NMSettingOvsBridge *s_ovs_bridge;
|
|
||||||
const char *fail_mode = NULL;
|
|
||||||
gboolean mcast_snooping_enable = FALSE;
|
|
||||||
gboolean rstp_enable = FALSE;
|
|
||||||
gboolean stp_enable = FALSE;
|
|
||||||
const char *datapath_type = NULL;
|
|
||||||
json_t *row;
|
json_t *row;
|
||||||
|
|
||||||
s_ovs_bridge = nm_connection_get_setting_ovs_bridge(bridge);
|
row = create_bridge_row_object(bridge, FALSE);
|
||||||
|
|
||||||
row = json_object();
|
|
||||||
|
|
||||||
if (s_ovs_bridge) {
|
|
||||||
fail_mode = nm_setting_ovs_bridge_get_fail_mode(s_ovs_bridge);
|
|
||||||
mcast_snooping_enable = nm_setting_ovs_bridge_get_mcast_snooping_enable(s_ovs_bridge);
|
|
||||||
rstp_enable = nm_setting_ovs_bridge_get_rstp_enable(s_ovs_bridge);
|
|
||||||
stp_enable = nm_setting_ovs_bridge_get_stp_enable(s_ovs_bridge);
|
|
||||||
datapath_type = nm_setting_ovs_bridge_get_datapath_type(s_ovs_bridge);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fail_mode)
|
|
||||||
json_object_set_new(row, "fail_mode", json_string(fail_mode));
|
|
||||||
if (mcast_snooping_enable)
|
|
||||||
json_object_set_new(row, "mcast_snooping_enable", json_boolean(mcast_snooping_enable));
|
|
||||||
if (rstp_enable)
|
|
||||||
json_object_set_new(row, "rstp_enable", json_boolean(rstp_enable));
|
|
||||||
if (stp_enable)
|
|
||||||
json_object_set_new(row, "stp_enable", json_boolean(stp_enable));
|
|
||||||
if (datapath_type)
|
|
||||||
json_object_set_new(row, "datapath_type", json_string(datapath_type));
|
|
||||||
|
|
||||||
json_object_set_new(row, "name", json_string(nm_connection_get_interface_name(bridge)));
|
json_object_set_new(row, "name", json_string(nm_connection_get_interface_name(bridge)));
|
||||||
json_object_set_new(row, "ports", json_pack("[s, O]", "set", new_ports));
|
json_object_set_new(row, "ports", json_pack("[s, O]", "set", new_ports));
|
||||||
|
|
@ -1350,88 +1387,115 @@ _delete_interface(NMOvsdb *self, json_t *params, const char *ifname)
|
||||||
nm_auto_decref_json json_t *bridges = NULL;
|
nm_auto_decref_json json_t *bridges = NULL;
|
||||||
nm_auto_decref_json json_t *new_bridges = NULL;
|
nm_auto_decref_json json_t *new_bridges = NULL;
|
||||||
gboolean bridges_changed;
|
gboolean bridges_changed;
|
||||||
gboolean ports_changed;
|
|
||||||
gboolean interfaces_changed;
|
|
||||||
int pi;
|
|
||||||
int ii;
|
|
||||||
|
|
||||||
bridges = json_array();
|
bridges = json_array();
|
||||||
new_bridges = json_array();
|
new_bridges = json_array();
|
||||||
bridges_changed = FALSE;
|
bridges_changed = FALSE;
|
||||||
|
|
||||||
|
/* Loop over all bridges */
|
||||||
g_hash_table_iter_init(&iter, priv->bridges);
|
g_hash_table_iter_init(&iter, priv->bridges);
|
||||||
while (g_hash_table_iter_next(&iter, (gpointer) &ovs_bridge, NULL)) {
|
while (g_hash_table_iter_next(&iter, (gpointer) &ovs_bridge, NULL)) {
|
||||||
nm_auto_decref_json json_t *ports = NULL;
|
nm_auto_decref_json json_t *ports = NULL;
|
||||||
nm_auto_decref_json json_t *new_ports = NULL;
|
nm_auto_decref_json json_t *new_ports = NULL;
|
||||||
|
guint num_nm_ports = 0;
|
||||||
|
gboolean ports_changed = FALSE;
|
||||||
|
int pi;
|
||||||
|
|
||||||
ports = json_array();
|
ports = json_array();
|
||||||
new_ports = json_array();
|
new_ports = json_array();
|
||||||
ports_changed = FALSE;
|
|
||||||
|
|
||||||
|
/* Add the bridge UUID to the list of known bridges for the "expect" condition */
|
||||||
json_array_append_new(bridges, json_pack("[s,s]", "uuid", ovs_bridge->bridge_uuid));
|
json_array_append_new(bridges, json_pack("[s,s]", "uuid", ovs_bridge->bridge_uuid));
|
||||||
|
|
||||||
|
if (!ovs_bridge->connection_uuid) {
|
||||||
|
/* Externally created, don't touch it */
|
||||||
|
json_array_append_new(new_bridges, json_pack("[s,s]", "uuid", ovs_bridge->bridge_uuid));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Loop over all bridge's ports */
|
||||||
for (pi = 0; pi < ovs_bridge->ports->len; pi++) {
|
for (pi = 0; pi < ovs_bridge->ports->len; pi++) {
|
||||||
nm_auto_decref_json json_t *interfaces = NULL;
|
nm_auto_decref_json json_t *interfaces = NULL;
|
||||||
nm_auto_decref_json json_t *new_interfaces = NULL;
|
nm_auto_decref_json json_t *new_interfaces = NULL;
|
||||||
|
guint num_nm_interfaces = 0;
|
||||||
|
gboolean interfaces_changed = FALSE;
|
||||||
|
int ii;
|
||||||
|
|
||||||
interfaces = json_array();
|
interfaces = json_array();
|
||||||
new_interfaces = json_array();
|
new_interfaces = json_array();
|
||||||
port_uuid = g_ptr_array_index(ovs_bridge->ports, pi);
|
port_uuid = g_ptr_array_index(ovs_bridge->ports, pi);
|
||||||
ovs_port = g_hash_table_lookup(priv->ports, &port_uuid);
|
ovs_port = g_hash_table_lookup(priv->ports, &port_uuid);
|
||||||
|
|
||||||
|
/* Add the port UUID to the list of known bridge port for the "expect" condition */
|
||||||
json_array_append_new(ports, json_pack("[s,s]", "uuid", port_uuid));
|
json_array_append_new(ports, json_pack("[s,s]", "uuid", port_uuid));
|
||||||
|
|
||||||
interfaces_changed = FALSE;
|
|
||||||
|
|
||||||
if (!ovs_port) {
|
if (!ovs_port) {
|
||||||
/* This would be a violation of ovsdb's reference integrity (a bug). */
|
/* This would be a violation of ovsdb's reference integrity (a bug). */
|
||||||
_LOGW("Unknown port '%s' in bridge '%s'", port_uuid, ovs_bridge->bridge_uuid);
|
_LOGW("Unknown port '%s' in bridge '%s'", port_uuid, ovs_bridge->bridge_uuid);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Loop over all port's interfaces */
|
||||||
for (ii = 0; ii < ovs_port->interfaces->len; ii++) {
|
for (ii = 0; ii < ovs_port->interfaces->len; ii++) {
|
||||||
interface_uuid = g_ptr_array_index(ovs_port->interfaces, ii);
|
interface_uuid = g_ptr_array_index(ovs_port->interfaces, ii);
|
||||||
ovs_interface = g_hash_table_lookup(priv->interfaces, &interface_uuid);
|
ovs_interface = g_hash_table_lookup(priv->interfaces, &interface_uuid);
|
||||||
|
|
||||||
|
/* Add the interface UUID to the list of known port interfaces for the "expect" condition */
|
||||||
json_array_append_new(interfaces, json_pack("[s,s]", "uuid", interface_uuid));
|
json_array_append_new(interfaces, json_pack("[s,s]", "uuid", interface_uuid));
|
||||||
|
|
||||||
if (ovs_interface) {
|
if (ovs_interface) {
|
||||||
if (nm_streq(ovs_interface->name, ifname)) {
|
if (nm_streq(ovs_interface->name, ifname)) {
|
||||||
/* skip the interface */
|
/* We are deleting this interface, don't count it */
|
||||||
interfaces_changed = TRUE;
|
interfaces_changed = TRUE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (ovs_interface->connection_uuid)
|
||||||
|
num_nm_interfaces++;
|
||||||
} else {
|
} else {
|
||||||
/* This would be a violation of ovsdb's reference integrity (a bug). */
|
/* This would be a violation of ovsdb's reference integrity (a bug). */
|
||||||
_LOGW("Unknown interface '%s' in port '%s'", interface_uuid, port_uuid);
|
_LOGW("Unknown interface '%s' in port '%s'", interface_uuid, port_uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Add the interface to the list of new interfaces to set on the port */
|
||||||
json_array_append_new(new_interfaces, json_pack("[s,s]", "uuid", interface_uuid));
|
json_array_append_new(new_interfaces, json_pack("[s,s]", "uuid", interface_uuid));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (json_array_size(new_interfaces) == 0) {
|
if (interfaces_changed && num_nm_interfaces == 0) {
|
||||||
|
/* We are deleting the last nm-interface of this port. Don't add it to "new_ports"
|
||||||
|
* and set ports_changed=TRUE, so that it will be deleted. */
|
||||||
ports_changed = TRUE;
|
ports_changed = TRUE;
|
||||||
} else {
|
} else {
|
||||||
|
/* Keep this port: it's still alive, or it's unrelated to the deleted interface */
|
||||||
|
json_array_append_new(new_ports, json_pack("[s,s]", "uuid", port_uuid));
|
||||||
|
if (ovs_port->connection_uuid)
|
||||||
|
num_nm_ports++;
|
||||||
|
|
||||||
if (interfaces_changed) {
|
if (interfaces_changed) {
|
||||||
|
/* This port is still alive, but an interface needs to be deleted from it */
|
||||||
_expect_port_interfaces(params, ovs_port->name, interfaces);
|
_expect_port_interfaces(params, ovs_port->name, interfaces);
|
||||||
_set_port_interfaces(params, ovs_port->name, new_interfaces);
|
_set_port_interfaces(params, ovs_port->name, new_interfaces);
|
||||||
}
|
}
|
||||||
json_array_append_new(new_ports, json_pack("[s,s]", "uuid", port_uuid));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (json_array_size(new_ports) == 0) {
|
if (ports_changed && num_nm_ports == 0) {
|
||||||
|
/* We are deleting the last nm-port of this bridge. Don't add it to "new_bridges"
|
||||||
|
* and set bridges_changed=TRUE, so that it will be deleted. */
|
||||||
bridges_changed = TRUE;
|
bridges_changed = TRUE;
|
||||||
} else {
|
} else {
|
||||||
|
/* Keep this bridge: it's still alive, or it's unrelated to the deleted interface */
|
||||||
|
json_array_append_new(new_bridges, json_pack("[s,s]", "uuid", ovs_bridge->bridge_uuid));
|
||||||
|
|
||||||
if (ports_changed) {
|
if (ports_changed) {
|
||||||
|
/* This bridge is still alive, but a port needs to be deleted from it */
|
||||||
_expect_bridge_ports(params, ovs_bridge->name, ports);
|
_expect_bridge_ports(params, ovs_bridge->name, ports);
|
||||||
_set_bridge_ports(params, ovs_bridge->name, new_ports);
|
_set_bridge_ports(params, ovs_bridge->name, new_ports);
|
||||||
}
|
}
|
||||||
json_array_append_new(new_bridges, json_pack("[s,s]", "uuid", ovs_bridge->bridge_uuid));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bridges_changed) {
|
if (bridges_changed) {
|
||||||
|
/* A bridge needs to be deleted */
|
||||||
_expect_ovs_bridges(params, priv->db_uuid, bridges);
|
_expect_ovs_bridges(params, priv->db_uuid, bridges);
|
||||||
_set_ovs_bridges(params, priv->db_uuid, new_bridges);
|
_set_ovs_bridges(params, priv->db_uuid, new_bridges);
|
||||||
}
|
}
|
||||||
|
|
@ -1541,13 +1605,47 @@ ovsdb_next_command(NMOvsdb *self)
|
||||||
break;
|
break;
|
||||||
case OVSDB_SET_REAPPLY:
|
case OVSDB_SET_REAPPLY:
|
||||||
{
|
{
|
||||||
|
NMConnection *connection;
|
||||||
json_t *mutations;
|
json_t *mutations;
|
||||||
|
json_t *row;
|
||||||
|
const char *table;
|
||||||
|
|
||||||
|
connection = call->payload.set_reapply.connection;
|
||||||
|
table = _device_type_to_table(call->payload.set_reapply.device_type);
|
||||||
|
|
||||||
|
/* Reapply device properties */
|
||||||
|
switch (call->payload.set_reapply.device_type) {
|
||||||
|
case NM_DEVICE_TYPE_OVS_BRIDGE:
|
||||||
|
row = create_bridge_row_object(connection, TRUE);
|
||||||
|
break;
|
||||||
|
case NM_DEVICE_TYPE_OVS_PORT:
|
||||||
|
row = create_port_row_object(connection);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
row = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (row) {
|
||||||
|
json_array_append_new(params,
|
||||||
|
json_pack("{s:s, s:s, s:o, s:[[s, s, s]]}",
|
||||||
|
"op",
|
||||||
|
"update",
|
||||||
|
"table",
|
||||||
|
table,
|
||||||
|
"row",
|
||||||
|
row,
|
||||||
|
"where",
|
||||||
|
"name",
|
||||||
|
"==",
|
||||||
|
call->payload.set_reapply.ifname));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reapply external-ids and other-config */
|
||||||
mutations = json_array();
|
mutations = json_array();
|
||||||
|
|
||||||
_j_create_strv_array_update(mutations,
|
_j_create_strv_array_update(mutations,
|
||||||
STRDICT_TYPE_EXTERNAL_IDS,
|
STRDICT_TYPE_EXTERNAL_IDS,
|
||||||
call->payload.set_reapply.connection_uuid,
|
nm_connection_get_uuid(connection),
|
||||||
call->payload.set_reapply.external_ids_old,
|
call->payload.set_reapply.external_ids_old,
|
||||||
call->payload.set_reapply.external_ids_new);
|
call->payload.set_reapply.external_ids_new);
|
||||||
_j_create_strv_array_update(mutations,
|
_j_create_strv_array_update(mutations,
|
||||||
|
|
@ -1556,13 +1654,12 @@ ovsdb_next_command(NMOvsdb *self)
|
||||||
call->payload.set_reapply.other_config_old,
|
call->payload.set_reapply.other_config_old,
|
||||||
call->payload.set_reapply.other_config_new);
|
call->payload.set_reapply.other_config_new);
|
||||||
|
|
||||||
json_array_append_new(
|
json_array_append_new(params,
|
||||||
params,
|
|
||||||
json_pack("{s:s, s:s, s:o, s:[[s, s, s]]}",
|
json_pack("{s:s, s:s, s:o, s:[[s, s, s]]}",
|
||||||
"op",
|
"op",
|
||||||
"mutate",
|
"mutate",
|
||||||
"table",
|
"table",
|
||||||
_device_type_to_table(call->payload.set_reapply.device_type),
|
table,
|
||||||
"mutations",
|
"mutations",
|
||||||
mutations,
|
mutations,
|
||||||
"where",
|
"where",
|
||||||
|
|
@ -1793,7 +1890,7 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
|
||||||
== -1) {
|
== -1) {
|
||||||
/* This doesn't really have to be an error; the key might
|
/* This doesn't really have to be an error; the key might
|
||||||
* be missing if there really are no bridges present. */
|
* be missing if there really are no bridges present. */
|
||||||
_LOGD("Bad update: %s", json_error.text);
|
_LOGD("monitor: bad update: %s", json_error.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ovs) {
|
if (ovs) {
|
||||||
|
|
@ -1839,12 +1936,12 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
|
||||||
&unused))
|
&unused))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_LOGT("obj[iface:%s]: removed an '%s' interface: %s%s%s",
|
_LOGT("monitor: %s: interface removed: type=%s, obj[iface:%s]%s%s",
|
||||||
key,
|
|
||||||
ovs_interface->type,
|
|
||||||
ovs_interface->name,
|
ovs_interface->name,
|
||||||
|
ovs_interface->type,
|
||||||
|
key,
|
||||||
NM_PRINT_FMT_QUOTED2(ovs_interface->connection_uuid,
|
NM_PRINT_FMT_QUOTED2(ovs_interface->connection_uuid,
|
||||||
", ",
|
", connection=",
|
||||||
ovs_interface->connection_uuid,
|
ovs_interface->connection_uuid,
|
||||||
""));
|
""));
|
||||||
_signal_emit_device_removed(self,
|
_signal_emit_device_removed(self,
|
||||||
|
|
@ -1892,13 +1989,14 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
|
||||||
gs_free char *strtmp1 = NULL;
|
gs_free char *strtmp1 = NULL;
|
||||||
gs_free char *strtmp2 = NULL;
|
gs_free char *strtmp2 = NULL;
|
||||||
|
|
||||||
_LOGT("obj[iface:%s]: changed an '%s' interface: %s%s%s, external-ids=%s, "
|
_LOGT(
|
||||||
|
"monitor: %s: interface changed: type=%s, obj[iface:%s]%s%s, external-ids=%s, "
|
||||||
"other-config=%s",
|
"other-config=%s",
|
||||||
key,
|
|
||||||
type,
|
|
||||||
ovs_interface->name,
|
ovs_interface->name,
|
||||||
|
type,
|
||||||
|
key,
|
||||||
NM_PRINT_FMT_QUOTED2(ovs_interface->connection_uuid,
|
NM_PRINT_FMT_QUOTED2(ovs_interface->connection_uuid,
|
||||||
", ",
|
", connection=",
|
||||||
ovs_interface->connection_uuid,
|
ovs_interface->connection_uuid,
|
||||||
""),
|
""),
|
||||||
(strtmp1 = _strdict_to_string(ovs_interface->external_ids)),
|
(strtmp1 = _strdict_to_string(ovs_interface->external_ids)),
|
||||||
|
|
@ -1918,13 +2016,13 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
|
||||||
.other_config = g_steal_pointer(&other_config_arr),
|
.other_config = g_steal_pointer(&other_config_arr),
|
||||||
};
|
};
|
||||||
g_hash_table_add(priv->interfaces, ovs_interface);
|
g_hash_table_add(priv->interfaces, ovs_interface);
|
||||||
_LOGT(
|
_LOGT("monitor: %s: interface added: type=%s, obj[iface:%s]%s%s, external-ids=%s, "
|
||||||
"obj[iface:%s]: added an '%s' interface: %s%s%s, external-ids=%s, other-config=%s",
|
"other-config=%s",
|
||||||
key,
|
|
||||||
ovs_interface->type,
|
|
||||||
ovs_interface->name,
|
ovs_interface->name,
|
||||||
|
ovs_interface->type,
|
||||||
|
key,
|
||||||
NM_PRINT_FMT_QUOTED2(ovs_interface->connection_uuid,
|
NM_PRINT_FMT_QUOTED2(ovs_interface->connection_uuid,
|
||||||
", ",
|
", connection=",
|
||||||
ovs_interface->connection_uuid,
|
ovs_interface->connection_uuid,
|
||||||
""),
|
""),
|
||||||
(strtmp1 = _strdict_to_string(ovs_interface->external_ids)),
|
(strtmp1 = _strdict_to_string(ovs_interface->external_ids)),
|
||||||
|
|
@ -1974,11 +2072,11 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
|
||||||
if (!g_hash_table_steal_extended(priv->ports, &key, (gpointer *) &ovs_port, &unused))
|
if (!g_hash_table_steal_extended(priv->ports, &key, (gpointer *) &ovs_port, &unused))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_LOGT("obj[port:%s]: removed a port: %s%s%s",
|
_LOGT("monitor: %s: port removed: obj[port:%s]%s%s",
|
||||||
key,
|
|
||||||
ovs_port->name,
|
ovs_port->name,
|
||||||
|
key,
|
||||||
NM_PRINT_FMT_QUOTED2(ovs_port->connection_uuid,
|
NM_PRINT_FMT_QUOTED2(ovs_port->connection_uuid,
|
||||||
", ",
|
", connection=",
|
||||||
ovs_port->connection_uuid,
|
ovs_port->connection_uuid,
|
||||||
""));
|
""));
|
||||||
_signal_emit_device_removed(self, ovs_port->name, NM_DEVICE_TYPE_OVS_PORT, NULL);
|
_signal_emit_device_removed(self, ovs_port->name, NM_DEVICE_TYPE_OVS_PORT, NULL);
|
||||||
|
|
@ -2025,11 +2123,12 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
|
||||||
gs_free char *strtmp1 = NULL;
|
gs_free char *strtmp1 = NULL;
|
||||||
gs_free char *strtmp2 = NULL;
|
gs_free char *strtmp2 = NULL;
|
||||||
|
|
||||||
_LOGT("obj[port:%s]: changed a port: %s%s%s, external-ids=%s, other-config=%s",
|
_LOGT(
|
||||||
key,
|
"monitor: %s: port changed: obj[port:%s]%s%s, external-ids=%s, other-config=%s",
|
||||||
ovs_port->name,
|
ovs_port->name,
|
||||||
|
key,
|
||||||
NM_PRINT_FMT_QUOTED2(ovs_port->connection_uuid,
|
NM_PRINT_FMT_QUOTED2(ovs_port->connection_uuid,
|
||||||
", ",
|
", connection=",
|
||||||
ovs_port->connection_uuid,
|
ovs_port->connection_uuid,
|
||||||
""),
|
""),
|
||||||
(strtmp1 = _strdict_to_string(ovs_port->external_ids)),
|
(strtmp1 = _strdict_to_string(ovs_port->external_ids)),
|
||||||
|
|
@ -2049,11 +2148,11 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
|
||||||
.other_config = g_steal_pointer(&other_config_arr),
|
.other_config = g_steal_pointer(&other_config_arr),
|
||||||
};
|
};
|
||||||
g_hash_table_add(priv->ports, ovs_port);
|
g_hash_table_add(priv->ports, ovs_port);
|
||||||
_LOGT("obj[port:%s]: added a port: %s%s%s, external-ids=%s, other-config=%s",
|
_LOGT("monitor: %s: port added: obj[port:%s]%s%s, external-ids=%s, other-config=%s",
|
||||||
key,
|
|
||||||
ovs_port->name,
|
ovs_port->name,
|
||||||
|
key,
|
||||||
NM_PRINT_FMT_QUOTED2(ovs_port->connection_uuid,
|
NM_PRINT_FMT_QUOTED2(ovs_port->connection_uuid,
|
||||||
", ",
|
", connection=",
|
||||||
ovs_port->connection_uuid,
|
ovs_port->connection_uuid,
|
||||||
""),
|
""),
|
||||||
(strtmp1 = _strdict_to_string(ovs_port->external_ids)),
|
(strtmp1 = _strdict_to_string(ovs_port->external_ids)),
|
||||||
|
|
@ -2095,11 +2194,11 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
|
||||||
&unused))
|
&unused))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_LOGT("obj[bridge:%s]: removed a bridge: %s%s%s",
|
_LOGT("monitor: %s: bridge removed: obj[bridge:%s]%s%s",
|
||||||
key,
|
|
||||||
ovs_bridge->name,
|
ovs_bridge->name,
|
||||||
|
key,
|
||||||
NM_PRINT_FMT_QUOTED2(ovs_bridge->connection_uuid,
|
NM_PRINT_FMT_QUOTED2(ovs_bridge->connection_uuid,
|
||||||
", ",
|
", connection=",
|
||||||
ovs_bridge->connection_uuid,
|
ovs_bridge->connection_uuid,
|
||||||
""));
|
""));
|
||||||
_signal_emit_device_removed(self, ovs_bridge->name, NM_DEVICE_TYPE_OVS_BRIDGE, NULL);
|
_signal_emit_device_removed(self, ovs_bridge->name, NM_DEVICE_TYPE_OVS_BRIDGE, NULL);
|
||||||
|
|
@ -2146,15 +2245,16 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
|
||||||
gs_free char *strtmp1 = NULL;
|
gs_free char *strtmp1 = NULL;
|
||||||
gs_free char *strtmp2 = NULL;
|
gs_free char *strtmp2 = NULL;
|
||||||
|
|
||||||
_LOGT("obj[bridge:%s]: changed a bridge: %s%s%s, external-ids=%s, other-config=%s",
|
_LOGT("monitor: %s: bridge changed: obj[bridge:%s]%s%s, external-ids=%s, "
|
||||||
key,
|
"other-config=%s",
|
||||||
ovs_bridge->name,
|
ovs_bridge->name,
|
||||||
|
key,
|
||||||
NM_PRINT_FMT_QUOTED2(ovs_bridge->connection_uuid,
|
NM_PRINT_FMT_QUOTED2(ovs_bridge->connection_uuid,
|
||||||
", ",
|
", connection=",
|
||||||
ovs_bridge->connection_uuid,
|
ovs_bridge->connection_uuid,
|
||||||
""),
|
""),
|
||||||
(strtmp1 = _strdict_to_string(ovs_bridge->external_ids)),
|
(strtmp1 = _strdict_to_string(ovs_bridge->external_ids)),
|
||||||
(strtmp2 = _strdict_to_string(ovs_bridge->external_ids)));
|
(strtmp2 = _strdict_to_string(ovs_bridge->other_config)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
gs_free char *strtmp1 = NULL;
|
gs_free char *strtmp1 = NULL;
|
||||||
|
|
@ -2170,11 +2270,11 @@ ovsdb_got_update(NMOvsdb *self, json_t *msg)
|
||||||
.other_config = g_steal_pointer(&other_config_arr),
|
.other_config = g_steal_pointer(&other_config_arr),
|
||||||
};
|
};
|
||||||
g_hash_table_add(priv->bridges, ovs_bridge);
|
g_hash_table_add(priv->bridges, ovs_bridge);
|
||||||
_LOGT("obj[bridge:%s]: added a bridge: %s%s%s, external-ids=%s, other-config=%s",
|
_LOGT("monitor: %s: bridge added: obj[bridge:%s]%s%s, external-ids=%s, other-config=%s",
|
||||||
key,
|
|
||||||
ovs_bridge->name,
|
ovs_bridge->name,
|
||||||
|
key,
|
||||||
NM_PRINT_FMT_QUOTED2(ovs_bridge->connection_uuid,
|
NM_PRINT_FMT_QUOTED2(ovs_bridge->connection_uuid,
|
||||||
", ",
|
", connection=",
|
||||||
ovs_bridge->connection_uuid,
|
ovs_bridge->connection_uuid,
|
||||||
""),
|
""),
|
||||||
(strtmp1 = _strdict_to_string(ovs_bridge->external_ids)),
|
(strtmp1 = _strdict_to_string(ovs_bridge->external_ids)),
|
||||||
|
|
@ -2411,7 +2511,7 @@ again:
|
||||||
* content is broken (_json_read_msg() cannot extract any data) and
|
* content is broken (_json_read_msg() cannot extract any data) and
|
||||||
* we disconnect. */
|
* we disconnect. */
|
||||||
priv->input_timeout_source =
|
priv->input_timeout_source =
|
||||||
nm_g_timeout_add_seconds_source(5, _ovsdb_read_input_timeout_cb, NULL);
|
nm_g_timeout_add_seconds_source(5, _ovsdb_read_input_timeout_cb, self);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -2975,7 +3075,7 @@ void
|
||||||
nm_ovsdb_set_reapply(NMOvsdb *self,
|
nm_ovsdb_set_reapply(NMOvsdb *self,
|
||||||
NMDeviceType device_type,
|
NMDeviceType device_type,
|
||||||
const char *ifname,
|
const char *ifname,
|
||||||
const char *connection_uuid,
|
NMConnection *connection_take,
|
||||||
NMSettingOvsExternalIDs *s_external_ids_old,
|
NMSettingOvsExternalIDs *s_external_ids_old,
|
||||||
NMSettingOvsExternalIDs *s_external_ids_new,
|
NMSettingOvsExternalIDs *s_external_ids_new,
|
||||||
NMSettingOvsOtherConfig *s_other_config_old,
|
NMSettingOvsOtherConfig *s_other_config_old,
|
||||||
|
|
@ -2986,6 +3086,11 @@ nm_ovsdb_set_reapply(NMOvsdb *self,
|
||||||
gs_unref_hashtable GHashTable *other_config_old = NULL;
|
gs_unref_hashtable GHashTable *other_config_old = NULL;
|
||||||
gs_unref_hashtable GHashTable *other_config_new = NULL;
|
gs_unref_hashtable GHashTable *other_config_new = NULL;
|
||||||
|
|
||||||
|
nm_assert(NM_IN_SET(device_type,
|
||||||
|
NM_DEVICE_TYPE_OVS_BRIDGE,
|
||||||
|
NM_DEVICE_TYPE_OVS_PORT,
|
||||||
|
NM_DEVICE_TYPE_OVS_INTERFACE));
|
||||||
|
|
||||||
external_ids_old =
|
external_ids_old =
|
||||||
s_external_ids_old
|
s_external_ids_old
|
||||||
? nm_strdict_clone(_nm_setting_ovs_external_ids_get_data(s_external_ids_old))
|
? nm_strdict_clone(_nm_setting_ovs_external_ids_get_data(s_external_ids_old))
|
||||||
|
|
@ -3011,7 +3116,7 @@ nm_ovsdb_set_reapply(NMOvsdb *self,
|
||||||
OVSDB_SET_REAPPLY,
|
OVSDB_SET_REAPPLY,
|
||||||
OVSDB_METHOD_PAYLOAD_SET_REAPPLY(device_type,
|
OVSDB_METHOD_PAYLOAD_SET_REAPPLY(device_type,
|
||||||
ifname,
|
ifname,
|
||||||
connection_uuid,
|
connection_take,
|
||||||
external_ids_old,
|
external_ids_old,
|
||||||
external_ids_new,
|
external_ids_new,
|
||||||
other_config_old,
|
other_config_old,
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ void nm_ovsdb_set_interface_mtu(NMOvsdb *self,
|
||||||
void nm_ovsdb_set_reapply(NMOvsdb *self,
|
void nm_ovsdb_set_reapply(NMOvsdb *self,
|
||||||
NMDeviceType device_type,
|
NMDeviceType device_type,
|
||||||
const char *ifname,
|
const char *ifname,
|
||||||
const char *connection_uuid,
|
NMConnection *connection_take,
|
||||||
NMSettingOvsExternalIDs *s_external_ids_old,
|
NMSettingOvsExternalIDs *s_external_ids_old,
|
||||||
NMSettingOvsExternalIDs *s_external_ids_new,
|
NMSettingOvsExternalIDs *s_external_ids_new,
|
||||||
NMSettingOvsOtherConfig *s_other_config_old,
|
NMSettingOvsOtherConfig *s_other_config_old,
|
||||||
|
|
|
||||||
|
|
@ -191,12 +191,19 @@ static void supplicant_iface_notify_p2p_available(NMSupplicantInterface *iface,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
NMDeviceWifi *self);
|
NMDeviceWifi *self);
|
||||||
|
|
||||||
|
static void supplicant_iface_notify_wpa_psk_mismatch_cb(NMSupplicantInterface *iface,
|
||||||
|
NMDeviceWifi *self);
|
||||||
|
|
||||||
|
static void supplicant_iface_notify_wpa_sae_mismatch_cb(NMSupplicantInterface *iface,
|
||||||
|
NMDeviceWifi *self);
|
||||||
|
|
||||||
static void periodic_update(NMDeviceWifi *self);
|
static void periodic_update(NMDeviceWifi *self);
|
||||||
|
|
||||||
static void ap_add_remove(NMDeviceWifi *self,
|
static void ap_add_remove(NMDeviceWifi *self,
|
||||||
gboolean is_adding,
|
gboolean is_adding,
|
||||||
NMWifiAP *ap,
|
NMWifiAP *ap,
|
||||||
gboolean recheck_available_connections);
|
gboolean recheck_available_connections,
|
||||||
|
gboolean recheck_auto_activate);
|
||||||
|
|
||||||
static void _hw_addr_set_scanning(NMDeviceWifi *self, gboolean do_reset);
|
static void _hw_addr_set_scanning(NMDeviceWifi *self, gboolean do_reset);
|
||||||
|
|
||||||
|
|
@ -623,6 +630,14 @@ supplicant_interface_acquire_cb(NMSupplicantManager *supplicant_manager,
|
||||||
"notify::" NM_SUPPLICANT_INTERFACE_P2P_AVAILABLE,
|
"notify::" NM_SUPPLICANT_INTERFACE_P2P_AVAILABLE,
|
||||||
G_CALLBACK(supplicant_iface_notify_p2p_available),
|
G_CALLBACK(supplicant_iface_notify_p2p_available),
|
||||||
self);
|
self);
|
||||||
|
g_signal_connect(priv->sup_iface,
|
||||||
|
NM_SUPPLICANT_INTERFACE_PSK_MISMATCH,
|
||||||
|
G_CALLBACK(supplicant_iface_notify_wpa_psk_mismatch_cb),
|
||||||
|
self);
|
||||||
|
g_signal_connect(priv->sup_iface,
|
||||||
|
NM_SUPPLICANT_INTERFACE_SAE_MISMATCH,
|
||||||
|
G_CALLBACK(supplicant_iface_notify_wpa_sae_mismatch_cb),
|
||||||
|
self);
|
||||||
|
|
||||||
_scan_notify_is_scanning(self);
|
_scan_notify_is_scanning(self);
|
||||||
|
|
||||||
|
|
@ -714,7 +729,10 @@ update_seen_bssids_cache(NMDeviceWifi *self, NMWifiAP *ap)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_current_ap(NMDeviceWifi *self, NMWifiAP *new_ap, gboolean recheck_available_connections)
|
set_current_ap(NMDeviceWifi *self,
|
||||||
|
NMWifiAP *new_ap,
|
||||||
|
gboolean recheck_available_connections,
|
||||||
|
gboolean recheck_auto_activate)
|
||||||
{
|
{
|
||||||
NMDeviceWifiPrivate *priv;
|
NMDeviceWifiPrivate *priv;
|
||||||
NMWifiAP *old_ap;
|
NMWifiAP *old_ap;
|
||||||
|
|
@ -741,7 +759,11 @@ set_current_ap(NMDeviceWifi *self, NMWifiAP *new_ap, gboolean recheck_available_
|
||||||
/* Remove any AP from the internal list if it was created by NM or isn't known to the supplicant */
|
/* Remove any AP from the internal list if it was created by NM or isn't known to the supplicant */
|
||||||
if (NM_IN_SET(mode, _NM_802_11_MODE_ADHOC, _NM_802_11_MODE_AP)
|
if (NM_IN_SET(mode, _NM_802_11_MODE_ADHOC, _NM_802_11_MODE_AP)
|
||||||
|| nm_wifi_ap_get_fake(old_ap))
|
|| nm_wifi_ap_get_fake(old_ap))
|
||||||
ap_add_remove(self, FALSE, old_ap, recheck_available_connections);
|
ap_add_remove(self,
|
||||||
|
FALSE,
|
||||||
|
old_ap,
|
||||||
|
recheck_available_connections,
|
||||||
|
recheck_auto_activate);
|
||||||
g_object_unref(old_ap);
|
g_object_unref(old_ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -814,7 +836,8 @@ static void
|
||||||
ap_add_remove(NMDeviceWifi *self,
|
ap_add_remove(NMDeviceWifi *self,
|
||||||
gboolean is_adding, /* or else removing */
|
gboolean is_adding, /* or else removing */
|
||||||
NMWifiAP *ap,
|
NMWifiAP *ap,
|
||||||
gboolean recheck_available_connections)
|
gboolean recheck_available_connections,
|
||||||
|
gboolean recheck_auto_activate)
|
||||||
{
|
{
|
||||||
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE(self);
|
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE(self);
|
||||||
|
|
||||||
|
|
@ -845,13 +868,14 @@ ap_add_remove(NMDeviceWifi *self,
|
||||||
nm_dbus_object_clear_and_unexport(&ap);
|
nm_dbus_object_clear_and_unexport(&ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (recheck_auto_activate)
|
||||||
nm_device_recheck_auto_activate_schedule(NM_DEVICE(self));
|
nm_device_recheck_auto_activate_schedule(NM_DEVICE(self));
|
||||||
if (recheck_available_connections)
|
if (recheck_available_connections)
|
||||||
nm_device_recheck_available_connections(NM_DEVICE(self));
|
nm_device_recheck_available_connections(NM_DEVICE(self));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
remove_all_aps(NMDeviceWifi *self)
|
remove_all_aps(NMDeviceWifi *self, gboolean disposing)
|
||||||
{
|
{
|
||||||
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE(self);
|
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE(self);
|
||||||
NMWifiAP *ap;
|
NMWifiAP *ap;
|
||||||
|
|
@ -859,11 +883,12 @@ remove_all_aps(NMDeviceWifi *self)
|
||||||
if (c_list_is_empty(&priv->aps_lst_head))
|
if (c_list_is_empty(&priv->aps_lst_head))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
set_current_ap(self, NULL, FALSE);
|
set_current_ap(self, NULL, FALSE, !disposing);
|
||||||
|
|
||||||
while ((ap = c_list_first_entry(&priv->aps_lst_head, NMWifiAP, aps_lst)))
|
while ((ap = c_list_first_entry(&priv->aps_lst_head, NMWifiAP, aps_lst)))
|
||||||
ap_add_remove(self, FALSE, ap, FALSE);
|
ap_add_remove(self, FALSE, ap, FALSE, !disposing);
|
||||||
|
|
||||||
|
if (!disposing)
|
||||||
nm_device_recheck_available_connections(NM_DEVICE(self));
|
nm_device_recheck_available_connections(NM_DEVICE(self));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -951,7 +976,7 @@ deactivate(NMDevice *device)
|
||||||
|
|
||||||
priv->rate = 0;
|
priv->rate = 0;
|
||||||
|
|
||||||
set_current_ap(self, NULL, TRUE);
|
set_current_ap(self, NULL, TRUE, TRUE);
|
||||||
|
|
||||||
if (!wake_on_wlan_restore(self))
|
if (!wake_on_wlan_restore(self))
|
||||||
_LOGW(LOGD_DEVICE | LOGD_WIFI, "Cannot unconfigure WoWLAN.");
|
_LOGW(LOGD_DEVICE | LOGD_WIFI, "Cannot unconfigure WoWLAN.");
|
||||||
|
|
@ -2000,7 +2025,7 @@ supplicant_iface_bss_changed_cb(NMSupplicantInterface *iface,
|
||||||
if (nm_wifi_ap_set_fake(found_ap, TRUE))
|
if (nm_wifi_ap_set_fake(found_ap, TRUE))
|
||||||
_ap_dump(self, LOGL_DEBUG, found_ap, "updated", 0);
|
_ap_dump(self, LOGL_DEBUG, found_ap, "updated", 0);
|
||||||
} else {
|
} else {
|
||||||
ap_add_remove(self, FALSE, found_ap, TRUE);
|
ap_add_remove(self, FALSE, found_ap, TRUE, TRUE);
|
||||||
schedule_ap_list_dump(self);
|
schedule_ap_list_dump(self);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
@ -2043,7 +2068,7 @@ supplicant_iface_bss_changed_cb(NMSupplicantInterface *iface,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ap_add_remove(self, TRUE, ap, TRUE);
|
ap_add_remove(self, TRUE, ap, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the current AP if the supplicant notified a current BSS change
|
/* Update the current AP if the supplicant notified a current BSS change
|
||||||
|
|
@ -2268,7 +2293,7 @@ link_timeout_cb(gpointer user_data)
|
||||||
if (nm_device_get_state(device) != NM_DEVICE_STATE_ACTIVATED)
|
if (nm_device_get_state(device) != NM_DEVICE_STATE_ACTIVATED)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
set_current_ap(self, NULL, TRUE);
|
set_current_ap(self, NULL, TRUE, TRUE);
|
||||||
|
|
||||||
nm_device_state_changed(device,
|
nm_device_state_changed(device,
|
||||||
NM_DEVICE_STATE_FAILED,
|
NM_DEVICE_STATE_FAILED,
|
||||||
|
|
@ -2387,6 +2412,9 @@ handle_8021x_or_psk_auth_fail(NMDeviceWifi *self,
|
||||||
|
|
||||||
g_return_val_if_fail(new_state == NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED, FALSE);
|
g_return_val_if_fail(new_state == NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED, FALSE);
|
||||||
|
|
||||||
|
if (nm_device_get_state(device) != NM_DEVICE_STATE_CONFIG)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
req = nm_device_get_act_request(NM_DEVICE(self));
|
req = nm_device_get_act_request(NM_DEVICE(self));
|
||||||
g_return_val_if_fail(req != NULL, FALSE);
|
g_return_val_if_fail(req != NULL, FALSE);
|
||||||
|
|
||||||
|
|
@ -2684,7 +2712,7 @@ supplicant_iface_notify_current_bss(NMSupplicantInterface *iface,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set_current_ap(self, new_ap, TRUE);
|
set_current_ap(self, new_ap, TRUE, TRUE);
|
||||||
|
|
||||||
req = nm_device_get_act_request(NM_DEVICE(self));
|
req = nm_device_get_act_request(NM_DEVICE(self));
|
||||||
if (req) {
|
if (req) {
|
||||||
|
|
@ -2830,6 +2858,62 @@ handle_auth_or_fail(NMDeviceWifi *self, NMActRequest *req, gboolean new_secrets)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
supplicant_iface_notify_wpa_psk_mismatch_cb(NMSupplicantInterface *iface, NMDeviceWifi *self)
|
||||||
|
{
|
||||||
|
NMDevice *device = NM_DEVICE(self);
|
||||||
|
NMActRequest *req;
|
||||||
|
const char *setting_name = NM_SETTING_WIRELESS_SECURITY_SETTING_NAME;
|
||||||
|
|
||||||
|
if (nm_device_get_state(device) != NM_DEVICE_STATE_CONFIG)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_LOGI(LOGD_DEVICE | LOGD_WIFI,
|
||||||
|
"Activation: (wifi) psk mismatch reported by supplicant, asking for new key");
|
||||||
|
|
||||||
|
req = nm_device_get_act_request(NM_DEVICE(self));
|
||||||
|
g_return_if_fail(req != NULL);
|
||||||
|
|
||||||
|
nm_act_request_clear_secrets(req);
|
||||||
|
|
||||||
|
cleanup_association_attempt(self, TRUE);
|
||||||
|
nm_device_state_changed(device,
|
||||||
|
NM_DEVICE_STATE_NEED_AUTH,
|
||||||
|
NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT);
|
||||||
|
wifi_secrets_get_secrets(self,
|
||||||
|
setting_name,
|
||||||
|
NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION
|
||||||
|
| NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
supplicant_iface_notify_wpa_sae_mismatch_cb(NMSupplicantInterface *iface, NMDeviceWifi *self)
|
||||||
|
{
|
||||||
|
NMDevice *device = NM_DEVICE(self);
|
||||||
|
NMActRequest *req;
|
||||||
|
const char *setting_name = NM_SETTING_WIRELESS_SECURITY_SETTING_NAME;
|
||||||
|
|
||||||
|
if (nm_device_get_state(device) != NM_DEVICE_STATE_CONFIG)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_LOGI(LOGD_DEVICE | LOGD_WIFI,
|
||||||
|
"Activation: (wifi) SAE password mismatch reported by supplicant, asking for new key");
|
||||||
|
|
||||||
|
req = nm_device_get_act_request(NM_DEVICE(self));
|
||||||
|
g_return_if_fail(req != NULL);
|
||||||
|
|
||||||
|
nm_act_request_clear_secrets(req);
|
||||||
|
|
||||||
|
cleanup_association_attempt(self, TRUE);
|
||||||
|
nm_device_state_changed(device,
|
||||||
|
NM_DEVICE_STATE_NEED_AUTH,
|
||||||
|
NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT);
|
||||||
|
wifi_secrets_get_secrets(self,
|
||||||
|
setting_name,
|
||||||
|
NM_SECRET_AGENT_GET_SECRETS_FLAG_ALLOW_INTERACTION
|
||||||
|
| NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* supplicant_connection_timeout_cb
|
* supplicant_connection_timeout_cb
|
||||||
*
|
*
|
||||||
|
|
@ -2935,7 +3019,8 @@ build_supplicant_config(NMDeviceWifi *self,
|
||||||
s_wireless = nm_connection_get_setting_wireless(connection);
|
s_wireless = nm_connection_get_setting_wireless(connection);
|
||||||
g_return_val_if_fail(s_wireless != NULL, NULL);
|
g_return_val_if_fail(s_wireless != NULL, NULL);
|
||||||
|
|
||||||
config = nm_supplicant_config_new(nm_supplicant_interface_get_capabilities(priv->sup_iface));
|
config = nm_supplicant_config_new(nm_supplicant_interface_get_capabilities(priv->sup_iface),
|
||||||
|
nm_utils_get_connection_first_permissions_user(connection));
|
||||||
|
|
||||||
/* Warn if AP mode may not be supported */
|
/* Warn if AP mode may not be supported */
|
||||||
if (nm_streq0(nm_setting_wireless_get_mode(s_wireless), NM_SETTING_WIRELESS_MODE_AP)
|
if (nm_streq0(nm_setting_wireless_get_mode(s_wireless), NM_SETTING_WIRELESS_MODE_AP)
|
||||||
|
|
@ -3011,6 +3096,7 @@ build_supplicant_config(NMDeviceWifi *self,
|
||||||
mtu,
|
mtu,
|
||||||
pmf,
|
pmf,
|
||||||
fils,
|
fils,
|
||||||
|
nm_device_get_private_files(NM_DEVICE(self)),
|
||||||
error)) {
|
error)) {
|
||||||
g_prefix_error(error, "802-11-wireless-security: ");
|
g_prefix_error(error, "802-11-wireless-security: ");
|
||||||
goto error;
|
goto error;
|
||||||
|
|
@ -3118,7 +3204,7 @@ act_stage1_prepare(NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
||||||
priv->mode = _NM_802_11_MODE_AP;
|
priv->mode = _NM_802_11_MODE_AP;
|
||||||
|
|
||||||
/* Scanning not done in AP mode; clear the scan list */
|
/* Scanning not done in AP mode; clear the scan list */
|
||||||
remove_all_aps(self);
|
remove_all_aps(self, FALSE);
|
||||||
} else if (g_strcmp0(mode, NM_SETTING_WIRELESS_MODE_MESH) == 0)
|
} else if (g_strcmp0(mode, NM_SETTING_WIRELESS_MODE_MESH) == 0)
|
||||||
priv->mode = _NM_802_11_MODE_MESH;
|
priv->mode = _NM_802_11_MODE_MESH;
|
||||||
_notify(self, PROP_MODE);
|
_notify(self, PROP_MODE);
|
||||||
|
|
@ -3155,14 +3241,14 @@ act_stage1_prepare(NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
||||||
nm_wifi_ap_set_address(ap_fake, nm_device_get_hw_address(device));
|
nm_wifi_ap_set_address(ap_fake, nm_device_get_hw_address(device));
|
||||||
|
|
||||||
g_object_freeze_notify(G_OBJECT(self));
|
g_object_freeze_notify(G_OBJECT(self));
|
||||||
ap_add_remove(self, TRUE, ap_fake, TRUE);
|
ap_add_remove(self, TRUE, ap_fake, TRUE, TRUE);
|
||||||
g_object_thaw_notify(G_OBJECT(self));
|
g_object_thaw_notify(G_OBJECT(self));
|
||||||
ap = ap_fake;
|
ap = ap_fake;
|
||||||
}
|
}
|
||||||
|
|
||||||
_scan_notify_allowed(self, NM_TERNARY_DEFAULT);
|
_scan_notify_allowed(self, NM_TERNARY_DEFAULT);
|
||||||
|
|
||||||
set_current_ap(self, ap, FALSE);
|
set_current_ap(self, ap, FALSE, TRUE);
|
||||||
nm_active_connection_set_specific_object(NM_ACTIVE_CONNECTION(req),
|
nm_active_connection_set_specific_object(NM_ACTIVE_CONNECTION(req),
|
||||||
nm_dbus_object_get_path(NM_DBUS_OBJECT(ap)));
|
nm_dbus_object_get_path(NM_DBUS_OBJECT(ap)));
|
||||||
return NM_ACT_STAGE_RETURN_SUCCESS;
|
return NM_ACT_STAGE_RETURN_SUCCESS;
|
||||||
|
|
@ -3528,7 +3614,7 @@ device_state_changed(NMDevice *device,
|
||||||
|
|
||||||
cleanup_association_attempt(self, TRUE);
|
cleanup_association_attempt(self, TRUE);
|
||||||
cleanup_supplicant_failures(self);
|
cleanup_supplicant_failures(self);
|
||||||
remove_all_aps(self);
|
remove_all_aps(self, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (new_state) {
|
switch (new_state) {
|
||||||
|
|
@ -3566,7 +3652,7 @@ device_state_changed(NMDevice *device,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clear_aps)
|
if (clear_aps)
|
||||||
remove_all_aps(self);
|
remove_all_aps(self, FALSE);
|
||||||
|
|
||||||
_scan_notify_allowed(self, NM_TERNARY_DEFAULT);
|
_scan_notify_allowed(self, NM_TERNARY_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
@ -3808,7 +3894,7 @@ dispose(GObject *object)
|
||||||
|
|
||||||
g_clear_object(&priv->sup_mgr);
|
g_clear_object(&priv->sup_mgr);
|
||||||
|
|
||||||
remove_all_aps(self);
|
remove_all_aps(self, TRUE);
|
||||||
|
|
||||||
if (priv->p2p_device) {
|
if (priv->p2p_device) {
|
||||||
/* Destroy the P2P device. */
|
/* Destroy the P2P device. */
|
||||||
|
|
|
||||||
|
|
@ -684,7 +684,7 @@ iwd_config_write(GKeyFile *config,
|
||||||
* in the last few filename characters -- it cannot end in .open, .psk
|
* in the last few filename characters -- it cannot end in .open, .psk
|
||||||
* or .8021x.
|
* or .8021x.
|
||||||
*/
|
*/
|
||||||
return nm_utils_file_set_contents(filepath, data, length, 0600, times, NULL, error);
|
return nm_utils_file_set_contents(filepath, data, length, 0600, times, NULL, NULL, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
|
|
|
||||||
|
|
@ -510,6 +510,7 @@ try_create_connect_properties(NMModemBroadband *self)
|
||||||
{
|
{
|
||||||
NMModemBroadbandPrivate *priv = NM_MODEM_BROADBAND_GET_PRIVATE(self);
|
NMModemBroadbandPrivate *priv = NM_MODEM_BROADBAND_GET_PRIVATE(self);
|
||||||
ConnectContext *ctx = priv->ctx;
|
ConnectContext *ctx = priv->ctx;
|
||||||
|
NMDeviceStateReason fail_reason = NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED;
|
||||||
|
|
||||||
if (MODEM_CAPS_3GPP(ctx->caps)) {
|
if (MODEM_CAPS_3GPP(ctx->caps)) {
|
||||||
NMSettingGsm *s_gsm = nm_connection_get_setting_gsm(ctx->connection);
|
NMSettingGsm *s_gsm = nm_connection_get_setting_gsm(ctx->connection);
|
||||||
|
|
@ -522,7 +523,7 @@ try_create_connect_properties(NMModemBroadband *self)
|
||||||
if (s_gsm)
|
if (s_gsm)
|
||||||
network_id = nm_setting_gsm_get_network_id(s_gsm);
|
network_id = nm_setting_gsm_get_network_id(s_gsm);
|
||||||
if (!network_id) {
|
if (!network_id) {
|
||||||
if (mm_modem_get_state(self->_priv.modem_iface) < MM_MODEM_STATE_REGISTERED)
|
if (mm_modem_get_state(self->_priv.modem_iface) != MM_MODEM_STATE_REGISTERED)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
modem_3gpp = mm_object_get_modem_3gpp(priv->modem_object);
|
modem_3gpp = mm_object_get_modem_3gpp(priv->modem_object);
|
||||||
network_id = mm_modem_3gpp_get_operator_code(modem_3gpp);
|
network_id = mm_modem_3gpp_get_operator_code(modem_3gpp);
|
||||||
|
|
@ -530,6 +531,7 @@ try_create_connect_properties(NMModemBroadband *self)
|
||||||
if (!network_id) {
|
if (!network_id) {
|
||||||
_LOGW("failed to connect '%s': unable to determine the network id",
|
_LOGW("failed to connect '%s': unable to determine the network id",
|
||||||
nm_connection_get_id(ctx->connection));
|
nm_connection_get_id(ctx->connection));
|
||||||
|
fail_reason = NM_DEVICE_STATE_REASON_MODEM_NO_OPERATOR_CODE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -558,7 +560,7 @@ try_create_connect_properties(NMModemBroadband *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
nm_modem_emit_prepare_result(NM_MODEM(self), FALSE, NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED);
|
nm_modem_emit_prepare_result(NM_MODEM(self), FALSE, fail_reason);
|
||||||
connect_context_clear(self);
|
connect_context_clear(self);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
@ -1649,6 +1651,8 @@ nm_modem_broadband_new(GObject *object, GError **error)
|
||||||
driver,
|
driver,
|
||||||
NM_MODEM_OPERATOR_CODE,
|
NM_MODEM_OPERATOR_CODE,
|
||||||
operator_code,
|
operator_code,
|
||||||
|
NM_MODEM_DEVICE_UID,
|
||||||
|
mm_modem_get_device(modem_iface),
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMModem,
|
||||||
PROP_IP_TYPES,
|
PROP_IP_TYPES,
|
||||||
PROP_SIM_OPERATOR_ID,
|
PROP_SIM_OPERATOR_ID,
|
||||||
PROP_OPERATOR_CODE,
|
PROP_OPERATOR_CODE,
|
||||||
PROP_APN, );
|
PROP_APN,
|
||||||
|
PROP_DEVICE_UID, );
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
PPP_STATS,
|
PPP_STATS,
|
||||||
|
|
@ -78,6 +79,7 @@ typedef struct _NMModemPrivate {
|
||||||
char *sim_operator_id;
|
char *sim_operator_id;
|
||||||
char *operator_code;
|
char *operator_code;
|
||||||
char *apn;
|
char *apn;
|
||||||
|
char *device_uid;
|
||||||
|
|
||||||
NMPPPManager *ppp_manager;
|
NMPPPManager *ppp_manager;
|
||||||
NMPppMgr *ppp_mgr;
|
NMPppMgr *ppp_mgr;
|
||||||
|
|
@ -618,6 +620,12 @@ nm_modem_get_apn(NMModem *self)
|
||||||
return NM_MODEM_GET_PRIVATE(self)->apn;
|
return NM_MODEM_GET_PRIVATE(self)->apn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
nm_modem_get_device_uid(NMModem *self)
|
||||||
|
{
|
||||||
|
return NM_MODEM_GET_PRIVATE(self)->device_uid;
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -1121,6 +1129,22 @@ nm_modem_check_connection_compatible(NMModem *self, NMConnection *connection, GE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
str = nm_setting_gsm_get_device_uid(s_gsm);
|
||||||
|
if (str) {
|
||||||
|
if (!priv->device_uid) {
|
||||||
|
nm_utils_error_set_literal(error,
|
||||||
|
NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY,
|
||||||
|
"GSM profile has device-uid, device does not");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
if (!nm_streq(str, priv->device_uid)) {
|
||||||
|
nm_utils_error_set_literal(error,
|
||||||
|
NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY,
|
||||||
|
"device has differing device-uid than GSM profile");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* SIM properties may not be available before the SIM is unlocked, so
|
/* SIM properties may not be available before the SIM is unlocked, so
|
||||||
* to ensure that autoconnect works, the connection's SIM properties
|
* to ensure that autoconnect works, the connection's SIM properties
|
||||||
* are only compared if present on the device.
|
* are only compared if present on the device.
|
||||||
|
|
@ -1644,6 +1668,9 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
|
||||||
case PROP_APN:
|
case PROP_APN:
|
||||||
g_value_set_string(value, priv->apn);
|
g_value_set_string(value, priv->apn);
|
||||||
break;
|
break;
|
||||||
|
case PROP_DEVICE_UID:
|
||||||
|
g_value_set_string(value, priv->device_uid);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
|
@ -1699,6 +1726,10 @@ set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *ps
|
||||||
/* construct-only */
|
/* construct-only */
|
||||||
priv->operator_code = g_value_dup_string(value);
|
priv->operator_code = g_value_dup_string(value);
|
||||||
break;
|
break;
|
||||||
|
case PROP_DEVICE_UID:
|
||||||
|
/* construct-only */
|
||||||
|
priv->device_uid = g_value_dup_string(value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
|
@ -1758,6 +1789,7 @@ finalize(GObject *object)
|
||||||
g_free(priv->sim_operator_id);
|
g_free(priv->sim_operator_id);
|
||||||
g_free(priv->operator_code);
|
g_free(priv->operator_code);
|
||||||
g_free(priv->apn);
|
g_free(priv->apn);
|
||||||
|
g_free(priv->device_uid);
|
||||||
|
|
||||||
G_OBJECT_CLASS(nm_modem_parent_class)->finalize(object);
|
G_OBJECT_CLASS(nm_modem_parent_class)->finalize(object);
|
||||||
}
|
}
|
||||||
|
|
@ -1863,6 +1895,13 @@ nm_modem_class_init(NMModemClass *klass)
|
||||||
obj_properties[PROP_APN] =
|
obj_properties[PROP_APN] =
|
||||||
g_param_spec_string(NM_MODEM_APN, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
g_param_spec_string(NM_MODEM_APN, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
|
obj_properties[PROP_DEVICE_UID] =
|
||||||
|
g_param_spec_string(NM_MODEM_DEVICE_UID,
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
NULL,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);
|
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);
|
||||||
|
|
||||||
signals[PPP_STATS] = g_signal_new(NM_MODEM_PPP_STATS,
|
signals[PPP_STATS] = g_signal_new(NM_MODEM_PPP_STATS,
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
#define NM_MODEM_SIM_OPERATOR_ID "sim-operator-id"
|
#define NM_MODEM_SIM_OPERATOR_ID "sim-operator-id"
|
||||||
#define NM_MODEM_OPERATOR_CODE "operator-code"
|
#define NM_MODEM_OPERATOR_CODE "operator-code"
|
||||||
#define NM_MODEM_APN "apn"
|
#define NM_MODEM_APN "apn"
|
||||||
|
#define NM_MODEM_DEVICE_UID "device-uid"
|
||||||
|
|
||||||
/* Signals */
|
/* Signals */
|
||||||
#define NM_MODEM_PPP_STATS "ppp-stats"
|
#define NM_MODEM_PPP_STATS "ppp-stats"
|
||||||
|
|
@ -154,6 +155,7 @@ const char *nm_modem_get_sim_id(NMModem *modem);
|
||||||
const char *nm_modem_get_sim_operator_id(NMModem *modem);
|
const char *nm_modem_get_sim_operator_id(NMModem *modem);
|
||||||
const char *nm_modem_get_operator_code(NMModem *modem);
|
const char *nm_modem_get_operator_code(NMModem *modem);
|
||||||
const char *nm_modem_get_apn(NMModem *modem);
|
const char *nm_modem_get_apn(NMModem *modem);
|
||||||
|
const char *nm_modem_get_device_uid(NMModem *modem);
|
||||||
|
|
||||||
gboolean nm_modem_set_data_port(NMModem *self,
|
gboolean nm_modem_set_data_port(NMModem *self,
|
||||||
NMPlatform *platform,
|
NMPlatform *platform,
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ const NMDhcpOption _nm_dhcp_option_dhcp4_options[] = {
|
||||||
REQ(NM_DHCP_OPTION_DHCP4_ARP_CACHE_TIMEOUT, "arp_cache_timeout", FALSE),
|
REQ(NM_DHCP_OPTION_DHCP4_ARP_CACHE_TIMEOUT, "arp_cache_timeout", FALSE),
|
||||||
REQ(NM_DHCP_OPTION_DHCP4_IEEE802_3_ENCAPSULATION, "ieee802_3_encapsulation", FALSE),
|
REQ(NM_DHCP_OPTION_DHCP4_IEEE802_3_ENCAPSULATION, "ieee802_3_encapsulation", FALSE),
|
||||||
REQ(NM_DHCP_OPTION_DHCP4_DEFAULT_TCP_TTL, "default_tcp_ttl", FALSE),
|
REQ(NM_DHCP_OPTION_DHCP4_DEFAULT_TCP_TTL, "default_tcp_ttl", FALSE),
|
||||||
REQ(NM_DHCP_OPTION_DHCP4_TCP_KEEPALIVE_INTERVAL, "tcp_keepalive_internal", FALSE),
|
REQ(NM_DHCP_OPTION_DHCP4_TCP_KEEPALIVE_INTERVAL, "tcp_keepalive_interval", FALSE),
|
||||||
REQ(NM_DHCP_OPTION_DHCP4_TCP_KEEPALIVE_GARBAGE, "tcp_keepalive_garbage", FALSE),
|
REQ(NM_DHCP_OPTION_DHCP4_TCP_KEEPALIVE_GARBAGE, "tcp_keepalive_garbage", FALSE),
|
||||||
REQ(NM_DHCP_OPTION_DHCP4_VENDOR_SPECIFIC, "vendor_encapsulated_options", FALSE),
|
REQ(NM_DHCP_OPTION_DHCP4_VENDOR_SPECIFIC, "vendor_encapsulated_options", FALSE),
|
||||||
REQ(NM_DHCP_OPTION_DHCP4_NETBIOS_NAMESERVER, "netbios_name_servers", FALSE),
|
REQ(NM_DHCP_OPTION_DHCP4_NETBIOS_NAMESERVER, "netbios_name_servers", FALSE),
|
||||||
|
|
|
||||||
|
|
@ -395,7 +395,7 @@ ip6_start(NMDhcpClient *client, const struct in6_addr *ll_addr, GError **error)
|
||||||
prefix_delegation = FALSE;
|
prefix_delegation = FALSE;
|
||||||
if (client_config->v6.needed_prefixes > 0) {
|
if (client_config->v6.needed_prefixes > 0) {
|
||||||
if (client_config->v6.needed_prefixes > 1) {
|
if (client_config->v6.needed_prefixes > 1) {
|
||||||
/* FIXME: systemd-networkd API only allows to request a
|
/* FIXME: systemd-networkd API only allows requesting a
|
||||||
* single prefix */
|
* single prefix */
|
||||||
_LOGW("dhcp-client6: only one prefix request is supported");
|
_LOGW("dhcp-client6: only one prefix request is supported");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,11 @@ ip4_process_dhcpcd_rfc3442_routes(const char *iface,
|
||||||
in_addr_t address,
|
in_addr_t address,
|
||||||
guint32 *out_gwaddr)
|
guint32 *out_gwaddr)
|
||||||
{
|
{
|
||||||
gs_free const char **routes = NULL;
|
gs_free char **routes = NULL;
|
||||||
const char **r;
|
char **r;
|
||||||
gboolean have_routes = FALSE;
|
gboolean have_routes = FALSE;
|
||||||
|
|
||||||
routes = nm_strsplit_set(str, " ");
|
routes = (char **) nm_strsplit_set(str, " ");
|
||||||
if (!routes)
|
if (!routes)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
@ -1224,7 +1224,7 @@ lease_option_print_domain_name(const uint8_t *cache,
|
||||||
}
|
}
|
||||||
case 0xC0: /* back pointer */
|
case 0xC0: /* back pointer */
|
||||||
{
|
{
|
||||||
size_t offset = (c & 0x3F) << 16;
|
size_t offset = (c & 0x3F) << 8;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The offset is given as two bytes (in big endian), where the
|
* The offset is given as two bytes (in big endian), where the
|
||||||
|
|
|
||||||
|
|
@ -239,6 +239,76 @@ test_parse_search_list(void)
|
||||||
g_assert_cmpint(g_strv_length(domains), ==, 1);
|
g_assert_cmpint(g_strv_length(domains), ==, 1);
|
||||||
g_assert_cmpstr(domains[0], ==, "okay");
|
g_assert_cmpstr(domains[0], ==, "okay");
|
||||||
g_strfreev(domains);
|
g_strfreev(domains);
|
||||||
|
|
||||||
|
/* Test that the message compression works when the offset uses both bytes */
|
||||||
|
data = (guint8[]) {
|
||||||
|
/* clang-format off */
|
||||||
|
/* offset 0 */
|
||||||
|
0x3e,
|
||||||
|
'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a',
|
||||||
|
'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a',
|
||||||
|
'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a',
|
||||||
|
'a','a','a','a','a','a','a','a','a','a','a','a','a','a',
|
||||||
|
0x00,
|
||||||
|
/* offset 0x40 */
|
||||||
|
0x3e,
|
||||||
|
'b','b','b','b','b','b','b','b','b','b','b','b','b','b','b','b',
|
||||||
|
'b','b','b','b','b','b','b','b','b','b','b','b','b','b','b','b',
|
||||||
|
'b','b','b','b','b','b','b','b','b','b','b','b','b','b','b','b',
|
||||||
|
'b','b','b','b','b','b','b','b','b','b','b','b','b','b',
|
||||||
|
0x00,
|
||||||
|
/* offset 0x80 */
|
||||||
|
0x3e,
|
||||||
|
'c','c','c','c','c','c','c','c','c','c','c','c','c','c','c','c',
|
||||||
|
'c','c','c','c','c','c','c','c','c','c','c','c','c','c','c','c',
|
||||||
|
'c','c','c','c','c','c','c','c','c','c','c','c','c','c','c','c',
|
||||||
|
'c','c','c','c','c','c','c','c','c','c','c','c','c','c',
|
||||||
|
0x00,
|
||||||
|
/* offset 0xc0 */
|
||||||
|
0x3e,
|
||||||
|
'd','d','d','d','d','d','d','d','d','d','d','d','d','d','d','d',
|
||||||
|
'd','d','d','d','d','d','d','d','d','d','d','d','d','d','d','d',
|
||||||
|
'd','d','d','d','d','d','d','d','d','d','d','d','d','d','d','d',
|
||||||
|
'd','d','d','d','d','d','d','d','d','d','d','d','d','d',
|
||||||
|
0x00,
|
||||||
|
/* offset 0x100 */
|
||||||
|
0x3e,
|
||||||
|
'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e',
|
||||||
|
'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e',
|
||||||
|
'e','e','e','e','e','e','e','e','e','e','e','e','e','e','e','e',
|
||||||
|
'e','e','e','e','e','e','e','e','e','e','e','e','e','e',
|
||||||
|
0x00,
|
||||||
|
/* offset 0x140 */
|
||||||
|
0x06, 'f','o','o','b','a','r', 0x03, 'c', 'o', 'm', 0x00,
|
||||||
|
0x04, 't', 'e', 's', 't', 0xc1, 0x40, /* back pointer to offset 0x140*/
|
||||||
|
/* clang-format on */
|
||||||
|
};
|
||||||
|
|
||||||
|
domains = nm_dhcp_lease_data_parse_search_list(data,
|
||||||
|
0x153,
|
||||||
|
"eth0",
|
||||||
|
AF_INET,
|
||||||
|
NM_DHCP_OPTION_DHCP4_DOMAIN_SEARCH_LIST);
|
||||||
|
g_assert(domains);
|
||||||
|
g_assert_cmpint(g_strv_length(domains), ==, 7);
|
||||||
|
g_assert_cmpstr(domains[0],
|
||||||
|
==,
|
||||||
|
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||||
|
g_assert_cmpstr(domains[1],
|
||||||
|
==,
|
||||||
|
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
|
||||||
|
g_assert_cmpstr(domains[2],
|
||||||
|
==,
|
||||||
|
"cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc");
|
||||||
|
g_assert_cmpstr(domains[3],
|
||||||
|
==,
|
||||||
|
"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd");
|
||||||
|
g_assert_cmpstr(domains[4],
|
||||||
|
==,
|
||||||
|
"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
|
||||||
|
g_assert_cmpstr(domains[5], ==, "foobar.com");
|
||||||
|
g_assert_cmpstr(domains[6], ==, "test.foobar.com");
|
||||||
|
g_strfreev(domains);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,15 @@ typedef enum {
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void
|
||||||
|
dnsconfd_change_plugin_state(NMDnsDnsconfd *self, DnsconfdPluginState new_state)
|
||||||
|
{
|
||||||
|
NMDnsDnsconfdPrivate *priv = NM_DNS_DNSCONFD_GET_PRIVATE(self);
|
||||||
|
|
||||||
|
priv->plugin_state = new_state;
|
||||||
|
_nm_dns_plugin_update_pending_maybe_changed(NM_DNS_PLUGIN(self));
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dnsconfd_serial_changed(NMDnsDnsconfd *self, guint new_serial)
|
dnsconfd_serial_changed(NMDnsDnsconfd *self, guint new_serial)
|
||||||
{
|
{
|
||||||
|
|
@ -78,12 +87,10 @@ dnsconfd_serial_changed(NMDnsDnsconfd *self, guint new_serial)
|
||||||
priv->present_configuration_serial = new_serial;
|
priv->present_configuration_serial = new_serial;
|
||||||
if (priv->plugin_state == DNSCONFD_PLUGIN_WAIT_SERIAL
|
if (priv->plugin_state == DNSCONFD_PLUGIN_WAIT_SERIAL
|
||||||
&& priv->awaited_configuration_serial == new_serial) {
|
&& priv->awaited_configuration_serial == new_serial) {
|
||||||
priv->plugin_state = DNSCONFD_PLUGIN_IDLE;
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_IDLE);
|
||||||
/* Update finished, serials match */
|
/* Update finished, serials match */
|
||||||
_LOGT("serials match, update finished");
|
_LOGT("serials match, update finished");
|
||||||
}
|
}
|
||||||
|
|
||||||
_nm_dns_plugin_update_pending_maybe_changed(NM_DNS_PLUGIN(self));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -132,6 +139,12 @@ dnsconfd_serial_retrieval_done(GObject *source_object, GAsyncResult *res, gpoint
|
||||||
self = user_data;
|
self = user_data;
|
||||||
priv = NM_DNS_DNSCONFD_GET_PRIVATE(self);
|
priv = NM_DNS_DNSCONFD_GET_PRIVATE(self);
|
||||||
|
|
||||||
|
if (!response) {
|
||||||
|
_LOGW("dnsconfd serial retrieval failed: %s", error->message);
|
||||||
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_IDLE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
nm_clear_g_cancellable(&priv->serial_cancellable);
|
nm_clear_g_cancellable(&priv->serial_cancellable);
|
||||||
|
|
||||||
g_variant_get(response, "(v)", &new_serial_variant);
|
g_variant_get(response, "(v)", &new_serial_variant);
|
||||||
|
|
@ -201,8 +214,11 @@ dnsconfd_update_done(GObject *source_object, GAsyncResult *res, gpointer user_da
|
||||||
|
|
||||||
nm_clear_g_cancellable(&priv->update_cancellable);
|
nm_clear_g_cancellable(&priv->update_cancellable);
|
||||||
|
|
||||||
if (!response)
|
if (!response) {
|
||||||
_LOGW("dnsconfd update failed: %s", error->message);
|
_LOGW("dnsconfd update failed: %s", error->message);
|
||||||
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_IDLE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* By using &s we will get pointer to char data contained
|
/* By using &s we will get pointer to char data contained
|
||||||
* in variant and thus no freing of dnsconfd_message is required */
|
* in variant and thus no freing of dnsconfd_message is required */
|
||||||
|
|
@ -210,8 +226,7 @@ dnsconfd_update_done(GObject *source_object, GAsyncResult *res, gpointer user_da
|
||||||
|
|
||||||
if (!awaited_serial) {
|
if (!awaited_serial) {
|
||||||
_LOGW("dnsconfd refused update: %s", dnsconfd_message);
|
_LOGW("dnsconfd refused update: %s", dnsconfd_message);
|
||||||
priv->plugin_state = DNSCONFD_PLUGIN_IDLE;
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_IDLE);
|
||||||
_nm_dns_plugin_update_pending_maybe_changed(NM_DNS_PLUGIN(self));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -220,14 +235,12 @@ dnsconfd_update_done(GObject *source_object, GAsyncResult *res, gpointer user_da
|
||||||
|
|
||||||
if (priv->awaited_configuration_serial == priv->present_configuration_serial) {
|
if (priv->awaited_configuration_serial == priv->present_configuration_serial) {
|
||||||
/* Serials match, update finished */
|
/* Serials match, update finished */
|
||||||
priv->plugin_state = DNSCONFD_PLUGIN_IDLE;
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_IDLE);
|
||||||
_LOGT("after update serials match");
|
_LOGT("after update serials match");
|
||||||
} else {
|
} else {
|
||||||
priv->plugin_state = DNSCONFD_PLUGIN_WAIT_SERIAL;
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_WAIT_SERIAL);
|
||||||
_LOGT("after update serials don't match, waiting");
|
_LOGT("after update serials don't match, waiting");
|
||||||
}
|
}
|
||||||
|
|
||||||
_nm_dns_plugin_update_pending_maybe_changed(NM_DNS_PLUGIN(self));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
|
@ -355,12 +368,13 @@ server_builder_append_base(GVariantBuilder *argument_builder,
|
||||||
const char *address_string,
|
const char *address_string,
|
||||||
const char *const *routing_domains,
|
const char *const *routing_domains,
|
||||||
const char *const *search_domains,
|
const char *const *search_domains,
|
||||||
const char *ca)
|
const char *ca,
|
||||||
|
int priority)
|
||||||
{
|
{
|
||||||
NMDnsServer dns_server;
|
NMDnsServer dns_server;
|
||||||
gsize addr_size;
|
gsize addr_size;
|
||||||
|
|
||||||
if (!nm_dns_uri_parse(address_family, address_string, &dns_server))
|
if (!nm_dns_uri_parse(address_family, address_string, &dns_server, NULL))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
addr_size = nm_utils_addr_family_to_size(dns_server.addr_family);
|
addr_size = nm_utils_addr_family_to_size(dns_server.addr_family);
|
||||||
|
|
||||||
|
|
@ -379,6 +393,12 @@ server_builder_append_base(GVariantBuilder *argument_builder,
|
||||||
"{sv}",
|
"{sv}",
|
||||||
"name",
|
"name",
|
||||||
g_variant_new("s", dns_server.servername));
|
g_variant_new("s", dns_server.servername));
|
||||||
|
if (dns_server.port != NM_DNS_PORT_UNDEFINED) {
|
||||||
|
g_variant_builder_add(argument_builder,
|
||||||
|
"{sv}",
|
||||||
|
"port",
|
||||||
|
g_variant_new("i", dns_server.port));
|
||||||
|
}
|
||||||
if (routing_domains) {
|
if (routing_domains) {
|
||||||
g_variant_builder_add(argument_builder,
|
g_variant_builder_add(argument_builder,
|
||||||
"{sv}",
|
"{sv}",
|
||||||
|
|
@ -394,6 +414,9 @@ server_builder_append_base(GVariantBuilder *argument_builder,
|
||||||
if (ca) {
|
if (ca) {
|
||||||
g_variant_builder_add(argument_builder, "{sv}", "ca", g_variant_new("s", ca));
|
g_variant_builder_add(argument_builder, "{sv}", "ca", g_variant_new("s", ca));
|
||||||
}
|
}
|
||||||
|
/* dnsconfd defines priority as bigger number equals bigger priority, while NM
|
||||||
|
* uses the exact opposite, thus use -priority */
|
||||||
|
g_variant_builder_add(argument_builder, "{sv}", "priority", g_variant_new("i", -priority));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -430,7 +453,8 @@ parse_global_config(const NMGlobalDnsConfig *global_config,
|
||||||
servers[j],
|
servers[j],
|
||||||
routing_domains,
|
routing_domains,
|
||||||
searches,
|
searches,
|
||||||
*ca)) {
|
*ca,
|
||||||
|
NM_DNS_PRIORITY_DEFAULT_NORMAL)) {
|
||||||
g_variant_builder_close(argument_builder);
|
g_variant_builder_close(argument_builder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -478,8 +502,7 @@ name_owner_changed(NMDnsDnsconfd *self, const char *name_owner)
|
||||||
|| priv->plugin_state == DNSCONFD_PLUGIN_WAIT_SERIAL) {
|
|| priv->plugin_state == DNSCONFD_PLUGIN_WAIT_SERIAL) {
|
||||||
/* We were waiting for either serial or confirmation of update and name
|
/* We were waiting for either serial or confirmation of update and name
|
||||||
* disappeared, thus we need to retransmit */
|
* disappeared, thus we need to retransmit */
|
||||||
priv->plugin_state = DNSCONFD_PLUGIN_WAIT_CONNECT;
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_WAIT_CONNECT);
|
||||||
_nm_dns_plugin_update_pending_maybe_changed(NM_DNS_PLUGIN(self));
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -490,15 +513,13 @@ name_owner_changed(NMDnsDnsconfd *self, const char *name_owner)
|
||||||
if (!subscribe_serial(self)) {
|
if (!subscribe_serial(self)) {
|
||||||
/* This means that in time between new name and subscribe serial call
|
/* This means that in time between new name and subscribe serial call
|
||||||
* we lost the name again thus wait again */
|
* we lost the name again thus wait again */
|
||||||
priv->plugin_state = DNSCONFD_PLUGIN_WAIT_CONNECT;
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_WAIT_CONNECT);
|
||||||
_LOGT("subscription failed, waiting to connect");
|
_LOGT("subscription failed, waiting to connect");
|
||||||
} else {
|
} else {
|
||||||
priv->plugin_state = DNSCONFD_PLUGIN_WAIT_UPDATE_DONE;
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_WAIT_UPDATE_DONE);
|
||||||
_LOGT("sending update and waiting for its finish");
|
_LOGT("sending update and waiting for its finish");
|
||||||
send_dnsconfd_update(self);
|
send_dnsconfd_update(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
_nm_dns_plugin_update_pending_maybe_changed(NM_DNS_PLUGIN(self));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
@ -550,7 +571,7 @@ dnsconfd_start_done(GObject *source_object, GAsyncResult *res, gpointer user_dat
|
||||||
g_dbus_error_strip_remote_error(error);
|
g_dbus_error_strip_remote_error(error);
|
||||||
_LOGW("failed to start Dnsconfd %s", error->message);
|
_LOGW("failed to start Dnsconfd %s", error->message);
|
||||||
} else {
|
} else {
|
||||||
_LOGT("succesfully started Dnsconfd");
|
_LOGT("successfully started Dnsconfd");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* No update maybe changed or state change, as this is handled by the name owner callbacks
|
/* No update maybe changed or state change, as this is handled by the name owner callbacks
|
||||||
|
|
@ -618,6 +639,7 @@ parse_all_interface_config(GVariantBuilder *argument_builder,
|
||||||
NMDnsConfigIPData *ip_data;
|
NMDnsConfigIPData *ip_data;
|
||||||
const char *const *dns_server_strings;
|
const char *const *dns_server_strings;
|
||||||
guint nameserver_count;
|
guint nameserver_count;
|
||||||
|
int priority;
|
||||||
const char *ifname;
|
const char *ifname;
|
||||||
gboolean explicit_default = is_default_interface_explicit(ip_data_lst_head);
|
gboolean explicit_default = is_default_interface_explicit(ip_data_lst_head);
|
||||||
|
|
||||||
|
|
@ -638,6 +660,9 @@ parse_all_interface_config(GVariantBuilder *argument_builder,
|
||||||
|
|
||||||
gather_interface_domains(ip_data, explicit_default, &routing_domains, &search_domains);
|
gather_interface_domains(ip_data, explicit_default, &routing_domains, &search_domains);
|
||||||
get_networks(ip_data, &networks);
|
get_networks(ip_data, &networks);
|
||||||
|
if (!nm_l3_config_data_get_dns_priority(ip_data->l3cd, ip_data->addr_family, &priority)) {
|
||||||
|
priority = NM_DNS_PRIORITY_DEFAULT_NORMAL;
|
||||||
|
}
|
||||||
|
|
||||||
for (guint i = 0; i < nameserver_count; i++) {
|
for (guint i = 0; i < nameserver_count; i++) {
|
||||||
if (server_builder_append_base(argument_builder,
|
if (server_builder_append_base(argument_builder,
|
||||||
|
|
@ -645,7 +670,8 @@ parse_all_interface_config(GVariantBuilder *argument_builder,
|
||||||
dns_server_strings[i],
|
dns_server_strings[i],
|
||||||
routing_domains,
|
routing_domains,
|
||||||
search_domains,
|
search_domains,
|
||||||
ca)) {
|
ca,
|
||||||
|
priority)) {
|
||||||
server_builder_append_interface_info(argument_builder, ifname, networks);
|
server_builder_append_interface_info(argument_builder, ifname, networks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -695,18 +721,16 @@ update(NMDnsPlugin *plugin,
|
||||||
/* We need to consider only whether we are connected, because newer update call
|
/* We need to consider only whether we are connected, because newer update call
|
||||||
* overrides the old one */
|
* overrides the old one */
|
||||||
if (all_connected == CONNECTION_FAIL) {
|
if (all_connected == CONNECTION_FAIL) {
|
||||||
priv->plugin_state = DNSCONFD_PLUGIN_IDLE;
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_IDLE);
|
||||||
_LOGT("failed to connect");
|
_LOGT("failed to connect");
|
||||||
} else if (all_connected == CONNECTION_WAIT) {
|
} else if (all_connected == CONNECTION_WAIT) {
|
||||||
priv->plugin_state = DNSCONFD_PLUGIN_WAIT_CONNECT;
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_WAIT_CONNECT);
|
||||||
_LOGT("not connected, waiting to connect");
|
_LOGT("not connected, waiting to connect");
|
||||||
} else {
|
} else {
|
||||||
priv->plugin_state = DNSCONFD_PLUGIN_WAIT_UPDATE_DONE;
|
dnsconfd_change_plugin_state(self, DNSCONFD_PLUGIN_WAIT_UPDATE_DONE);
|
||||||
_LOGT("connected, waiting for update to finish");
|
_LOGT("connected, waiting for update to finish");
|
||||||
}
|
}
|
||||||
|
|
||||||
_nm_dns_plugin_update_pending_maybe_changed(plugin);
|
|
||||||
|
|
||||||
if (all_connected == CONNECTION_FAIL) {
|
if (all_connected == CONNECTION_FAIL) {
|
||||||
nm_utils_error_set(error,
|
nm_utils_error_set(error,
|
||||||
NM_UTILS_ERROR_UNKNOWN,
|
NM_UTILS_ERROR_UNKNOWN,
|
||||||
|
|
|
||||||
|
|
@ -521,9 +521,10 @@ _gl_pid_spawn_next_step(void)
|
||||||
argv[argv_idx++] = "--no-resolv"; /* Use only commandline */
|
argv[argv_idx++] = "--no-resolv"; /* Use only commandline */
|
||||||
argv[argv_idx++] = "--keep-in-foreground";
|
argv[argv_idx++] = "--keep-in-foreground";
|
||||||
argv[argv_idx++] = "--no-hosts"; /* don't use /etc/hosts to resolve */
|
argv[argv_idx++] = "--no-hosts"; /* don't use /etc/hosts to resolve */
|
||||||
argv[argv_idx++] = "--bind-interfaces";
|
argv[argv_idx++] = "--bind-dynamic";
|
||||||
argv[argv_idx++] = "--pid-file=" PIDFILE;
|
argv[argv_idx++] = "--pid-file=" PIDFILE;
|
||||||
argv[argv_idx++] = "--listen-address=127.0.0.1"; /* Should work for both 4 and 6 */
|
argv[argv_idx++] = "--listen-address=127.0.0.1";
|
||||||
|
argv[argv_idx++] = "--listen-address=::1";
|
||||||
argv[argv_idx++] = "--cache-size=400";
|
argv[argv_idx++] = "--cache-size=400";
|
||||||
argv[argv_idx++] = "--clear-on-reload"; /* clear cache when dns server changes */
|
argv[argv_idx++] = "--clear-on-reload"; /* clear cache when dns server changes */
|
||||||
argv[argv_idx++] = "--conf-file=/dev/null"; /* avoid loading /etc/dnsmasq.conf */
|
argv[argv_idx++] = "--conf-file=/dev/null"; /* avoid loading /etc/dnsmasq.conf */
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
#include "libnm-core-intern/nm-core-internal.h"
|
#include "libnm-core-intern/nm-core-internal.h"
|
||||||
#include "libnm-glib-aux/nm-str-buf.h"
|
#include "libnm-glib-aux/nm-str-buf.h"
|
||||||
|
#include "libnm-glib-aux/nm-io-utils.h"
|
||||||
|
|
||||||
#include "NetworkManagerUtils.h"
|
#include "NetworkManagerUtils.h"
|
||||||
#include "devices/nm-device.h"
|
#include "devices/nm-device.h"
|
||||||
|
|
@ -586,7 +587,11 @@ add_dns_domains(GPtrArray *array,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
merge_one_l3cd(NMResolvConfData *rc, int addr_family, int ifindex, const NML3ConfigData *l3cd)
|
merge_one_l3cd(NMResolvConfData *rc,
|
||||||
|
int addr_family,
|
||||||
|
int ifindex,
|
||||||
|
const NML3ConfigData *l3cd,
|
||||||
|
gboolean ignore_searches_and_options)
|
||||||
{
|
{
|
||||||
char buf[NM_INET_ADDRSTRLEN + 50];
|
char buf[NM_INET_ADDRSTRLEN + 50];
|
||||||
gboolean has_trust_ad;
|
gboolean has_trust_ad;
|
||||||
|
|
@ -624,6 +629,7 @@ merge_one_l3cd(NMResolvConfData *rc, int addr_family, int ifindex, const NML3Con
|
||||||
add_string_item(rc->nameservers, buf, TRUE);
|
add_string_item(rc->nameservers, buf, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ignore_searches_and_options) {
|
||||||
add_dns_domains(rc->searches, addr_family, l3cd, FALSE, TRUE);
|
add_dns_domains(rc->searches, addr_family, l3cd, FALSE, TRUE);
|
||||||
|
|
||||||
has_trust_ad = FALSE;
|
has_trust_ad = FALSE;
|
||||||
|
|
@ -648,6 +654,7 @@ merge_one_l3cd(NMResolvConfData *rc, int addr_family, int ifindex, const NML3Con
|
||||||
rc->has_trust_ad = NM_TERNARY_TRUE;
|
rc->has_trust_ad = NM_TERNARY_TRUE;
|
||||||
} else
|
} else
|
||||||
rc->has_trust_ad = NM_TERNARY_FALSE;
|
rc->has_trust_ad = NM_TERNARY_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (addr_family == AF_INET) {
|
if (addr_family == AF_INET) {
|
||||||
const in_addr_t *nis_servers;
|
const in_addr_t *nis_servers;
|
||||||
|
|
@ -1001,6 +1008,7 @@ _read_link_cached(const char *path, gboolean *is_cached, char **cached)
|
||||||
#define RESOLV_CONF_TMP "/etc/.resolv.conf.NetworkManager"
|
#define RESOLV_CONF_TMP "/etc/.resolv.conf.NetworkManager"
|
||||||
|
|
||||||
#define NO_STUB_RESOLV_CONF NMRUNDIR "/no-stub-resolv.conf"
|
#define NO_STUB_RESOLV_CONF NMRUNDIR "/no-stub-resolv.conf"
|
||||||
|
#define NO_STUB_RESOLV_CONF_TMP NMRUNDIR "/no-stub-resolv.conf.tmp"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_resolv_conf_no_stub(NMDnsManager *self,
|
update_resolv_conf_no_stub(NMDnsManager *self,
|
||||||
|
|
@ -1013,7 +1021,14 @@ update_resolv_conf_no_stub(NMDnsManager *self,
|
||||||
|
|
||||||
content = create_resolv_conf(searches, nameservers, options);
|
content = create_resolv_conf(searches, nameservers, options);
|
||||||
|
|
||||||
if (!g_file_set_contents(NO_STUB_RESOLV_CONF, content, -1, &local)) {
|
if (!nm_utils_file_set_contents(NO_STUB_RESOLV_CONF,
|
||||||
|
content,
|
||||||
|
-1,
|
||||||
|
0644,
|
||||||
|
NULL,
|
||||||
|
NO_STUB_RESOLV_CONF_TMP,
|
||||||
|
NULL,
|
||||||
|
&local)) {
|
||||||
_LOGD("update-resolv-no-stub: failure to write file: %s", local->message);
|
_LOGD("update-resolv-no-stub: failure to write file: %s", local->message);
|
||||||
g_error_free(local);
|
g_error_free(local);
|
||||||
return;
|
return;
|
||||||
|
|
@ -1231,12 +1246,15 @@ compute_hash(NMDnsManager *self, const NMGlobalDnsConfig *global, guint8 buffer[
|
||||||
{
|
{
|
||||||
nm_auto_free_checksum GChecksum *sum = NULL;
|
nm_auto_free_checksum GChecksum *sum = NULL;
|
||||||
NMDnsConfigIPData *ip_data;
|
NMDnsConfigIPData *ip_data;
|
||||||
|
gboolean has_global_dns_section = FALSE;
|
||||||
|
|
||||||
sum = g_checksum_new(G_CHECKSUM_SHA1);
|
sum = g_checksum_new(G_CHECKSUM_SHA1);
|
||||||
nm_assert(HASH_LEN == g_checksum_type_get_length(G_CHECKSUM_SHA1));
|
nm_assert(HASH_LEN == g_checksum_type_get_length(G_CHECKSUM_SHA1));
|
||||||
|
|
||||||
if (global)
|
if (global) {
|
||||||
nm_global_dns_config_update_checksum(global, sum);
|
nm_global_dns_config_update_checksum(global, sum);
|
||||||
|
has_global_dns_section = nm_global_dns_has_global_dns_section(global);
|
||||||
|
}
|
||||||
|
|
||||||
if (!global || !nm_global_dns_config_lookup_domain(global, "*")) {
|
if (!global || !nm_global_dns_config_lookup_domain(global, "*")) {
|
||||||
const CList *head;
|
const CList *head;
|
||||||
|
|
@ -1248,7 +1266,8 @@ compute_hash(NMDnsManager *self, const NMGlobalDnsConfig *global, guint8 buffer[
|
||||||
nm_l3_config_data_hash_dns(ip_data->l3cd,
|
nm_l3_config_data_hash_dns(ip_data->l3cd,
|
||||||
sum,
|
sum,
|
||||||
ip_data->addr_family,
|
ip_data->addr_family,
|
||||||
ip_data->ip_config_type);
|
ip_data->ip_config_type,
|
||||||
|
has_global_dns_section);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1264,6 +1283,9 @@ merge_global_dns_config(NMResolvConfData *rc, NMGlobalDnsConfig *global_conf)
|
||||||
const char *const *servers;
|
const char *const *servers;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
|
/* Global config must be processed before connections' config */
|
||||||
|
nm_assert(rc->nameservers->len == 0);
|
||||||
|
|
||||||
if (!global_conf)
|
if (!global_conf)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
|
@ -1351,12 +1373,17 @@ _collect_resolv_conf_data(NMDnsManager *self,
|
||||||
.nis_servers = g_ptr_array_new(),
|
.nis_servers = g_ptr_array_new(),
|
||||||
.has_trust_ad = NM_TERNARY_DEFAULT,
|
.has_trust_ad = NM_TERNARY_DEFAULT,
|
||||||
};
|
};
|
||||||
|
gboolean has_global_dns_section = FALSE;
|
||||||
|
|
||||||
priv = NM_DNS_MANAGER_GET_PRIVATE(self);
|
priv = NM_DNS_MANAGER_GET_PRIVATE(self);
|
||||||
|
|
||||||
if (global_config)
|
if (global_config) {
|
||||||
merge_global_dns_config(&rc, global_config);
|
merge_global_dns_config(&rc, global_config);
|
||||||
|
has_global_dns_section = nm_global_dns_has_global_dns_section(global_config);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If global nameservers are defined, no DNS configs are used from connections at all,
|
||||||
|
* including searches and options. */
|
||||||
if (!global_config || !nm_global_dns_config_lookup_domain(global_config, "*")) {
|
if (!global_config || !nm_global_dns_config_lookup_domain(global_config, "*")) {
|
||||||
nm_auto_str_buf NMStrBuf tmp_strbuf = NM_STR_BUF_INIT(0, FALSE);
|
nm_auto_str_buf NMStrBuf tmp_strbuf = NM_STR_BUF_INIT(0, FALSE);
|
||||||
int first_prio = 0;
|
int first_prio = 0;
|
||||||
|
|
@ -1390,8 +1417,16 @@ _collect_resolv_conf_data(NMDnsManager *self,
|
||||||
skip ? "<SKIP>" : "",
|
skip ? "<SKIP>" : "",
|
||||||
get_nameserver_list(ip_data->addr_family, ip_data->l3cd, &tmp_strbuf));
|
get_nameserver_list(ip_data->addr_family, ip_data->l3cd, &tmp_strbuf));
|
||||||
|
|
||||||
if (!skip)
|
if (!skip) {
|
||||||
merge_one_l3cd(&rc, ip_data->addr_family, ip_data->data->ifindex, ip_data->l3cd);
|
/* Merge the configs from connections. However, if there was a [global-dns]
|
||||||
|
* it overwrites searches and options from the connections, thus we only
|
||||||
|
* merge the nameservers. */
|
||||||
|
merge_one_l3cd(&rc,
|
||||||
|
ip_data->addr_family,
|
||||||
|
ip_data->data->ifindex,
|
||||||
|
ip_data->l3cd,
|
||||||
|
has_global_dns_section);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1475,7 +1510,7 @@ _domain_track_is_shadowed(GHashTable *ht,
|
||||||
const char **out_parent,
|
const char **out_parent,
|
||||||
int *out_parent_priority)
|
int *out_parent_priority)
|
||||||
{
|
{
|
||||||
char *parent;
|
const char *parent;
|
||||||
int parent_priority;
|
int parent_priority;
|
||||||
|
|
||||||
if (!ht)
|
if (!ht)
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
static const char *const DBUS_OP_SET_LINK_DEFAULT_ROUTE = "SetLinkDefaultRoute";
|
static const char *const DBUS_OP_SET_LINK_DEFAULT_ROUTE = "SetLinkDefaultRoute";
|
||||||
static const char *const DBUS_OP_SET_LINK_DNS_OVER_TLS = "SetLinkDNSOverTLS";
|
static const char *const DBUS_OP_SET_LINK_DNS_OVER_TLS = "SetLinkDNSOverTLS";
|
||||||
static const char *const DBUS_OP_SET_LINK_DNS_EX = "SetLinkDNSEx";
|
static const char *const DBUS_OP_SET_LINK_DNS_EX = "SetLinkDNSEx";
|
||||||
|
static const char *const DBUS_OP_SET_LINK_DNSSEC = "SetLinkDNSSEC";
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
@ -398,7 +399,7 @@ update_add_ip_config(NMDnsSystemdResolved *self,
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
NMDnsServer dns_server;
|
NMDnsServer dns_server;
|
||||||
|
|
||||||
if (!nm_dns_uri_parse(ip_data->addr_family, strarr[i], &dns_server))
|
if (!nm_dns_uri_parse(ip_data->addr_family, strarr[i], &dns_server, NULL))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!NM_IN_SET(dns_server.scheme,
|
if (!NM_IN_SET(dns_server.scheme,
|
||||||
|
|
@ -484,9 +485,11 @@ prepare_one_interface(NMDnsSystemdResolved *self, const InterfaceConfig *ic)
|
||||||
NMSettingConnectionMdns mdns = NM_SETTING_CONNECTION_MDNS_DEFAULT;
|
NMSettingConnectionMdns mdns = NM_SETTING_CONNECTION_MDNS_DEFAULT;
|
||||||
NMSettingConnectionLlmnr llmnr = NM_SETTING_CONNECTION_LLMNR_DEFAULT;
|
NMSettingConnectionLlmnr llmnr = NM_SETTING_CONNECTION_LLMNR_DEFAULT;
|
||||||
NMSettingConnectionDnsOverTls dns_over_tls = NM_SETTING_CONNECTION_DNS_OVER_TLS_DEFAULT;
|
NMSettingConnectionDnsOverTls dns_over_tls = NM_SETTING_CONNECTION_DNS_OVER_TLS_DEFAULT;
|
||||||
|
NMSettingConnectionDnssec dnssec = NM_SETTING_CONNECTION_DNSSEC_DEFAULT;
|
||||||
const char *mdns_arg = NULL;
|
const char *mdns_arg = NULL;
|
||||||
const char *llmnr_arg = NULL;
|
const char *llmnr_arg = NULL;
|
||||||
const char *dns_over_tls_arg = NULL;
|
const char *dns_over_tls_arg = NULL;
|
||||||
|
const char *dnssec_arg = NULL;
|
||||||
gboolean has_config = FALSE;
|
gboolean has_config = FALSE;
|
||||||
gboolean has_default_route = FALSE;
|
gboolean has_default_route = FALSE;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
@ -517,6 +520,7 @@ prepare_one_interface(NMDnsSystemdResolved *self, const InterfaceConfig *ic)
|
||||||
llmnr = NM_MAX(llmnr, nm_l3_config_data_get_llmnr(ip_data->l3cd));
|
llmnr = NM_MAX(llmnr, nm_l3_config_data_get_llmnr(ip_data->l3cd));
|
||||||
dns_over_tls =
|
dns_over_tls =
|
||||||
NM_MAX(dns_over_tls, nm_l3_config_data_get_dns_over_tls(ip_data->l3cd));
|
NM_MAX(dns_over_tls, nm_l3_config_data_get_dns_over_tls(ip_data->l3cd));
|
||||||
|
dnssec = NM_MAX(dnssec, nm_l3_config_data_get_dnssec(ip_data->l3cd));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -589,8 +593,24 @@ prepare_one_interface(NMDnsSystemdResolved *self, const InterfaceConfig *ic)
|
||||||
}
|
}
|
||||||
nm_assert(dns_over_tls_arg);
|
nm_assert(dns_over_tls_arg);
|
||||||
|
|
||||||
|
switch (dnssec) {
|
||||||
|
case NM_SETTING_CONNECTION_DNSSEC_NO:
|
||||||
|
dnssec_arg = "no";
|
||||||
|
break;
|
||||||
|
case NM_SETTING_CONNECTION_DNSSEC_ALLOW_DOWNGRADE:
|
||||||
|
dnssec_arg = "allow-downgrade";
|
||||||
|
break;
|
||||||
|
case NM_SETTING_CONNECTION_DNSSEC_YES:
|
||||||
|
dnssec_arg = "yes";
|
||||||
|
break;
|
||||||
|
case NM_SETTING_CONNECTION_DNSSEC_DEFAULT:
|
||||||
|
dnssec_arg = "";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
nm_assert(dnssec_arg);
|
||||||
|
|
||||||
if (!nm_str_is_empty(mdns_arg) || !nm_str_is_empty(llmnr_arg)
|
if (!nm_str_is_empty(mdns_arg) || !nm_str_is_empty(llmnr_arg)
|
||||||
|| !nm_str_is_empty(dns_over_tls_arg))
|
|| !nm_str_is_empty(dns_over_tls_arg) || !nm_str_is_empty(dnssec_arg))
|
||||||
has_config = TRUE;
|
has_config = TRUE;
|
||||||
|
|
||||||
_request_item_append(self, "SetLinkDomains", ic->ifindex, g_variant_builder_end(&domains));
|
_request_item_append(self, "SetLinkDomains", ic->ifindex, g_variant_builder_end(&domains));
|
||||||
|
|
@ -618,6 +638,10 @@ prepare_one_interface(NMDnsSystemdResolved *self, const InterfaceConfig *ic)
|
||||||
DBUS_OP_SET_LINK_DNS_OVER_TLS,
|
DBUS_OP_SET_LINK_DNS_OVER_TLS,
|
||||||
ic->ifindex,
|
ic->ifindex,
|
||||||
g_variant_new("(is)", ic->ifindex, dns_over_tls_arg ?: ""));
|
g_variant_new("(is)", ic->ifindex, dns_over_tls_arg ?: ""));
|
||||||
|
_request_item_append(self,
|
||||||
|
DBUS_OP_SET_LINK_DNSSEC,
|
||||||
|
ic->ifindex,
|
||||||
|
g_variant_new("(is)", ic->ifindex, dnssec_arg ?: ""));
|
||||||
|
|
||||||
return has_config;
|
return has_config;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ nm_main_utils_write_pidfile(const char *pidfile)
|
||||||
char pid[16];
|
char pid[16];
|
||||||
|
|
||||||
nm_sprintf_buf(pid, "%lld", (long long) getpid());
|
nm_sprintf_buf(pid, "%lld", (long long) getpid());
|
||||||
if (!nm_utils_file_set_contents(pidfile, pid, -1, 00644, NULL, NULL, &error)) {
|
if (!nm_utils_file_set_contents(pidfile, pid, -1, 00644, NULL, NULL, NULL, &error)) {
|
||||||
fprintf(stderr, _("Writing to %s failed: %s\n"), pidfile, error->message);
|
fprintf(stderr, _("Writing to %s failed: %s\n"), pidfile, error->message);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -339,7 +339,7 @@ main(int argc, char *argv[])
|
||||||
char *path, *slash;
|
char *path, *slash;
|
||||||
int g;
|
int g;
|
||||||
|
|
||||||
/* exe is <basedir>/src/.libs/lt-NetworkManager, so chop off
|
/* exe is <builddir>/src/core/NetworkManager, so chop off
|
||||||
* the last three components */
|
* the last three components */
|
||||||
path = realpath("/proc/self/exe", NULL);
|
path = realpath("/proc/self/exe", NULL);
|
||||||
g_assert(path != NULL);
|
g_assert(path != NULL);
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
#include "libnm-systemd-shared/nm-sd-utils-shared.h"
|
#include "libnm-systemd-shared/nm-sd-utils-shared.h"
|
||||||
#include "nm-l3cfg.h"
|
#include "nm-l3cfg.h"
|
||||||
#include "nm-ndisc-private.h"
|
#include "nm-ndisc-private.h"
|
||||||
|
#include "nm-core-utils.h"
|
||||||
|
|
||||||
#define _NMLOG_PREFIX_NAME "ndisc-lndp"
|
#define _NMLOG_PREFIX_NAME "ndisc-lndp"
|
||||||
|
|
||||||
|
|
@ -27,6 +28,14 @@
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct ndp *ndp;
|
struct ndp *ndp;
|
||||||
GSource *event_source;
|
GSource *event_source;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
NMRateLimit pio_lft;
|
||||||
|
NMRateLimit mtu;
|
||||||
|
NMRateLimit omit_prefix;
|
||||||
|
NMRateLimit omit_dns;
|
||||||
|
NMRateLimit omit_dnssl;
|
||||||
|
} msg_ratelimit;
|
||||||
} NMLndpNDiscPrivate;
|
} NMLndpNDiscPrivate;
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
@ -49,6 +58,36 @@ G_DEFINE_TYPE(NMLndpNDisc, nm_lndp_ndisc, NM_TYPE_NDISC)
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we log a message about an invalid RA packet, don't repeat the same message
|
||||||
|
* at every packet received or sent. Rate limit the message to 6 every 12 hours
|
||||||
|
* per type and per ndisc instance.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define LOG_INV_RA_WINDOW (12 * 3600)
|
||||||
|
#define LOG_INV_RA_BURST 6
|
||||||
|
|
||||||
|
#define _LOG_INVALID_RA(ndisc, rate_limit, ...) \
|
||||||
|
G_STMT_START \
|
||||||
|
{ \
|
||||||
|
NMNDisc *__ndisc = (ndisc); \
|
||||||
|
NMRateLimit *__rl = (rate_limit); \
|
||||||
|
const char *__ifname = nm_ndisc_get_ifname(__ndisc); \
|
||||||
|
\
|
||||||
|
if (__ifname && nm_logging_enabled(LOGL_WARN, LOGD_IP6) \
|
||||||
|
&& nm_rate_limit_check(__rl, LOG_INV_RA_WINDOW, LOG_INV_RA_BURST)) { \
|
||||||
|
nm_log(LOGL_WARN, \
|
||||||
|
LOGD_IP6, \
|
||||||
|
__ifname, \
|
||||||
|
NULL, \
|
||||||
|
"ndisc (%s): " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \
|
||||||
|
__ifname _NM_UTILS_MACRO_REST(__VA_ARGS__)); \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
G_STMT_END
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
send_rs(NMNDisc *ndisc, GError **error)
|
send_rs(NMNDisc *ndisc, GError **error)
|
||||||
{
|
{
|
||||||
|
|
@ -113,6 +152,7 @@ static int
|
||||||
receive_ra(struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
|
receive_ra(struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
|
||||||
{
|
{
|
||||||
NMNDisc *ndisc = (NMNDisc *) user_data;
|
NMNDisc *ndisc = (NMNDisc *) user_data;
|
||||||
|
NMLndpNDiscPrivate *priv = NM_LNDP_NDISC_GET_PRIVATE(ndisc);
|
||||||
NMNDiscDataInternal *rdata = ndisc->rdata;
|
NMNDiscDataInternal *rdata = ndisc->rdata;
|
||||||
NMNDiscConfigMap changed = 0;
|
NMNDiscConfigMap changed = 0;
|
||||||
NMNDiscGateway gateway;
|
NMNDiscGateway gateway;
|
||||||
|
|
@ -219,9 +259,25 @@ receive_ra(struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
|
||||||
/* Address */
|
/* Address */
|
||||||
if (r_plen == 64 && ndp_msg_opt_prefix_flag_auto_addr_conf(msg, offset)) {
|
if (r_plen == 64 && ndp_msg_opt_prefix_flag_auto_addr_conf(msg, offset)) {
|
||||||
const guint32 valid_time = ndp_msg_opt_prefix_valid_time(msg, offset);
|
const guint32 valid_time = ndp_msg_opt_prefix_valid_time(msg, offset);
|
||||||
const guint32 preferred_time =
|
const guint32 preferred_time = ndp_msg_opt_prefix_preferred_time(msg, offset);
|
||||||
NM_MIN(ndp_msg_opt_prefix_preferred_time(msg, offset), valid_time);
|
NMNDiscAddress address;
|
||||||
const NMNDiscAddress address = {
|
|
||||||
|
/*
|
||||||
|
* RFC 4862 Section 5.5.3 states:
|
||||||
|
* c) If the preferred lifetime is greater than the valid lifetime,
|
||||||
|
* silently ignore the Prefix Information option. A node MAY wish to
|
||||||
|
* log a system management error in this case.
|
||||||
|
*/
|
||||||
|
if (preferred_time > valid_time) {
|
||||||
|
_LOG_INVALID_RA(
|
||||||
|
ndisc,
|
||||||
|
&priv->msg_ratelimit.pio_lft,
|
||||||
|
"ignoring Prefix Information Option with invalid lifetimes in received IPv6 "
|
||||||
|
"router advertisement");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
address = (NMNDiscAddress) {
|
||||||
.address = r_network,
|
.address = r_network,
|
||||||
.expiry_msec = _nm_ndisc_lifetime_to_expiry(now_msec, valid_time),
|
.expiry_msec = _nm_ndisc_lifetime_to_expiry(now_msec, valid_time),
|
||||||
.expiry_preferred_msec = _nm_ndisc_lifetime_to_expiry(now_msec, preferred_time),
|
.expiry_preferred_msec = _nm_ndisc_lifetime_to_expiry(now_msec, preferred_time),
|
||||||
|
|
@ -337,7 +393,11 @@ receive_ra(struct ndp *ndp, struct ndp_msg *msg, gpointer user_data)
|
||||||
* Kernel would set it, but would flush out all IPv6 addresses away
|
* Kernel would set it, but would flush out all IPv6 addresses away
|
||||||
* from the link, even the link-local, and we wouldn't be able to
|
* from the link, even the link-local, and we wouldn't be able to
|
||||||
* listen for further RAs that could fix the MTU. */
|
* listen for further RAs that could fix the MTU. */
|
||||||
_LOGW("MTU too small for IPv6 ignored: %d", mtu);
|
_LOG_INVALID_RA(ndisc,
|
||||||
|
&priv->msg_ratelimit.mtu,
|
||||||
|
"ignoring too small MTU %u in received IPv6 "
|
||||||
|
"router advertisement",
|
||||||
|
mtu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -433,8 +493,11 @@ send_ra(NMNDisc *ndisc, GError **error)
|
||||||
|
|
||||||
prefix = _ndp_msg_add_option(msg, sizeof(*prefix));
|
prefix = _ndp_msg_add_option(msg, sizeof(*prefix));
|
||||||
if (!prefix) {
|
if (!prefix) {
|
||||||
/* Maybe we could sent separate RAs, but why bother... */
|
/* Maybe we could send separate RAs, but why bother... */
|
||||||
_LOGW("The RA is too big, had to omit some some prefixes.");
|
_LOG_INVALID_RA(
|
||||||
|
ndisc,
|
||||||
|
&priv->msg_ratelimit.omit_prefix,
|
||||||
|
"the outgoing IPv6 router advertisement is too big: omitting some prefixes");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -463,7 +526,10 @@ send_ra(NMNDisc *ndisc, GError **error)
|
||||||
|
|
||||||
option = _ndp_msg_add_option(msg, len);
|
option = _ndp_msg_add_option(msg, len);
|
||||||
if (!option) {
|
if (!option) {
|
||||||
_LOGW("The RA is too big, had to omit DNS information.");
|
_LOG_INVALID_RA(
|
||||||
|
ndisc,
|
||||||
|
&priv->msg_ratelimit.omit_dns,
|
||||||
|
"the outgoing IPv6 router advertisement is too big: omitting DNS information");
|
||||||
goto dns_servers_done;
|
goto dns_servers_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -541,7 +607,10 @@ dns_servers_done:
|
||||||
nm_assert(len / 8u >= 2u);
|
nm_assert(len / 8u >= 2u);
|
||||||
|
|
||||||
if (len / 8u >= 256u || !(option = _ndp_msg_add_option(msg, len))) {
|
if (len / 8u >= 256u || !(option = _ndp_msg_add_option(msg, len))) {
|
||||||
_LOGW("The RA is too big, had to omit DNS search list.");
|
_LOG_INVALID_RA(
|
||||||
|
ndisc,
|
||||||
|
&priv->msg_ratelimit.omit_dnssl,
|
||||||
|
"the outgoing IPv6 router advertisement is too big: omitting DNS search list");
|
||||||
goto dns_domains_done;
|
goto dns_domains_done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1490,7 +1490,7 @@ clean_addresses(NMNDisc *ndisc, gint64 now_msec, NMNDiscConfigMap *changed, gint
|
||||||
g_array_set_size(rdata->addresses, j);
|
g_array_set_size(rdata->addresses, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_array_set_size_max(rdata->gateways, priv->config.max_addresses))
|
if (_array_set_size_max(rdata->addresses, priv->config.max_addresses))
|
||||||
*changed |= NM_NDISC_CONFIG_ADDRESSES;
|
*changed |= NM_NDISC_CONFIG_ADDRESSES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1830,7 +1830,7 @@ _config_init(NMNDiscConfig *config, const NMNDiscConfig *src)
|
||||||
nm_assert(config);
|
nm_assert(config);
|
||||||
g_return_if_fail(src);
|
g_return_if_fail(src);
|
||||||
|
|
||||||
/* we only allow to set @config if it was cleared (or is not yet initialized). */
|
/* we only allow one to set @config if it was cleared (or is not yet initialized). */
|
||||||
nm_assert(!config->l3cfg);
|
nm_assert(!config->l3cfg);
|
||||||
nm_assert(!config->ifname);
|
nm_assert(!config->ifname);
|
||||||
nm_assert(!config->network_id);
|
nm_assert(!config->network_id);
|
||||||
|
|
|
||||||
|
|
@ -882,7 +882,7 @@ nm_bond_manager_send_arp(int bond_ifindex,
|
||||||
.sll_protocol = htons(ETH_P_ARP),
|
.sll_protocol = htons(ETH_P_ARP),
|
||||||
.sll_ifindex = bond_ifindex,
|
.sll_ifindex = bond_ifindex,
|
||||||
};
|
};
|
||||||
ARPPacket data;
|
ARPPacket data = {0};
|
||||||
const guint8 *hwaddr;
|
const guint8 *hwaddr;
|
||||||
gsize hwaddrlen = 0;
|
gsize hwaddrlen = 0;
|
||||||
nm_auto_close int sockfd = -1;
|
nm_auto_close int sockfd = -1;
|
||||||
|
|
@ -918,19 +918,19 @@ nm_bond_manager_send_arp(int bond_ifindex,
|
||||||
* source/dest IPv4 address */
|
* source/dest IPv4 address */
|
||||||
int ifindexes[] = {bridge_ifindex, bond_ifindex};
|
int ifindexes[] = {bridge_ifindex, bond_ifindex};
|
||||||
int i;
|
int i;
|
||||||
gs_free NMEtherAddr **fdb_addrs = NULL;
|
nm_auto_freev NMEtherAddr **fdb_addrs = NULL;
|
||||||
|
|
||||||
fdb_addrs = nm_linux_platform_get_link_fdb_table(platform, ifindexes, 2);
|
fdb_addrs = nm_linux_platform_get_bridge_fdb(platform, ifindexes, 2);
|
||||||
/* we want to send a Reverse ARP (RARP) packet */
|
/* we want to send a Reverse ARP (RARP) packet */
|
||||||
data.op = htons(ARP_OP_RARP);
|
data.op = htons(ARP_OP_RARP);
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (fdb_addrs[i] != NULL) {
|
while (fdb_addrs[i] != NULL) {
|
||||||
NMEtherAddr *tmp_hwaddr = fdb_addrs[i];
|
NMEtherAddr *tmp_hwaddr = fdb_addrs[i];
|
||||||
|
|
||||||
memcpy(data.s_hw_addr, tmp_hwaddr, ETH_ALEN);
|
memcpy(data.s_hw_addr, tmp_hwaddr, ETH_ALEN);
|
||||||
memcpy(data.d_hw_addr, tmp_hwaddr, ETH_ALEN);
|
memcpy(data.d_hw_addr, tmp_hwaddr, ETH_ALEN);
|
||||||
memcpy(data.s_addr, tmp_hwaddr, ETH_ALEN);
|
memcpy(data.s_addr, tmp_hwaddr, ETH_ALEN);
|
||||||
g_free(tmp_hwaddr);
|
|
||||||
if (sendto(sockfd, &data, sizeof(data), 0, (struct sockaddr *) &addr, sizeof(addr)) < 0)
|
if (sendto(sockfd, &data, sizeof(data), 0, (struct sockaddr *) &addr, sizeof(addr)) < 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
i++;
|
i++;
|
||||||
|
|
@ -940,6 +940,7 @@ nm_bond_manager_send_arp(int bond_ifindex,
|
||||||
data.op = htons(ARP_OP_GARP);
|
data.op = htons(ARP_OP_GARP);
|
||||||
memcpy(data.s_addr, hwaddr, hwaddrlen);
|
memcpy(data.s_addr, hwaddr, hwaddrlen);
|
||||||
memcpy(data.s_hw_addr, hwaddr, hwaddrlen);
|
memcpy(data.s_hw_addr, hwaddr, hwaddrlen);
|
||||||
|
memset(data.d_hw_addr, 0xff, ETH_ALEN);
|
||||||
for (int i = 0; i < addrs_len; i++) {
|
for (int i = 0; i < addrs_len; i++) {
|
||||||
const in_addr_t tmp_addr = addrs_array[i];
|
const in_addr_t tmp_addr = addrs_array[i];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ parse_connection_from_shadowed_file(const char *path, GError **error)
|
||||||
{
|
{
|
||||||
nm_auto_unref_keyfile GKeyFile *keyfile = NULL;
|
nm_auto_unref_keyfile GKeyFile *keyfile = NULL;
|
||||||
gs_free char *base_dir = NULL;
|
gs_free char *base_dir = NULL;
|
||||||
char *sep;
|
const char *sep;
|
||||||
|
|
||||||
keyfile = g_key_file_new();
|
keyfile = g_key_file_new();
|
||||||
if (!g_key_file_load_from_file(keyfile, path, G_KEY_FILE_NONE, error))
|
if (!g_key_file_load_from_file(keyfile, path, G_KEY_FILE_NONE, error))
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,9 @@ struct _NMGlobalDnsConfig {
|
||||||
char **options;
|
char **options;
|
||||||
GHashTable *domains;
|
GHashTable *domains;
|
||||||
const char **domain_list;
|
const char **domain_list;
|
||||||
gboolean internal;
|
|
||||||
char *cert_authority;
|
char *cert_authority;
|
||||||
NMDnsResolveMode resolve_mode;
|
NMDnsResolveMode resolve_mode;
|
||||||
|
gboolean internal;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
@ -941,6 +941,14 @@ next:
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
nm_global_dns_has_global_dns_section(const NMGlobalDnsConfig *dns_config)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail(dns_config, FALSE);
|
||||||
|
|
||||||
|
return dns_config->searches != NULL || dns_config->options != NULL;
|
||||||
|
}
|
||||||
|
|
||||||
const char *const *
|
const char *const *
|
||||||
nm_global_dns_config_get_searches(const NMGlobalDnsConfig *dns_config)
|
nm_global_dns_config_get_searches(const NMGlobalDnsConfig *dns_config)
|
||||||
{
|
{
|
||||||
|
|
@ -1236,6 +1244,7 @@ load_global_dns(GKeyFile *keyfile, gboolean internal)
|
||||||
gs_free char *cert_authority = NULL;
|
gs_free char *cert_authority = NULL;
|
||||||
gs_free char *resolve_mode = NULL;
|
gs_free char *resolve_mode = NULL;
|
||||||
NMDnsResolveMode parsed_resolve_mode;
|
NMDnsResolveMode parsed_resolve_mode;
|
||||||
|
gboolean has_global_dns_section;
|
||||||
|
|
||||||
if (internal) {
|
if (internal) {
|
||||||
group = NM_CONFIG_KEYFILE_GROUP_INTERN_GLOBAL_DNS;
|
group = NM_CONFIG_KEYFILE_GROUP_INTERN_GLOBAL_DNS;
|
||||||
|
|
@ -1386,6 +1395,22 @@ load_global_dns(GKeyFile *keyfile, gboolean internal)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Defining [global-dns-domain-*] implies defining [global-dns] too (maybe empty) */
|
||||||
|
if (default_found)
|
||||||
|
has_global_dns_section = TRUE;
|
||||||
|
else
|
||||||
|
has_global_dns_section = g_key_file_has_group(keyfile, group);
|
||||||
|
|
||||||
|
/* If there exist a [global-dns] section, always initialize "searches" and "options" so
|
||||||
|
* they appear in D-Bus. Clients can use this to know if it's defined, so they can know
|
||||||
|
* if DNS configs from connections are relevant or not. */
|
||||||
|
if (has_global_dns_section) {
|
||||||
|
if (!dns_config->searches)
|
||||||
|
dns_config->searches = nm_strv_empty_new();
|
||||||
|
if (!dns_config->options)
|
||||||
|
dns_config->options = nm_strv_empty_new();
|
||||||
|
}
|
||||||
|
|
||||||
dns_config->internal = internal;
|
dns_config->internal = internal;
|
||||||
global_dns_config_seal_domains(dns_config);
|
global_dns_config_seal_domains(dns_config);
|
||||||
return dns_config;
|
return dns_config;
|
||||||
|
|
@ -1606,17 +1631,6 @@ nm_global_dns_config_from_dbus(const GValue *value, GError **error)
|
||||||
g_variant_unref(val);
|
g_variant_unref(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* An empty value is valid and clears the internal configuration */
|
|
||||||
if (!nm_global_dns_config_is_empty(dns_config)
|
|
||||||
&& !nm_global_dns_config_lookup_domain(dns_config, "*")) {
|
|
||||||
g_set_error_literal(error,
|
|
||||||
NM_MANAGER_ERROR,
|
|
||||||
NM_MANAGER_ERROR_FAILED,
|
|
||||||
"Global DNS configuration is missing the default domain");
|
|
||||||
nm_global_dns_config_free(dns_config);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
global_dns_config_seal_domains(dns_config);
|
global_dns_config_seal_domains(dns_config);
|
||||||
return dns_config;
|
return dns_config;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue