<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/docker.git/libnetwork/netutils, branch master</title>
<subtitle>github.com: dotcloud/docker.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/'/>
<entry>
<title>libnetwork/netutils: remove dead code</title>
<updated>2023-04-06T17:33:04+00:00</updated>
<author>
<name>Albin Kerouanton</name>
<email>albinker@gmail.com</email>
</author>
<published>2023-02-09T15:47:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=f8b5fe572492244fb3e62caa64cac98dd333478d'/>
<id>f8b5fe572492244fb3e62caa64cac98dd333478d</id>
<content type='text'>
- GetIfaceAddr is unused since moby/libnetwork@e51ead59
  (moby/libnetwork#670).
- ValidateAlias and ParseAlias are unused since moby/moby@0645eb84
  (moby/moby#42539).

Signed-off-by: Albin Kerouanton &lt;albinker@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- GetIfaceAddr is unused since moby/libnetwork@e51ead59
  (moby/libnetwork#670).
- ValidateAlias and ParseAlias are unused since moby/moby@0645eb84
  (moby/moby#42539).

Signed-off-by: Albin Kerouanton &lt;albinker@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libnetwork/netutils: drop ElectInterfaceAddresses</title>
<updated>2023-03-31T07:37:03+00:00</updated>
<author>
<name>Albin Kerouanton</name>
<email>albinker@gmail.com</email>
</author>
<published>2023-03-31T07:23:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=f6b50d52d42d0b91fb48cf6fa6838df4d4c8410a'/>
<id>f6b50d52d42d0b91fb48cf6fa6838df4d4c8410a</id>
<content type='text'>
This is a follow-up of 48ad9e1. This commit removed the function
ElectInterfaceAddresses from utils_linux.go but not their FreeBSD &amp;
Windows counterpart. As these functions are never called, they can be
safely removed.

Signed-off-by: Albin Kerouanton &lt;albinker@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a follow-up of 48ad9e1. This commit removed the function
ElectInterfaceAddresses from utils_linux.go but not their FreeBSD &amp;
Windows counterpart. As these functions are never called, they can be
safely removed.

Signed-off-by: Albin Kerouanton &lt;albinker@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libnw/ipamutils: make local defaults immutable</title>
<updated>2023-01-26T19:56:12+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2023-01-17T01:09:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=e8011d787205bd106b85e996a0a86b89fc05e07c'/>
<id>e8011d787205bd106b85e996a0a86b89fc05e07c</id>
<content type='text'>
ConfigLocalScopeDefaultNetworks is now dead code, thank goodness! Make
sure it stays dead by deleting the function. Refactor package ipamutils
to simplify things given its newly-reduced (ahem) scope.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ConfigLocalScopeDefaultNetworks is now dead code, thank goodness! Make
sure it stays dead by deleting the function. Refactor package ipamutils
to simplify things given its newly-reduced (ahem) scope.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libnetwork/netutils: drop ElectInterfaceAddresses</title>
<updated>2023-01-26T19:56:11+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2023-01-17T00:04:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=48ad9e19e479ae25b1ff4b8a419131d319205192'/>
<id>48ad9e19e479ae25b1ff4b8a419131d319205192</id>
<content type='text'>
The function references global shared, mutable state and is no longer
needed. Deleting it brings us one step closer to getting rid of that
pesky shared state.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function references global shared, mutable state and is no longer
needed. Deleting it brings us one step closer to getting rid of that
pesky shared state.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libnetwork/netutils: clean up GenerateIfaceName</title>
<updated>2023-01-24T19:44:17+00:00</updated>
<author>
<name>Bjorn Neergaard</name>
<email>bneergaard@mirantis.com</email>
</author>
<published>2023-01-21T23:23:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=b3e6aa9316188fc539e3be9ee8be37acf88db92c'/>
<id>b3e6aa9316188fc539e3be9ee8be37acf88db92c</id>
<content type='text'>
netlink offers the netlink.LinkNotFoundError type, which we can use with
errors.As() to detect a unused link name.

Additionally, early return if GenerateRandomName fails, as reading
random bytes should be a highly reliable operation, and otherwise the
error would be swallowed by the fall-through return.

Signed-off-by: Bjorn Neergaard &lt;bneergaard@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
netlink offers the netlink.LinkNotFoundError type, which we can use with
errors.As() to detect a unused link name.

Additionally, early return if GenerateRandomName fails, as reading
random bytes should be a highly reliable operation, and otherwise the
error would be swallowed by the fall-through return.

Signed-off-by: Bjorn Neergaard &lt;bneergaard@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libnetwork/netutils: refactor GenerateRandomName</title>
<updated>2023-01-24T19:44:14+00:00</updated>
<author>
<name>Bjorn Neergaard</name>
<email>bneergaard@mirantis.com</email>
</author>
<published>2023-01-21T23:04:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=37759393032cdb0c4bbf1d05fcd2eb2f856c3d26'/>
<id>37759393032cdb0c4bbf1d05fcd2eb2f856c3d26</id>
<content type='text'>
GenerateRandomName now uses length to represent the overall length of
the string; this will help future users avoid creating interface names
that are too long for the kernel to accept by mistake. The test coverage
is increased and cleaned up using gotest.tools.

Signed-off-by: Bjorn Neergaard &lt;bneergaard@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GenerateRandomName now uses length to represent the overall length of
the string; this will help future users avoid creating interface names
that are too long for the kernel to accept by mistake. The test coverage
is increased and cleaned up using gotest.tools.

Signed-off-by: Bjorn Neergaard &lt;bneergaard@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #44239 from thaJeztah/resolvconf_refactor_step2</title>
<updated>2022-12-22T21:18:47+00:00</updated>
<author>
<name>Tianon Gravi</name>
<email>admwiggin@gmail.com</email>
</author>
<published>2022-12-22T21:18:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=bcb8f69cc55174eaf131a60de15bdcda66d36f51'/>
<id>bcb8f69cc55174eaf131a60de15bdcda66d36f51</id>
<content type='text'>
libnetwork: simplify handling of reading resolv.conf</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libnetwork: simplify handling of reading resolv.conf</pre>
</div>
</content>
</entry>
<entry>
<title>libnetwork/netutils: FindAvailableNetwork(): simplify reading of resolv.conf</title>
<updated>2022-11-29T19:10:43+00:00</updated>
<author>
<name>Sebastiaan van Stijn</name>
<email>github@gone.nl</email>
</author>
<published>2022-10-01T19:37:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=0f0fce5dccee23a7de80db9a47edb23d498b4f6e'/>
<id>0f0fce5dccee23a7de80db9a47edb23d498b4f6e</id>
<content type='text'>
We only need the content here, not the checksum, so simplifying the code by
just using os.ReadFile().

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We only need the content here, not the checksum, so simplifying the code by
just using os.ReadFile().

Signed-off-by: Sebastiaan van Stijn &lt;github@gone.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libnetwork: stop caching global netlink handle</title>
<updated>2022-11-08T22:58:06+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2022-11-07T22:32:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=1b64f2e28b630defb19e4310f741f64bce5ea84c'/>
<id>1b64f2e28b630defb19e4310f741f64bce5ea84c</id>
<content type='text'>
The global netlink handle ns.NlHandle() is indirectly cached for the
life of the process by the netutils.CheckRouteOverlaps() function. This
caching behaviour is a problem for the libnetwork unit tests as the
global netlink handle changes every time testutils.SetupTestOSContext()
is called, i.e. at the start of nearly every test case. Route overlaps
can be checked for in the wrong network namespace, causing spurious test
failures e.g. when running the same test twice in a row with -count=2.
Stop the netlink handle from being cached by shadowing the package-scope
variable with a function-scoped one.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The global netlink handle ns.NlHandle() is indirectly cached for the
life of the process by the netutils.CheckRouteOverlaps() function. This
caching behaviour is a problem for the libnetwork unit tests as the
global netlink handle changes every time testutils.SetupTestOSContext()
is called, i.e. at the start of nearly every test case. Route overlaps
can be checked for in the wrong network namespace, causing spurious test
failures e.g. when running the same test twice in a row with -count=2.
Stop the netlink handle from being cached by shadowing the package-scope
variable with a function-scoped one.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>libnetwork: drop InitOSContext()</title>
<updated>2022-10-25T17:35:44+00:00</updated>
<author>
<name>Cory Snider</name>
<email>csnider@mirantis.com</email>
</author>
<published>2022-10-24T18:42:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/docker.git/commit/?id=22529b81f81214fdb69ca3cb66db1aae69ccad91'/>
<id>22529b81f81214fdb69ca3cb66db1aae69ccad91</id>
<content type='text'>
The function is a no-op on all platforms.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function is a no-op on all platforms.

Signed-off-by: Cory Snider &lt;csnider@mirantis.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
