Skip to content

Instantly share code, notes, and snippets.

View brunoalr's full-sized avatar
😶
Can be very slow to respond.

Bruno Alexandre Rosa brunoalr

😶
Can be very slow to respond.
  • Einhoven, NL
  • 23:21 (UTC +02:00)
View GitHub Profile
@brunoalr
brunoalr / member_fun.cpp
Created May 25, 2022 07:40
fun with pointers to member functions
// https://godbolt.org/z/3s1r3K4rs
#include <string>
// For c++ versions earlier than 17
#if __cplusplus < 201703L
// See https://isocpp.org/wiki/faq/pointers-to-members#macro-for-ptr-to-memfn
// and https://isocpp.org/wiki/faq/big-picture#use-evil-things-sometimes
#define CALL_MEMBER_FN(object,ptrToMember) (((object).*(ptrToMember))())
#else
#include <functional>
From: https://github.com/microsoft/WSL/issues/5068#issuecomment-970049434
https://github.com/sakai135/wsl-vpnkit with Pulse Secure Desktop Client
I had used this successfully but my company was skeptical with using a public GitHub repo solution and recommended not having it.
In my context of using Pulse Secure VPN, I fixed this by both changing /etc/resolv.conf as well as adjusting the networks MTU value to match the VPN's. Here's how:
From WSL, edit /etc/wsl.conf (if not present, create it with touch /etc/wsl.conf):