From c6845f60a062b69d1d4e64db1b6d0f1b6ac75d43 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 19 Oct 2022 11:43:57 +1100 Subject: dhcp: Use tap_udp4_send() helper in dhcp() The IPv4 specific dhcp() manually constructs L2 and IP headers to send its DHCP reply packet, unlike its IPv6 equivalent in dhcpv6.c which uses the tap_udp6_send() helper. Now that we've broaded the parameters to tap_udp4_send() we can use it in dhcp() to avoid some duplicated logic. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- tap.c | 1 - 1 file changed, 1 deletion(-) (limited to 'tap.c') diff --git a/tap.c b/tap.c index d250a0b..3f78c99 100644 --- a/tap.c +++ b/tap.c @@ -170,7 +170,6 @@ static void *tap_push_ip4h(char *buf, in_addr_t src, in_addr_t dst, * @in: UDP payload contents (not including UDP header) * @len: UDP payload length (not including UDP header) */ -/* cppcheck-suppress unusedFunction */ void tap_udp4_send(const struct ctx *c, in_addr_t src, in_port_t sport, in_addr_t dst, in_port_t dport, const void *in, size_t len) -- cgit v1.2.3