diff --git a/ipvs.go b/ipvs.go index 61b6f0a..f3be682 100644 --- a/ipvs.go +++ b/ipvs.go @@ -52,16 +52,17 @@ type SvcStats struct { // Destination defines an IPVS destination (real server) in its // entirety. type Destination struct { - Address net.IP - Port uint16 - Weight int - ConnectionFlags uint32 - AddressFamily uint16 - UpperThreshold uint32 - LowerThreshold uint32 - ActiveConnections int - InactiveConnections int - Stats DstStats + Address net.IP + Port uint16 + Weight int + ConnectionFlags uint32 + AddressFamily uint16 + UpperThreshold uint32 + LowerThreshold uint32 + ActiveConnections int + InactiveConnections int + PersistentConnections int + Stats DstStats } // DstStats defines IPVS destination (real server) statistics diff --git a/netlink.go b/netlink.go index 79402cd..a8c3daa 100644 --- a/netlink.go +++ b/netlink.go @@ -450,6 +450,8 @@ func assembleDestination(attrs []syscall.NetlinkRouteAttr) (*Destination, error) d.ActiveConnections = int(native.Uint16(attr.Value)) case ipvsDestAttrInactiveConnections: d.InactiveConnections = int(native.Uint16(attr.Value)) + case ipvsDestAttrPersistentConnections: + d.PersistentConnections = int(native.Uint16(attr.Value)) case ipvsDestAttrStats: stats, err := assembleStats(attr.Value) if err != nil {