From 673bde1f213381fedd0d53946cfa35df9144075a Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 22 Aug 2023 15:29:52 +1000 Subject: tap: Don't clobber source address in tap6_handler() 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 Signed-off-by: Stefano Brivio --- tap.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'tap.c') diff --git a/tap.c b/tap.c index 760deb7..6a14692 100644 --- a/tap.c +++ b/tap.c @@ -818,8 +818,6 @@ resume: continue; } - *saddr = c->ip6.addr; - if (proto != IPPROTO_TCP && proto != IPPROTO_UDP) { tap_packet_debug(NULL, ip6h, NULL, proto, NULL, 1); continue; -- cgit v1.2.3