<feed xmlns='http://www.w3.org/2005/Atom'>
<title>passt/udp_flow.c, branch 2026_12_04.a39d958</title>
<subtitle>Plug A Simple Socket Transport</subtitle>
<link rel='alternate' type='text/html' href='https://passt.top/passt/'/>
<entry>
<title>udp: Flush socket errors even after an intervening recvmmsg() clears the code</title>
<updated>2026-12-03T01:22:24+00:00</updated>
<author>
<name>Stefano Brivio</name>
<email>sbrivio@redhat.com</email>
</author>
<published>2026-12-03T01:22:24+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=111029829f8761cd0ccd7c5f8648ad0e9527841b'/>
<id>111029829f8761cd0ccd7c5f8648ad0e9527841b</id>
<content type='text'>
Gonzalo reports that if a socket error occurs (for example, due to an
ICMP message) between udp_sock_errs() and a subsequent recvmmsg()
call, coming from udp_sock_recv(), the recvmmsg() call will clear the
socket error code, but not the queue.

At this point, once we're done handling the socket events, EPOLLERR is
still set, so udp_listen_sock_handler(), and, in turn, udp_sock_fwd(),
will be called again, but the recvmsg() call in udp_peek_addr() won't
report any actual error (rather EAGAIN).

As a result, we won't call udp_sock_errs() and leave the error in the
queue.  This leads to a event processing loop, until a further error
is reported.

This is a consequence of 04984578b00f ("udp: Deal with errors as we go
in udp_sock_fwd()"): earlier, udp_sock_errs() would be called on any
EPOLLERR event.  But now that we clear errors as we iterate through
udp_peek_addr() calls, we don't necessarily do that anymore.

This part is still desirable, so, instead of going back to an initial
out-of-order call to udp_sock_errs() on EPOLLERR, keep the processing
order as it is, but make sure that we'll call udp_sock_errs() at least
once per event handling cycle, whenever EPOLLERR was set on the
socket.

This way, if the error code vanished because of an intervening
recvmmsg() call, we will still be able to clear queued errors.

Link: https://bugs.passt.top/show_bug.cgi?id=228
Reported-by: Gonzalo Rivas Valenzuela &lt;grv@jessica.cl&gt;
Fixes: 04984578b00f ("udp: Deal with errors as we go in udp_sock_fwd()"
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Gonzalo reports that if a socket error occurs (for example, due to an
ICMP message) between udp_sock_errs() and a subsequent recvmmsg()
call, coming from udp_sock_recv(), the recvmmsg() call will clear the
socket error code, but not the queue.

At this point, once we're done handling the socket events, EPOLLERR is
still set, so udp_listen_sock_handler(), and, in turn, udp_sock_fwd(),
will be called again, but the recvmsg() call in udp_peek_addr() won't
report any actual error (rather EAGAIN).

As a result, we won't call udp_sock_errs() and leave the error in the
queue.  This leads to a event processing loop, until a further error
is reported.

This is a consequence of 04984578b00f ("udp: Deal with errors as we go
in udp_sock_fwd()"): earlier, udp_sock_errs() would be called on any
EPOLLERR event.  But now that we clear errors as we iterate through
udp_peek_addr() calls, we don't necessarily do that anymore.

This part is still desirable, so, instead of going back to an initial
out-of-order call to udp_sock_errs() on EPOLLERR, keep the processing
order as it is, but make sure that we'll call udp_sock_errs() at least
once per event handling cycle, whenever EPOLLERR was set on the
socket.

This way, if the error code vanished because of an intervening
recvmmsg() call, we will still be able to clear queued errors.

Link: https://bugs.passt.top/show_bug.cgi?id=228
Reported-by: Gonzalo Rivas Valenzuela &lt;grv@jessica.cl&gt;
Fixes: 04984578b00f ("udp: Deal with errors as we go in udp_sock_fwd()"
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udp: Keep sharing source ports we forward ourselves</title>
<updated>2026-12-02T21:58:25+00:00</updated>
<author>
<name>Jon Maloy</name>
<email>jmaloy@redhat.com</email>
</author>
<published>2026-12-01T23:52:02+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=ffb4d5f7f68e455cc300b4285b5bef89f6d87ec0'/>
<id>ffb4d5f7f68e455cc300b4285b5bef89f6d87ec0</id>
<content type='text'>
The previous change binds the host side socket of a flow initiated from
the tap interface exclusively, and falls back to a port picked by the
kernel if the guest's source port is already in use. This fixes the
case of several passt instances sharing the same port towards the same
destination, and the case of a foreign socket holding the port, such as
the one of Podman's rootlessport process forwarding a port to the
container.

However, if we forward that port ourselves, the exclusive bind now also
fails against our own listening socket, so we stop preserving the
source port exactly where it matters: peers might reach us back at the
source port of our packets, as nodes in BitTorrent's DHT do, and an
ephemeral port doesn't accept new traffic.

Sharing a port with our own listening socket is safe: the flow socket
is connected, so it always takes precedence over the listening socket
for replies from its peer, while any other traffic still reaches the
listening socket.

If the exclusive bind fails, check if we have a listening socket for
the source port of the flow, in the forwarding table of the
corresponding interface, and if we do, bind the flow socket with
SO_REUSEADDR instead, as we did before the previous change, rather
than falling back to an ephemeral port. Check for the listening socket
itself, not just for a matching rule, so that a port we failed to bind
for listening, or one we're not currently listening on with automatic
forwarding, still results in the fallback.

Do this only on failure, so that we don't need to look up forwarding
rules for every new flow.

Reported-by: Bug C &lt;bugchaser123@proton.me&gt;
Link: https://bugs.passt.top/show_bug.cgi?id=223
Suggested-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Signed-off-by: Jon Maloy &lt;jmaloy@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous change binds the host side socket of a flow initiated from
the tap interface exclusively, and falls back to a port picked by the
kernel if the guest's source port is already in use. This fixes the
case of several passt instances sharing the same port towards the same
destination, and the case of a foreign socket holding the port, such as
the one of Podman's rootlessport process forwarding a port to the
container.

However, if we forward that port ourselves, the exclusive bind now also
fails against our own listening socket, so we stop preserving the
source port exactly where it matters: peers might reach us back at the
source port of our packets, as nodes in BitTorrent's DHT do, and an
ephemeral port doesn't accept new traffic.

Sharing a port with our own listening socket is safe: the flow socket
is connected, so it always takes precedence over the listening socket
for replies from its peer, while any other traffic still reaches the
listening socket.

If the exclusive bind fails, check if we have a listening socket for
the source port of the flow, in the forwarding table of the
corresponding interface, and if we do, bind the flow socket with
SO_REUSEADDR instead, as we did before the previous change, rather
than falling back to an ephemeral port. Check for the listening socket
itself, not just for a matching rule, so that a port we failed to bind
for listening, or one we're not currently listening on with automatic
forwarding, still results in the fallback.

Do this only on failure, so that we don't need to look up forwarding
rules for every new flow.

Reported-by: Bug C &lt;bugchaser123@proton.me&gt;
Link: https://bugs.passt.top/show_bug.cgi?id=223
Suggested-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Signed-off-by: Jon Maloy &lt;jmaloy@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udp: Don't share a preserved source port with other sockets</title>
<updated>2026-12-02T21:58:01+00:00</updated>
<author>
<name>Gerwim Feiken</name>
<email>info@gerwim.nl</email>
</author>
<published>2026-12-01T23:52:01+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=3f594423487c44db8d78748922cfb614b4b77518'/>
<id>3f594423487c44db8d78748922cfb614b4b77518</id>
<content type='text'>
For a UDP flow initiated from the guest, passt keeps the guest's
source port on the host side (fwd_nat_from_tap()) and binds the flow
socket with SO_REUSEADDR (sock_l4_()). Several passt instances in one
network namespace -- one per VM, as a VM manager spawning passt from
one daemon does -- can then each bind the same port towards the same
destination, typically the resolver behind --dns-forward. Their
sockets share one identical 4-tuple, and the kernel delivers each
reply to only one of them: the other guest's queries go unanswered
until the flow expires, and the guest owning the receiving socket gets
answers to queries it never sent.

Bind the host side socket of a flow initiated from the tap interface
without SO_REUSEADDR, so that the bind fails if any other socket holds
the port, and fall back to a port chosen by the kernel in that case.
udp_flow_new() reads the actual port back with getsockname(), as it
already does for the address. Listening sockets, and flows initiated
from them, keep SO_REUSEADDR.

Link: https://bugs.passt.top/show_bug.cgi?id=223
Signed-off-by: Gerwim Feiken &lt;info@gerwim.nl&gt;
[jmaloy: Don't pass 'exclusive' through the PIF_SPLICE path in
 flowside_sock_l4(): flows initiated from the tap interface never
 target it, assert that instead]
Signed-off-by: Jon Maloy &lt;jmaloy@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For a UDP flow initiated from the guest, passt keeps the guest's
source port on the host side (fwd_nat_from_tap()) and binds the flow
socket with SO_REUSEADDR (sock_l4_()). Several passt instances in one
network namespace -- one per VM, as a VM manager spawning passt from
one daemon does -- can then each bind the same port towards the same
destination, typically the resolver behind --dns-forward. Their
sockets share one identical 4-tuple, and the kernel delivers each
reply to only one of them: the other guest's queries go unanswered
until the flow expires, and the guest owning the receiving socket gets
answers to queries it never sent.

Bind the host side socket of a flow initiated from the tap interface
without SO_REUSEADDR, so that the bind fails if any other socket holds
the port, and fall back to a port chosen by the kernel in that case.
udp_flow_new() reads the actual port back with getsockname(), as it
already does for the address. Listening sockets, and flows initiated
from them, keep SO_REUSEADDR.

Link: https://bugs.passt.top/show_bug.cgi?id=223
Signed-off-by: Gerwim Feiken &lt;info@gerwim.nl&gt;
[jmaloy: Don't pass 'exclusive' through the PIF_SPLICE path in
 flowside_sock_l4(): flows initiated from the tap interface never
 target it, assert that instead]
Signed-off-by: Jon Maloy &lt;jmaloy@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udp: Add missing @now parameter doc to udp_flow_from_tap()</title>
<updated>2026-09-25T21:03:06+00:00</updated>
<author>
<name>Laurent Vivier</name>
<email>lvivier@redhat.com</email>
</author>
<published>2026-09-23T14:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=df90211db4b08a06ed4e499ffa40bf8811100a2f'/>
<id>df90211db4b08a06ed4e499ffa40bf8811100a2f</id>
<content type='text'>
udp_flow_from_tap() takes a @now parameter but its doc comment
omits it.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
udp_flow_from_tap() takes a @now parameter but its doc comment
omits it.

Signed-off-by: Laurent Vivier &lt;lvivier@redhat.com&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udp_flow: Remove obsolete comment</title>
<updated>2026-09-08T14:11:20+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-08-18T04:35:13+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=67dfdbd8f9bad173c874d61aefd43cceadeae259'/>
<id>67dfdbd8f9bad173c874d61aefd43cceadeae259</id>
<content type='text'>
This comment was true - although the upshot was not particularly clear -
when it was introduced.  However, for other reaosns we now *do* always
populate ini-&gt;oaddr from flow_initiate_sa().  So rather than explaning
why we can't, we can actually validate ini-&gt;oaddr.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This comment was true - although the upshot was not particularly clear -
when it was introduced.  However, for other reaosns we now *do* always
populate ini-&gt;oaddr from flow_initiate_sa().  So rather than explaning
why we can't, we can actually validate ini-&gt;oaddr.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>udp: Validate that we have a unicast source address</title>
<updated>2026-07-14T23:22:47+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-07-13T05:38:53+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=66fdabd85c3eac3a87979f05484de2c90af9a272'/>
<id>66fdabd85c3eac3a87979f05484de2c90af9a272</id>
<content type='text'>
When creating a UDP flow from a socket we, correctly, check that the source
address is unicast - multicast addresses are not valid as a source address.
However, when creating a flow from tap we only check the source address
is specified, not that it is unicast.  Correct this.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When creating a UDP flow from a socket we, correctly, check that the source
address is unicast - multicast addresses are not valid as a source address.
However, when creating a flow from tap we only check the source address
is specified, not that it is unicast.  Correct this.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>flow, treewide: Promote priority of selected flow-linked messages</title>
<updated>2026-06-22T07:13:46+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-06-19T15:26:25+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=74863b01d304beda59d7a7bc9cfa887683fedd95'/>
<id>74863b01d304beda59d7a7bc9cfa887683fedd95</id>
<content type='text'>
Most of out flow specific log messages are debug level for fear of flooding
the logs, even when they report real error conditions that might be off
significance.

Now that we have the mechanisms for log message rate limiting, we can do
better.  Promote many flow related messages to warning or error level, with
rate limiting.  While we're there add ratelimiting to a handful of existing
warning or error level messages.

They general heuristic is to promote messages that report a failure which
is not something that should be triggered by the guest doing something
weird.  This mostly means failures from socket operations we expect to be
legitimate.

Adding the ratelimiting means plumbing the 'now' timestamp through much
more of the code, hence the large churn.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Most of out flow specific log messages are debug level for fear of flooding
the logs, even when they report real error conditions that might be off
significance.

Now that we have the mechanisms for log message rate limiting, we can do
better.  Promote many flow related messages to warning or error level, with
rate limiting.  While we're there add ratelimiting to a handful of existing
warning or error level messages.

They general heuristic is to promote messages that report a failure which
is not something that should be triggered by the guest doing something
weird.  This mostly means failures from socket operations we expect to be
legitimate.

Adding the ratelimiting means plumbing the 'now' timestamp through much
more of the code, hence the large churn.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>flow, udp: Fix errno handling in udp_flow_sock()</title>
<updated>2026-06-22T07:13:46+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-06-19T15:26:24+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=60cd39a5a8ce4ea0f1b6ca33d1c99aa6a780e713'/>
<id>60cd39a5a8ce4ea0f1b6ca33d1c99aa6a780e713</id>
<content type='text'>
flowside_connect() behaves much like connect(2) itself, returning -1 on
error with errno set to the error code.  One of the callers, in
udp_flow_sock(), uses the errno code with flow_dbg_perror() *after* it's
called epoll_del() and close() either of which could clobber errno.

Fix that by moving the debug message earlier: there's no reason it has to
wait until the epoll_del() and close().

While we're at it, adjust the comment on flowside_connect() to clarify
that it sets errno (rather than, say, returning an error code).

Suggested-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
flowside_connect() behaves much like connect(2) itself, returning -1 on
error with errno set to the error code.  One of the callers, in
udp_flow_sock(), uses the errno code with flow_dbg_perror() *after* it's
called epoll_del() and close() either of which could clobber errno.

Fix that by moving the debug message earlier: there's no reason it has to
wait until the epoll_del() and close().

While we're at it, adjust the comment on flowside_connect() to clarify
that it sets errno (rather than, say, returning an error code).

Suggested-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tap, tcp, udp: Use rate-limited logging</title>
<updated>2026-04-15T18:59:35+00:00</updated>
<author>
<name>Anshu Kumari</name>
<email>anskuma@redhat.com</email>
</author>
<published>2026-04-10T10:37:37+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=5ac9cf11a512e6d54c94a2e6a7ddaabc10cb5b9b'/>
<id>5ac9cf11a512e6d54c94a2e6a7ddaabc10cb5b9b</id>
<content type='text'>
Now that rate-limited logging macros are available, promote several
debug messages to higher severity levels.  These messages were
previously kept at debug to prevent guests from flooding host
logs, but with rate limiting they can safely be made visible in
normal operation.

In tap.c, refactor tap4_is_fragment() to use warn_ratelimit() instead
of its ad-hoc rate limiting, and promote the guest MAC address change
message to info level.

In tcp.c, promote the invalid TCP SYN endpoint message to warn level.

In udp.c, promote dropped datagram messages to warn level, and
rate-limit the unrecoverable socket error message.

In udp_flow.c, promote flow allocation failures to err_ratelimit.

Link: https://bugs.passt.top/show_bug.cgi?id=134
Signed-off-by: Anshu Kumari &lt;anskuma@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that rate-limited logging macros are available, promote several
debug messages to higher severity levels.  These messages were
previously kept at debug to prevent guests from flooding host
logs, but with rate limiting they can safely be made visible in
normal operation.

In tap.c, refactor tap4_is_fragment() to use warn_ratelimit() instead
of its ad-hoc rate limiting, and promote the guest MAC address change
message to info level.

In tcp.c, promote the invalid TCP SYN endpoint message to warn level.

In udp.c, promote dropped datagram messages to warn level, and
rate-limit the unrecoverable socket error message.

In udp_flow.c, promote flow allocation failures to err_ratelimit.

Link: https://bugs.passt.top/show_bug.cgi?id=134
Signed-off-by: Anshu Kumari &lt;anskuma@redhat.com&gt;
Reviewed-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: Spell ASSERT() as assert()</title>
<updated>2026-03-20T20:05:29+00:00</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2026-03-19T06:11:43+00:00</published>
<link rel='alternate' type='text/html' href='https://passt.top/passt/commit/?id=bc872d91765dfd6ff34b0e9a34bce410fac1cef3'/>
<id>bc872d91765dfd6ff34b0e9a34bce410fac1cef3</id>
<content type='text'>
The standard library assert(3), at least with glibc, hits our seccomp
filter and dies with SIGSYS before it's able to print a message, making it
near useless.  Therefore, since 7a8ed9459dfe ("Make assertions actually
useful") we've instead used our own implementation, named ASSERT().

This makes our code look slightly odd though - ASSERT() has the same
overall effect as assert(), it's just a different implementation.  More
importantly this makes it awkward to share code between passt/pasta proper
and things that compile in a more typical environment.  We're going to want
that for our upcoming dynamic configuration tool.

Address this by overriding the standard library's assert() implementation
with our own, instead of giving ours its own name.

The standard assert() is supposed to be omitted if NDEBUG is defined,
which ours doesn't do.  Implement that as well, so ours doesn't
unexpectedly differ.  For the -DNDEBUG case we do this by *not* overriding
assert(), since it will be a no-op anyway.  This requires a few places to
add a #include &lt;assert.h&gt; to let us compile (albeit with warnings) when
-DNDEBUG.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
[sbrivio: Fix some conflicts and missing conversions as a result of
 applying "vu_common: Move iovec management into vu_collect()" first]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The standard library assert(3), at least with glibc, hits our seccomp
filter and dies with SIGSYS before it's able to print a message, making it
near useless.  Therefore, since 7a8ed9459dfe ("Make assertions actually
useful") we've instead used our own implementation, named ASSERT().

This makes our code look slightly odd though - ASSERT() has the same
overall effect as assert(), it's just a different implementation.  More
importantly this makes it awkward to share code between passt/pasta proper
and things that compile in a more typical environment.  We're going to want
that for our upcoming dynamic configuration tool.

Address this by overriding the standard library's assert() implementation
with our own, instead of giving ours its own name.

The standard assert() is supposed to be omitted if NDEBUG is defined,
which ours doesn't do.  Implement that as well, so ours doesn't
unexpectedly differ.  For the -DNDEBUG case we do this by *not* overriding
assert(), since it will be a no-op anyway.  This requires a few places to
add a #include &lt;assert.h&gt; to let us compile (albeit with warnings) when
-DNDEBUG.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
[sbrivio: Fix some conflicts and missing conversions as a result of
 applying "vu_common: Move iovec management into vu_collect()" first]
Signed-off-by: Stefano Brivio &lt;sbrivio@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
