<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/man, branch lr/asserts</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>cli: add color codes for deprecated features</title>
<updated>2022-03-13T17:23:44+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2022-03-08T11:23:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=cd7687ff60b150a85391812191d114ec8a39e5b8'/>
<id>cd7687ff60b150a85391812191d114ec8a39e5b8</id>
<content type='text'>
Follow-up commits are going color Wi-Fi networks and connections that rely
on deprecated features differently, to provide a visual cue.

Add color definitions for those.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow-up commits are going color Wi-Fi networks and connections that rely
on deprecated features differently, to provide a visual cue.

Add color definitions for those.
</pre>
</div>
</content>
</entry>
<entry>
<title>cli: document connection/device-external colors</title>
<updated>2022-03-09T13:18:26+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2022-03-08T09:48:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=d3d2e9b5089f202d590a071ca0d7919710c4f952'/>
<id>d3d2e9b5089f202d590a071ca0d7919710c4f952</id>
<content type='text'>
These were added without documentation.

Fixes: 16cff1149a76 ('core: fix taking over external connection after restart')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1137
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These were added without documentation.

Fixes: 16cff1149a76 ('core: fix taking over external connection after restart')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1137
</pre>
</div>
</content>
</entry>
<entry>
<title>man: add NetworkManager-wait-online.service.8 manual</title>
<updated>2022-03-02T15:09:16+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-03-02T10:05:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=df94cb2116234786d00a5d7149d796ed8a502cc2'/>
<id>df94cb2116234786d00a5d7149d796ed8a502cc2</id>
<content type='text'>
NetworkManager-wait-online is a constant source of confusion,
as it seems to delay the boot (when it's often just the messenger
or either a network problem, a NetworkManager misconfiguration
or a misconfiguration of other systemd services).

Try to clear that up with a manual page.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1130
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NetworkManager-wait-online is a constant source of confusion,
as it seems to delay the boot (when it's often just the messenger
or either a network problem, a NetworkManager misconfiguration
or a misconfiguration of other systemd services).

Try to clear that up with a manual page.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1130
</pre>
</div>
</content>
</entry>
<entry>
<title>man: reword documentation about logging level and domains in `man NetworkManager.conf`</title>
<updated>2022-02-28T16:33:38+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-02-28T09:01:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=bd92d9df240cd06e304e200181de2fac81186c98'/>
<id>bd92d9df240cd06e304e200181de2fac81186c98</id>
<content type='text'>
People keep reporting bugs with `level=DEBUG` or set to a certain
domains. That is generally not useful. Complete debug logs should be
collected, we can always ignore what we don't care about, but we might
miss important information by limiting what we collect.

Try to make that clearer in the manual.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
People keep reporting bugs with `level=DEBUG` or set to a certain
domains. That is generally not useful. Complete debug logs should be
collected, we can always ignore what we don't care about, but we might
miss important information by limiting what we collect.

Try to make that clearer in the manual.
</pre>
</div>
</content>
</entry>
<entry>
<title>man: mention "rd.znet_ifnames" option in `man nm-initrd-generator`</title>
<updated>2022-01-26T22:00:14+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2022-01-26T22:00:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=7895a9d7e2f239c1be32a0715a8deb670631e999'/>
<id>7895a9d7e2f239c1be32a0715a8deb670631e999</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>build: allow configuring default for wifi.backend setting</title>
<updated>2022-01-04T05:41:37+00:00</updated>
<author>
<name>James Hilliard</name>
<email>james.hilliard1@gmail.com</email>
</author>
<published>2021-12-03T01:34:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=edc37b3adf7d39057e7f06aa4ab736b38f7c8162'/>
<id>edc37b3adf7d39057e7f06aa4ab736b38f7c8162</id>
<content type='text'>
Distributions may want to change the default wifi.backend, if for
example they are building without wpa_supplicant support.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/869

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1040
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Distributions may want to change the default wifi.backend, if for
example they are building without wpa_supplicant support.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/869

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1040
</pre>
</div>
</content>
</entry>
<entry>
<title>initrd: don't add a connection if there's a connection dir with rd.neednet</title>
<updated>2021-12-01T14:13:16+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2021-11-02T14:27:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=79885656d32351baf194a511aea7335296f2de94'/>
<id>79885656d32351baf194a511aea7335296f2de94</id>
<content type='text'>
Only create a default connection with rd.neednet if we're starting with
a totally blank slate. Otherwise it could be that the user already
included configuration in the initrd and merely wants us to activate it.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/999
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only create a default connection with rd.neednet if we're starting with
a totally blank slate. Otherwise it could be that the user already
included configuration in the initrd and merely wants us to activate it.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/999
</pre>
</div>
</content>
</entry>
<entry>
<title>man: clarify "configure-and-quit" option in NetworkManager.conf</title>
<updated>2021-11-19T10:39:50+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2021-11-19T10:21:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=867bef5fe74278d463f5b9b3762635eabc5db07f'/>
<id>867bef5fe74278d463f5b9b3762635eabc5db07f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>core: add support for connection.dns-over-tls</title>
<updated>2021-10-15T08:00:31+00:00</updated>
<author>
<name>Robin Ebert</name>
<email>ebertrobin2002@gmail.com</email>
</author>
<published>2021-10-03T12:00:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=1a98cf1669de8c3c243ea3321fe71e997d08f6b0'/>
<id>1a98cf1669de8c3c243ea3321fe71e997d08f6b0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>cloud-setup: use suppress_prefixlength rule to honor non-default-routes in the main table</title>
<updated>2021-09-16T15:30:25+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2021-09-01T08:31:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=fe80b2d1ecd94639573a944633a5d960db316f60'/>
<id>fe80b2d1ecd94639573a944633a5d960db316f60</id>
<content type='text'>
Background
==========

Imagine you run a container on your machine. Then the routing table
might look like:

    default via 10.0.10.1 dev eth0 proto dhcp metric 100
    10.0.10.0/28 dev eth0 proto kernel scope link src 10.0.10.5 metric 100
    [...]
    10.42.0.0/24 via 10.42.0.0 dev flannel.1 onlink
    10.42.1.2 dev cali02ad7e68ce1 scope link
    10.42.1.3 dev cali8fcecf5aaff scope link
    10.42.2.0/24 via 10.42.2.0 dev flannel.1 onlink
    10.42.3.0/24 via 10.42.3.0 dev flannel.1 onlink

That is, there are another interfaces with subnets and specific routes.

If nm-cloud-setup now configures rules:

    0:  from all lookup local
    30400:  from 10.0.10.5 lookup 30400
    32766:  from all lookup main
    32767:  from all lookup default

and

    default via 10.0.10.1 dev eth0 table 30400 proto static metric 10
    10.0.10.1 dev eth0 table 30400 proto static scope link metric 10

then these other subnets will also be reached via the default route.

This container example is just one case where this is a problem. In
general, if you have specific routes on another interface, then the
default route in the 30400+ table will interfere badly.

The idea of nm-cloud-setup is to automatically configure the network for
secondary IP addresses. When the user has special requirements, then
they should disable nm-cloud-setup and configure whatever they want.
But the container use case is popular and important. It is not something
where the user actively configures the network. This case needs to work better,
out of the box. In general, nm-cloud-setup should work better with the
existing network configuration.

Change
======

Add new routing tables 30200+ with the individual subnets of the
interface:

    10.0.10.0/24 dev eth0 table 30200 proto static metric 10
    [...]
    default via 10.0.10.1 dev eth0 table 30400 proto static metric 10
    10.0.10.1 dev eth0 table 30400 proto static scope link metric 10

Also add more important routing rules with priority 30200+, which select
these tables based on the source address:

    30200:  from 10.0.10.5 lookup 30200

These will do source based routing for the subnets on these
interfaces.

Then, add a rule with priority 30350

    30350:  lookup main suppress_prefixlength 0

which processes the routes from the main table, but ignores the default
routes. 30350 was chosen, because it's in between the rules 30200+ and
30400+, leaving a range for the user to configure their own rules.

Then, as before, the rules 30400+ again look at the corresponding 30400+
table, to find a default route.

Finally, process the main table again, this time honoring the default
route. That is for packets that have a different source address.

This change means that the source based routing is used for the
subnets that are configured on the interface and for the default route.
Whereas, if there are any more specific routes in the main table, they will
be preferred over the default route.

Apparently Amazon Linux solves this differently, by not configuring a
routing table for addresses on interface "eth0". That might be an
alternative, but it's not clear to me what is special about eth0 to
warrant this treatment. It also would imply that we somehow recognize
this primary interface. In practise that would be doable by selecting
the interface with "iface_idx" zero.

Instead choose this approach. This is remotely similar to what WireGuard does
for configuring the default route ([1]), however WireGuard uses fwmark to match
the packets instead of the source address.

[1] https://www.wireguard.com/netns/#improved-rule-based-routing
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Background
==========

Imagine you run a container on your machine. Then the routing table
might look like:

    default via 10.0.10.1 dev eth0 proto dhcp metric 100
    10.0.10.0/28 dev eth0 proto kernel scope link src 10.0.10.5 metric 100
    [...]
    10.42.0.0/24 via 10.42.0.0 dev flannel.1 onlink
    10.42.1.2 dev cali02ad7e68ce1 scope link
    10.42.1.3 dev cali8fcecf5aaff scope link
    10.42.2.0/24 via 10.42.2.0 dev flannel.1 onlink
    10.42.3.0/24 via 10.42.3.0 dev flannel.1 onlink

That is, there are another interfaces with subnets and specific routes.

If nm-cloud-setup now configures rules:

    0:  from all lookup local
    30400:  from 10.0.10.5 lookup 30400
    32766:  from all lookup main
    32767:  from all lookup default

and

    default via 10.0.10.1 dev eth0 table 30400 proto static metric 10
    10.0.10.1 dev eth0 table 30400 proto static scope link metric 10

then these other subnets will also be reached via the default route.

This container example is just one case where this is a problem. In
general, if you have specific routes on another interface, then the
default route in the 30400+ table will interfere badly.

The idea of nm-cloud-setup is to automatically configure the network for
secondary IP addresses. When the user has special requirements, then
they should disable nm-cloud-setup and configure whatever they want.
But the container use case is popular and important. It is not something
where the user actively configures the network. This case needs to work better,
out of the box. In general, nm-cloud-setup should work better with the
existing network configuration.

Change
======

Add new routing tables 30200+ with the individual subnets of the
interface:

    10.0.10.0/24 dev eth0 table 30200 proto static metric 10
    [...]
    default via 10.0.10.1 dev eth0 table 30400 proto static metric 10
    10.0.10.1 dev eth0 table 30400 proto static scope link metric 10

Also add more important routing rules with priority 30200+, which select
these tables based on the source address:

    30200:  from 10.0.10.5 lookup 30200

These will do source based routing for the subnets on these
interfaces.

Then, add a rule with priority 30350

    30350:  lookup main suppress_prefixlength 0

which processes the routes from the main table, but ignores the default
routes. 30350 was chosen, because it's in between the rules 30200+ and
30400+, leaving a range for the user to configure their own rules.

Then, as before, the rules 30400+ again look at the corresponding 30400+
table, to find a default route.

Finally, process the main table again, this time honoring the default
route. That is for packets that have a different source address.

This change means that the source based routing is used for the
subnets that are configured on the interface and for the default route.
Whereas, if there are any more specific routes in the main table, they will
be preferred over the default route.

Apparently Amazon Linux solves this differently, by not configuring a
routing table for addresses on interface "eth0". That might be an
alternative, but it's not clear to me what is special about eth0 to
warrant this treatment. It also would imply that we somehow recognize
this primary interface. In practise that would be doable by selecting
the interface with "iface_idx" zero.

Instead choose this approach. This is remotely similar to what WireGuard does
for configuring the default route ([1]), however WireGuard uses fwmark to match
the packets instead of the source address.

[1] https://www.wireguard.com/netns/#improved-rule-based-routing
</pre>
</div>
</content>
</entry>
</feed>
