|
@@ -657,9 +657,9 @@ def ffpb_ping(bot, trigger=None, target_name=None, reply_directly=True):
|
|
if node is None:
|
|
if node is None:
|
|
return None
|
|
return None
|
|
|
|
|
|
- # get the first non-linklocal address from the node
|
|
|
|
- target = [x for x in node["network"]["addresses"]
|
|
|
|
- if not x.lower().startswith("fe80:")][0]
|
|
|
|
|
|
+ # derive node address from MAC
|
|
|
|
+ node_mac = node.get('mac')
|
|
|
|
+ target = mac2ipv6(node_mac, 'fdca:ffee:ff12:132:')
|
|
target_alias = node["hostname"]
|
|
target_alias = node["hostname"]
|
|
|
|
|
|
# execute the actual ping and reply the result
|
|
# execute the actual ping and reply the result
|
|
@@ -778,9 +778,9 @@ def ffpb_remoteexec(bot, trigger):
|
|
if not playitsafe(bot, trigger, via_channel=True, node=node):
|
|
if not playitsafe(bot, trigger, via_channel=True, node=node):
|
|
return
|
|
return
|
|
|
|
|
|
- # use the node's first non-linklocal address
|
|
|
|
- naddrs = node["network"]["addresses"]
|
|
|
|
- target = [x for x in naddrs if not x.lower().startswith("fe80:")][0]
|
|
|
|
|
|
+ # derive target from node's MAC
|
|
|
|
+ node_mac = node.get('mac')
|
|
|
|
+ target = mac2ipv6(node_mac, 'fdca:ffee:ff12:132:')
|
|
target_alias = node["hostname"]
|
|
target_alias = node["hostname"]
|
|
|
|
|
|
# assemble SSH command
|
|
# assemble SSH command
|