diff options
| -rw-r--r-- | accel-pppd/ppp/ccp_mppe.c | 3 | ||||
| -rw-r--r-- | tests/accel-pppd/pppoe/test_pppoe_session_wo_auth.py | 3 |
2 files changed, 5 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); diff --git a/tests/accel-pppd/pppoe/test_pppoe_session_wo_auth.py b/tests/accel-pppd/pppoe/test_pppoe_session_wo_auth.py index 960b7c94..b4cccc81 100644 --- a/tests/accel-pppd/pppoe/test_pppoe_session_wo_auth.py +++ b/tests/accel-pppd/pppoe/test_pppoe_session_wo_auth.py @@ -26,6 +26,9 @@ def accel_pppd_config(veth_pair_netns): [auth] any-login=1 + [ppp] + mppe=prefer + [ip-pool] gw-ip-address=192.0.2.1 192.0.2.2-255 |
