Skip to content

Commit

Permalink
link_linux: Add deserialization of IFF_RUNNING flag
Browse files Browse the repository at this point in the history
Add deserialization of the `IFF_RUNNING` link flag which translates to
`net.FlagRunning`.

Signed-off-by: Dylan Reimerink <[email protected]>
  • Loading branch information
dylandreimerink authored and aboch committed Jan 21, 2025
1 parent 68cf136 commit 86d2f69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion link_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
}

Expand Down

0 comments on commit 86d2f69

Please sign in to comment.