mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 06:42:51 +01:00
Routing socket messages are padded to sizeof(long), not just
sizeof(u_int32_t).
This commit is contained in:
parent
c02a3aa562
commit
d3125a3e10
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100905
@ -29,6 +29,8 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/* XXX Yes this is WAY too complicated */
|
||||
@ -193,9 +195,9 @@ findsaddr(register const struct sockaddr_in *to,
|
||||
}
|
||||
|
||||
if (SALEN(sa) == 0)
|
||||
cp += sizeof(u_int32_t);
|
||||
cp += sizeof(long);
|
||||
else
|
||||
cp += roundup(SALEN(sa), sizeof(u_int32_t));
|
||||
cp += roundup(SALEN(sa), sizeof(long));
|
||||
}
|
||||
|
||||
return ("failed!");
|
||||
|
Loading…
Reference in New Issue
Block a user