mirror of
https://github.com/vishvananda/netlink
synced 2024-12-24 23:52:37 +00:00
Address comments
* fix package import order * use int instead of int32 for Filter FW Attrs
This commit is contained in:
parent
824d7a16e5
commit
b1536bf12c
@ -52,7 +52,7 @@ type FilterFwAttrs struct {
|
||||
Rate uint32
|
||||
AvRate uint32
|
||||
PeakRate uint32
|
||||
Action int32
|
||||
Action int
|
||||
Overhead uint16
|
||||
LinkLayer int
|
||||
}
|
||||
@ -86,7 +86,7 @@ func NewFw(attrs FilterAttrs, fattrs FilterFwAttrs) (*Fw, error) {
|
||||
linklayer = fattrs.LinkLayer
|
||||
}
|
||||
|
||||
police.Action = fattrs.Action
|
||||
police.Action = int32(fattrs.Action)
|
||||
if police.Rate.Rate != 0 {
|
||||
police.Rate.Mpu = fattrs.Mpu
|
||||
police.Rate.Overhead = fattrs.Overhead
|
||||
|
@ -4,8 +4,9 @@ import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"github.com/vishvananda/netlink/nl"
|
||||
"syscall"
|
||||
|
||||
"github.com/vishvananda/netlink/nl"
|
||||
)
|
||||
|
||||
// FilterDel will delete a filter from the system.
|
||||
|
@ -1,9 +1,10 @@
|
||||
package netlink
|
||||
|
||||
import (
|
||||
"github.com/vishvananda/netlink/nl"
|
||||
"syscall"
|
||||
"testing"
|
||||
|
||||
"github.com/vishvananda/netlink/nl"
|
||||
)
|
||||
|
||||
func TestFilterAddDel(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user