aboutgitcodebugslistschat
path: root/dhcp.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-10-19 11:43:51 +1100
committerStefano Brivio <sbrivio@redhat.com>2022-10-19 03:34:43 +0200
commitfb5d1c5d7d0b914a90aaeecf406c7092d9d55aeb (patch)
tree3dd8b37a3446fbac8d5816f4130f3f5ed65079c7 /dhcp.c
parentf72b63e92f040104a289d5f38047c3688fa76593 (diff)
downloadpasst-fb5d1c5d7d0b914a90aaeecf406c7092d9d55aeb.tar
passt-fb5d1c5d7d0b914a90aaeecf406c7092d9d55aeb.tar.gz
passt-fb5d1c5d7d0b914a90aaeecf406c7092d9d55aeb.tar.bz2
passt-fb5d1c5d7d0b914a90aaeecf406c7092d9d55aeb.tar.lz
passt-fb5d1c5d7d0b914a90aaeecf406c7092d9d55aeb.tar.xz
passt-fb5d1c5d7d0b914a90aaeecf406c7092d9d55aeb.tar.zst
passt-fb5d1c5d7d0b914a90aaeecf406c7092d9d55aeb.zip
tap: Remove unhelpeful vnet_pre optimization from tap_send()
Callers of tap_send() can optionally use a small optimization by adding extra space for the 4 byte length header used on the qemu socket interface. tap_ip_send() is currently the only user of this, but this is used only for "slow path" ICMP and DHCP packets, so there's not a lot of value to the optimization. Worse, having the two paths here complicates the interface and makes future cleanups difficult, so just remove it. I have some plans to bring back the optimization in a more general way in future, but for now it's just in the way. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'dhcp.c')
-rw-r--r--dhcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcp.c b/dhcp.c
index 875e18b..2b3af82 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -377,7 +377,7 @@ int dhcp(const struct ctx *c, const struct pool *p)
memcpy(eh->h_dest, eh->h_source, ETH_ALEN);
memcpy(eh->h_source, c->mac, ETH_ALEN);
- if (tap_send(c, eh, len, 0) < 0)
+ if (tap_send(c, eh, len) < 0)
perror("DHCP: send");
return 1;