"value": False,
"validation_function": validation.is_bool
}),
+ "pointopoint": dict({
+ "name": "pointopoint",
+ "help": "If the interface is a P2P link, the remote endpoint's IP "
+ "should be set on this attribute.",
+ "type": Attribute.STRING,
+ "flags": Attribute.DesignOnly,
+ "validation_function": validation.is_string
+ }),
"txqueuelen": dict({
"name": "mask",
"help": "Transmission queue length (in packets)",
"configure_function": postconfigure_tuniface,
"start_function": wait_tuniface,
"box_attributes": [
- "up", "device_name", "mtu", "snat",
+ "up", "device_name", "mtu", "snat", "pointopoint",
"txqueuelen",
"tun_proto", "tun_addr", "tun_port", "tun_key"
],
"configure_function": postconfigure_tuniface,
"start_function": wait_tuniface,
"box_attributes": [
- "up", "device_name", "mtu", "snat",
+ "up", "device_name", "mtu", "snat", "pointopoint",
"txqueuelen",
"tun_proto", "tun_addr", "tun_port", "tun_key"
],
local_mask = local.netprefix
local_snat = local.snat
local_txq = local.txqueuelen
+ local_p2p = local.pointopoint
+
+ if not local_p2p and hasattr(peer, 'address'):
+ local_p2p = peer.address
if check_proto != peer_proto:
raise RuntimeError, "Peering protocol mismatch: %s != %s" % (check_proto, peer_proto)
if local_snat:
args.append("-S")
+ if local_p2p:
+ args.extend(("-P",str(local_p2p)))
if local_txq:
args.extend(("-Q",str(local_txq)))
if extra_args: