From: florian Date: Sat, 10 Apr 2021 17:22:34 +0000 (+0000) Subject: Make sure the ip header lands on a 4 byte alignment by adding 2 bytes X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c6841532fa4aded9af87517b1dc277071ed44250;p=openbsd Make sure the ip header lands on a 4 byte alignment by adding 2 bytes padding because the ethernet header in front is only 14 bytes. Found the hard way by me while testing on sparc64. Solution suggested by & OK deraadt --- diff --git a/sbin/dhcpleased/dhcpleased.h b/sbin/dhcpleased/dhcpleased.h index b33312799d4..d4aa71c525d 100644 --- a/sbin/dhcpleased/dhcpleased.h +++ b/sbin/dhcpleased/dhcpleased.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpleased.h,v 1.3 2021/02/27 10:21:08 florian Exp $ */ +/* $OpenBSD: dhcpleased.h,v 1.4 2021/04/10 17:22:34 florian Exp $ */ /* * Copyright (c) 2017, 2021 Florian Obser @@ -235,6 +235,7 @@ struct imsg_propose_rdns { struct imsg_dhcp { uint32_t if_index; ssize_t len; + uint8_t ether_align[2]; uint8_t packet[1500]; };