mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
[WIP] need to allow for unicast, anycast, multicast etc for IPv6, possibly IPv4 too
This commit is contained in:
parent
5b8ca47bb0
commit
ea7fd81346
1 changed files with 48 additions and 0 deletions
|
@ -594,6 +594,54 @@ def _ip_route_linux():
|
|||
if comps[2] == "dev":
|
||||
ip_interface = comps[3]
|
||||
|
||||
local_address = comps[1] + "/128"
|
||||
ret.append(
|
||||
{
|
||||
"addr_family": "inet6",
|
||||
"destination": local_address,
|
||||
"gateway": "::",
|
||||
"netmask": "",
|
||||
"flags": "U",
|
||||
"interface": ip_interface,
|
||||
}
|
||||
)
|
||||
elif comps[0] == "unicast":
|
||||
ip_interface = ""
|
||||
if comps[2] == "dev":
|
||||
ip_interface = comps[3]
|
||||
|
||||
local_address = comps[1] + "/128"
|
||||
ret.append(
|
||||
{
|
||||
"addr_family": "inet6",
|
||||
"destination": local_address,
|
||||
"gateway": "::",
|
||||
"netmask": "",
|
||||
"flags": "U",
|
||||
"interface": ip_interface,
|
||||
}
|
||||
)
|
||||
elif comps[0] == "anycast":
|
||||
ip_interface = ""
|
||||
if comps[2] == "dev":
|
||||
ip_interface = comps[3]
|
||||
|
||||
local_address = comps[1] + "/128"
|
||||
ret.append(
|
||||
{
|
||||
"addr_family": "inet6",
|
||||
"destination": local_address,
|
||||
"gateway": "::",
|
||||
"netmask": "",
|
||||
"flags": "U",
|
||||
"interface": ip_interface,
|
||||
}
|
||||
)
|
||||
elif comps[0] == "multicast":
|
||||
ip_interface = ""
|
||||
if comps[2] == "dev":
|
||||
ip_interface = comps[3]
|
||||
|
||||
local_address = comps[1] + "/128"
|
||||
ret.append(
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue