Skip to content

Commit

Permalink
pppd: Fix logical error in comparing valid encryption policies (#262)
Browse files Browse the repository at this point in the history
RFC2548 describes the proper values of the MS-MPPE-Encryption-Policy attribute.
and it can only hold 2 values: 1 (encryption allowed) and 2 (encryption required).

See
   https://tools.ietf.org/html/rfc2548, section 2.4.4

The correct comparison should be made with an && and not a ||.

This fixes github issue #218 

Signed-off-by: Eivind Naess <eivnaes@yahoo.com>
  • Loading branch information
enaess committed Mar 14, 2021
1 parent b2a4275 commit e609ed8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pppd/chap_ms.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ void
set_mppe_enc_types(int policy, int types)
{
/* Early exit for unknown policies. */
if (policy != MPPE_ENC_POL_ENC_ALLOWED ||
if (policy != MPPE_ENC_POL_ENC_ALLOWED &&
policy != MPPE_ENC_POL_ENC_REQUIRED)
return;

Expand Down

0 comments on commit e609ed8

Please sign in to comment.