From: David Gibson <david@gibson.dropbear.id.au>
To: passt-dev@passt.top, Stefano Brivio <sbrivio@redhat.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH v2 1/7] tap: Don't clobber source address in tap6_handler()
Date: Fri, 11 Aug 2023 22:53:59 +1000 [thread overview]
Message-ID: <20230811125405.1364340-2-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20230811125405.1364340-1-david@gibson.dropbear.id.au>
In tap6_handler() saddr is initialized to the IPv6 source address from the
incoming packet. However part way through, but before organizing the
packet into a "sequence" we set it unconditionally to the guest's assigned
address. We don't do anything equivalent for IPv4.
This doesn't make a lot of sense: if the guest is using a different source
address it makes sense to consider these different sequences of packets and
we shouldn't try to combine them together.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
tap.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tap.c b/tap.c
index c5ec006..d8723c7 100644
--- a/tap.c
+++ b/tap.c
@@ -817,8 +817,6 @@ resume:
continue;
}
- *saddr = c->ip6.addr;
-
if (proto != IPPROTO_TCP && proto != IPPROTO_UDP) {
tap_packet_debug(NULL, ip6h, NULL, proto, NULL, 1);
continue;
--
@@ -817,8 +817,6 @@ resume:
continue;
}
- *saddr = c->ip6.addr;
-
if (proto != IPPROTO_TCP && proto != IPPROTO_UDP) {
tap_packet_debug(NULL, ip6h, NULL, proto, NULL, 1);
continue;
--
2.41.0
next prev parent reply other threads:[~2023-08-11 12:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 12:53 [PATCH v2 0/7] Flow Table Preliminaries David Gibson
2023-08-11 12:53 ` David Gibson [this message]
2023-08-11 12:54 ` [PATCH v2 2/7] tap: Pass source address to protocol handler functions David Gibson
2023-08-11 12:54 ` [PATCH v2 3/7] tcp: More precise terms for addresses and ports David Gibson
2023-08-11 12:54 ` [PATCH v2 4/7] tcp: Consistent usage of ports in tcp_seq_init() David Gibson
2023-08-11 12:54 ` [PATCH v2 5/7] tcp, udp: Don't include destination address in partially precomputed csums David Gibson
2023-08-11 12:54 ` [PATCH v2 6/7] tcp, udp: Don't pre-fill IPv4 destination address in headers David Gibson
2023-08-11 12:54 ` [PATCH v2 7/7] tcp: Move in_epoll flag out of common connection structure David Gibson
2023-08-17 3:37 ` [PATCH v2 0/7] Flow Table Preliminaries David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230811125405.1364340-2-david@gibson.dropbear.id.au \
--to=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).