networkd: allow setting RouteMetric in Address section of a network config file

This commit is contained in:
Daniel Barter 2022-10-26 21:53:32 -07:00
parent f3e8ebc58b
commit fde313902f

View file

@ -584,6 +584,7 @@ let
"Label"
"PreferredLifetime"
"Scope"
"RouteMetric"
"HomeAddress"
"DuplicateAddressDetection"
"ManageTemporaryAddress"
@ -592,6 +593,7 @@ let
])
(assertHasField "Address")
(assertValueOneOf "PreferredLifetime" ["forever" "infinity" "0" 0])
(assertInt "RouteMetric")
(assertValueOneOf "HomeAddress" boolValues)
(assertValueOneOf "DuplicateAddressDetection" ["ipv4" "ipv6" "both" "none"])
(assertValueOneOf "ManageTemporaryAddress" boolValues)