aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2025-04-01 19:57:08 +1100
committerStefano Brivio <sbrivio@redhat.com>2025-04-02 11:30:14 +0200
commit8aa2d90c8d95d0fa1dad7027fdf92b48a1bbf3c6 (patch)
tree87fa6b1cb2d9fd6416e87e38b02ef0e36f4d5cd2
parent3d41e4d8389578e5d5f3cf2e47b9ff9cdd29ffd1 (diff)
downloadpasst-8aa2d90c8d95d0fa1dad7027fdf92b48a1bbf3c6.tar
passt-8aa2d90c8d95d0fa1dad7027fdf92b48a1bbf3c6.tar.gz
passt-8aa2d90c8d95d0fa1dad7027fdf92b48a1bbf3c6.tar.bz2
passt-8aa2d90c8d95d0fa1dad7027fdf92b48a1bbf3c6.tar.lz
passt-8aa2d90c8d95d0fa1dad7027fdf92b48a1bbf3c6.tar.xz
passt-8aa2d90c8d95d0fa1dad7027fdf92b48a1bbf3c6.tar.zst
passt-8aa2d90c8d95d0fa1dad7027fdf92b48a1bbf3c6.zip
udp: Remove redundant udp_at_sidx() call in udp_tap_handler()
We've already have a pointer to the UDP flow in variable uflow, we can just re-use it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udp.c b/udp.c
index 39431d7..ac168db 100644
--- a/udp.c
+++ b/udp.c
@@ -907,7 +907,7 @@ int udp_tap_handler(const struct ctx *c, uint8_t pif,
}
toside = flowside_at_sidx(tosidx);
- s = udp_at_sidx(tosidx)->s[tosidx.sidei];
+ s = uflow->s[tosidx.sidei];
ASSERT(s >= 0);
pif_sockaddr(c, &to_sa, &sl, topif, &toside->eaddr, toside->eport);