diff options
| author | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-09-01 08:44:10 +0300 |
|---|---|---|
| committer | Denys Fedoryshchenko <denys.f@collabora.com> | 2026-09-01 08:53:54 +0300 |
| commit | d70fc819a4f7f0b54b374bfdae062e3c7d2d3cc6 (patch) | |
| tree | d7f8fe55bc64e0f7b846e517a89ccb21584928b2 /accel-pppd | |
| parent | 028b942d2daa57b56efd61cb5cb348017fad6f05 (diff) | |
| download | accel-ppp-d70fc819a4f7f0b54b374bfdae062e3c7d2d3cc6.tar.gz accel-ppp-d70fc819a4f7f0b54b374bfdae062e3c7d2d3cc6.zip | |
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.
Diffstat (limited to 'accel-pppd')
| -rw-r--r-- | accel-pppd/ppp/ccp_mppe.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |
