diff options
author | Laurent Vivier <lvivier@redhat.com> | 2025-09-02 09:52:31 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2025-09-03 20:42:28 +0200 |
commit | f8860bb099abbc3d999a53c0801cf52d15dcb720 (patch) | |
tree | 09e62893c928480b2d14bdee1cb157e5ec332e9b | |
parent | 1fc944ce18699e87fa9924762d1d93814b659f73 (diff) | |
download | passt-f8860bb099abbc3d999a53c0801cf52d15dcb720.tar passt-f8860bb099abbc3d999a53c0801cf52d15dcb720.tar.gz passt-f8860bb099abbc3d999a53c0801cf52d15dcb720.tar.bz2 passt-f8860bb099abbc3d999a53c0801cf52d15dcb720.tar.lz passt-f8860bb099abbc3d999a53c0801cf52d15dcb720.tar.xz passt-f8860bb099abbc3d999a53c0801cf52d15dcb720.tar.zst passt-f8860bb099abbc3d999a53c0801cf52d15dcb720.zip |
ndp: Convert to iov_tail
Use packet_data() and extract headers using IOV_REMOVE_HEADER()
rather than packet_get().
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | ndp.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -350,9 +350,14 @@ int ndp(const struct ctx *c, const struct icmp6hdr *ih, return 1; if (ih->icmp6_type == NS) { + struct ndp_ns ns_storage; const struct ndp_ns *ns; + struct iov_tail data; - ns = packet_get(p, 0, 0, sizeof(struct ndp_ns), NULL); + if (!packet_data(p, 0, &data)) + return -1; + + ns = IOV_REMOVE_HEADER(&data, ns_storage); if (!ns) return -1; |