From d70fc819a4f7f0b54b374bfdae062e3c7d2d3cc6 Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Tue, 1 Sep 2026 08:44:10 +0300 Subject: ppp: cover alignment-safe MPPE prefer setup Serialize the MPPE option through an aligned temporary and exercise mppe=prefer in the existing unauthenticated PPPoE session test. --- accel-pppd/ppp/ccp_mppe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'accel-pppd') diff --git a/accel-pppd/ppp/ccp_mppe.c b/accel-pppd/ppp/ccp_mppe.c index cb41c0da..c2ffd9a0 100644 --- a/accel-pppd/ppp/ccp_mppe.c +++ b/accel-pppd/ppp/ccp_mppe.c @@ -102,11 +102,12 @@ static int setup_mppe_key(int fd, int transmit, uint8_t *key) { struct ppp_option_data data; uint8_t buf[6 + 16]; + uint32_t bits = htonl(MPPE_S | MPPE_H); memset(buf, 0, sizeof(buf)); buf[0] = CI_MPPE; buf[1] = 6; - *(uint32_t*)(buf + 2) = htonl(MPPE_S | MPPE_H); + memcpy(buf + 2, &bits, sizeof(bits)); if (key) memcpy(buf + 6, key, 16); -- cgit v1.2.3