From ace2555dae156479f330ad6aa1b9e11f04500503 Mon Sep 17 00:00:00 2001 From: Dylan Reimerink Date: Thu, 12 Dec 2024 18:08:00 +0100 Subject: [PATCH] link_linux: Add deserialization of `IFF_RUNNING` flag Add deserialization of the `IFF_RUNNING` link flag which translates to `net.FlagRunning`. Signed-off-by: Dylan Reimerink --- link_linux.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/link_linux.go b/link_linux.go index 52491c58..88bbc6db 100644 --- a/link_linux.go +++ b/link_linux.go @@ -3041,7 +3041,6 @@ func parseMacvlanData(link Link, data []syscall.NetlinkRouteAttr) { } } -// copied from pkg/net_linux.go func linkFlags(rawFlags uint32) net.Flags { var f net.Flags if rawFlags&unix.IFF_UP != 0 { @@ -3059,6 +3058,9 @@ func linkFlags(rawFlags uint32) net.Flags { if rawFlags&unix.IFF_MULTICAST != 0 { f |= net.FlagMulticast } + if rawFlags&unix.IFF_RUNNING != 0 { + f |= net.FlagRunning + } return f }