mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 04:53:44 +02:00
.
This commit is contained in:
parent
536bc59abb
commit
b44bd19c53
3 changed files with 8 additions and 10 deletions
|
@ -19,15 +19,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "../../include/ZeroTierCore.h"
|
#include "../../include/ZeroTierCore.h"
|
||||||
|
#include "../../node/Constants.hpp"
|
||||||
#if __has_include("../../version.h")
|
|
||||||
#include "../../version.h"
|
|
||||||
#else
|
|
||||||
#define ZEROTIER_ONE_VERSION_MAJOR 255
|
|
||||||
#define ZEROTIER_ONE_VERSION_MINOR 255
|
|
||||||
#define ZEROTIER_ONE_VERSION_REVISION 255
|
|
||||||
#define ZEROTIER_ONE_VERSION_BUILD 255
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -141,14 +141,18 @@ type Network struct {
|
||||||
|
|
||||||
// newNetwork creates a new network with default settings
|
// newNetwork creates a new network with default settings
|
||||||
func newNetwork(node *Node, id NetworkID, t Tap) (*Network, error) {
|
func newNetwork(node *Node, id NetworkID, t Tap) (*Network, error) {
|
||||||
|
m := NewMACForNetworkMember(node.Identity().address, id)
|
||||||
n := &Network{
|
n := &Network{
|
||||||
node: node,
|
node: node,
|
||||||
id: id,
|
id: id,
|
||||||
mac: NewMACForNetworkMember(node.Identity().address, id),
|
mac: m,
|
||||||
tap: t,
|
tap: t,
|
||||||
config: NetworkConfig{
|
config: NetworkConfig{
|
||||||
ID: id,
|
ID: id,
|
||||||
|
MAC: m,
|
||||||
Status: NetworkStatusRequestConfiguration,
|
Status: NetworkStatusRequestConfiguration,
|
||||||
|
Type: NetworkTypePrivate,
|
||||||
|
MTU: int(defaultVirtualNetworkMTU),
|
||||||
},
|
},
|
||||||
settings: NetworkLocalSettings{
|
settings: NetworkLocalSettings{
|
||||||
AllowManagedIPs: true,
|
AllowManagedIPs: true,
|
||||||
|
|
|
@ -63,6 +63,8 @@ const (
|
||||||
|
|
||||||
afInet = C.AF_INET
|
afInet = C.AF_INET
|
||||||
afInet6 = C.AF_INET6
|
afInet6 = C.AF_INET6
|
||||||
|
|
||||||
|
defaultVirtualNetworkMTU = C.ZT_DEFAULT_MTU
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Add table
Reference in a new issue