conlink 2.5.1 → 2.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "conlink",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "conlink - Declarative Low-Level Networking for Containers",
5
5
  "repository": "https://github.com/LonoCloud/conlink",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -112,7 +112,7 @@ General Options:
112
112
  - Add default values to a link:
113
113
  - type: veth
114
114
  - dev: eth0
115
- - mac: random MAC starting with first octet of 'c2'
115
+ - mac: random MAC starting with first octet of 'c2' (not added to ipvlan)
116
116
  - mtu: --default-mtu (for non *vlan type)
117
117
  - base: :conlink for veth type, :host for *vlan types, :local otherwise"
118
118
  [{:as link :keys [type bridge ip route forward netem ethtool]} bridges opts]
@@ -120,7 +120,8 @@ General Options:
120
120
  {:keys [default-mtu keep-veth-offload]} opts
121
121
  type (keyword (or type "veth"))
122
122
  dev (get link :dev "eth0")
123
- mac (get link :mac (random-mac))
123
+ mac (when-not (= :ipvlan type)
124
+ (get link :mac (random-mac)))
124
125
  base-default (cond (= :veth type) :conlink
125
126
  (VLAN-TYPES type) :host
126
127
  :else :local)
@@ -138,10 +139,11 @@ General Options:
138
139
  {:type type
139
140
  :dev dev
140
141
  :base base
141
- :mac mac
142
142
  :ethtool ethtool}
143
143
  (when bridge
144
144
  {:bridge bridge})
145
+ (when mac
146
+ {:mac mac})
145
147
  (when (not (VLAN-TYPES type))
146
148
  {:mtu (get link :mtu default-mtu)})
147
149
  (when route