Improve OpenVPN & OpenConnect interoperability
This commit is contained in:
@@ -102,7 +102,7 @@ func (d *stackDevice) UpdateConfiguration(configuration Configuration) error {
|
||||
d.stateAccess.Lock()
|
||||
defer d.stateAccess.Unlock()
|
||||
if d.logRouteOptions && hasRouteOptions(configuration.Routes) {
|
||||
d.options.Logger.Debug("OpenVPN route gateway and metric options are not representable by the gVisor stack device; routes are installed by prefix")
|
||||
d.options.Logger.Debug("route gateway and metric options are not representable by the gVisor stack device; routes are installed by prefix")
|
||||
d.logRouteOptions = false
|
||||
}
|
||||
if configuration.MTU != 0 {
|
||||
@@ -184,7 +184,7 @@ func (d *stackDevice) writeBuffers(packetBuffers []*buf.Buffer) error {
|
||||
|
||||
func (d *stackDevice) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) {
|
||||
if destination.IsIPv6() && d.blockIPv6Enabled() {
|
||||
return nil, E.New("IPv6 blocked by pushed OpenVPN block-ipv6")
|
||||
return nil, E.New("IPv6 blocked by pushed block-ipv6")
|
||||
}
|
||||
inet4Address, inet6Address := d.PortAddresses()
|
||||
address := tcpip.FullAddress{
|
||||
@@ -221,7 +221,7 @@ func (d *stackDevice) DialContext(ctx context.Context, network string, destinati
|
||||
|
||||
func (d *stackDevice) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error) {
|
||||
if destination.IsIPv6() && d.blockIPv6Enabled() {
|
||||
return nil, E.New("IPv6 blocked by pushed OpenVPN block-ipv6")
|
||||
return nil, E.New("IPv6 blocked by pushed block-ipv6")
|
||||
}
|
||||
inet4Address, inet6Address := d.PortAddresses()
|
||||
bind := tcpip.FullAddress{
|
||||
|
||||
Reference in New Issue
Block a user