Skip to content

Commit d4422e8

Browse files
author
a.mamedov
committed
Add support for IFLA_MIN_MTU and IFLA_MAX_MTU in LinkAttrs
Signed-off-by: Aleksey Mamedov <[email protected]>
1 parent 20a4b9a commit d4422e8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

link.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ type (
2424
type LinkAttrs struct {
2525
Index int
2626
MTU int
27+
MinMTU int
28+
MaxMTU int
2729
TxQLen int // Transmit Queue Length
2830
Name string
2931
HardwareAddr net.HardwareAddr

link_linux.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2248,6 +2248,10 @@ func LinkDeserialize(hdr *unix.NlMsghdr, m []byte) (Link, error) {
22482248
base.Name = string(attr.Value[:len(attr.Value)-1])
22492249
case unix.IFLA_MTU:
22502250
base.MTU = int(native.Uint32(attr.Value[0:4]))
2251+
case unix.IFLA_MIN_MTU:
2252+
base.MinMTU = int(native.Uint32(attr.Value[0:4]))
2253+
case unix.IFLA_MAX_MTU:
2254+
base.MaxMTU = int(native.Uint32(attr.Value[0:4]))
22512255
case unix.IFLA_PROMISCUITY:
22522256
base.Promisc = int(native.Uint32(attr.Value[0:4]))
22532257
case unix.IFLA_LINK:

0 commit comments

Comments
 (0)