diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-05-30 03:16:27 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-05-30 03:16:27 +0000 |
commit | 4a65955e8a32be00eae546f7ba45843a4778b2fd (patch) | |
tree | 5116604d4b0e995537cee174d9174a650307691a | |
parent | 82a02d946a4bf7da11dc0c6be3c4b0b2d52bd378 (diff) | |
parent | ca7860c5d1284f84e77ad850441b8bb00d1f4625 (diff) | |
download | mtpd-4a65955e8a32be00eae546f7ba45843a4778b2fd.tar.gz |
Snap for 5616560 from ca7860c5d1284f84e77ad850441b8bb00d1f4625 to qt-c2f2-releaseandroid-10.0.0_r9android-10.0.0_r8android-10.0.0_r7android-10.0.0_r14android-10.0.0_r13android-10.0.0_r12android10-c2f2-s2-releaseandroid10-c2f2-s1-releaseandroid10-c2f2-release
Change-Id: Ic81ae663759eed795b0fe256cb241bd391625310
-rw-r--r-- | l2tp.c | 11 | ||||
-rw-r--r-- | pptp.c | 11 |
2 files changed, 12 insertions, 10 deletions
@@ -354,19 +354,20 @@ static int l2tp_connect(char **arguments) } /** - * Check if upstream kernel implementation is enabled. + * Check if upstream kernel implementation of L2TP should be used. * - * @return true if upstream L2TP is enabled in kernel and false otherwise + * @return true If upstream L2TP should be used, which is the case if + * the obsolete OLAC feature is not available. */ static bool check_ol2tp(void) { - int fd = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OL2TP); + int fd = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OLAC); if (fd < 0) { - return false; + return true; } else { close(fd); - return true; + return false; } } @@ -237,19 +237,20 @@ static int pptp_connect(char **arguments) } /** - * Check if upstream kernel implementation is enabled. + * Check if upstream kernel implementation of PPTP should be used. * - * @return true if upstream PPTP is enabled in kernel and false otherwise + * @return true If upstream PPTP should be used, which is the case if + * the obsolete OPNS feature is not available. */ static bool check_pptp(void) { - int fd = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_PPTP); + int fd = socket(AF_PPPOX, SOCK_DGRAM, PX_PROTO_OPNS); if (fd < 0) { - return false; + return true; } else { close(fd); - return true; + return false; } } |