Skip to content

Commit

Permalink
webui: remove default stream socket context options
Browse files Browse the repository at this point in the history
Do not enforce a specific bindto (ipv4/ipv6) by stream context options.

See:

https://www.php.net/manual/en/context.socket.php
https://www.php.net/manual/de/function.stream-context-create.php

Fixes #579: Unable to connect to the director from webui via ipv6
  • Loading branch information
fbergkemper committed Jun 28, 2021
1 parent 8458ba3 commit b2e8e74
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions webui/vendor/Bareos/library/Bareos/BSock/BareosBSock.php
Expand Up @@ -5,7 +5,7 @@
* bareos-webui - Bareos Web-Frontend
*
* @link https://github.com/bareos/bareos for the canonical source repository
* @copyright Copyright (c) 2014-2019 Bareos GmbH & Co. KG
* @copyright Copyright (c) 2014-2021 Bareos GmbH & Co. KG
* @license GNU Affero General Public License (http://www.gnu.org/licenses/)
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -467,13 +467,10 @@ private function connect()
$port = $this->config['port'];
$remote = "tcp://" . $this->config['host'] . ":" . $port;

// set default stream context options
$opts = array(
'socket' => array(
'bindto' => '0:0',
),
);
// set stream context options
$opts = array();

// create stream context
$context = stream_context_create($opts);

try {
Expand Down

0 comments on commit b2e8e74

Please sign in to comment.