bump deps
This commit is contained in:
@ -6,13 +6,11 @@
|
||||
|
||||
package ipv6
|
||||
|
||||
import "syscall"
|
||||
|
||||
type rawICMPFilter struct {
|
||||
syscall.ICMPv6Filter
|
||||
type sysICMPFilter struct {
|
||||
Filt [8]uint32
|
||||
}
|
||||
|
||||
func (f *rawICMPFilter) set(typ ICMPType, block bool) {
|
||||
func (f *sysICMPFilter) set(typ ICMPType, block bool) {
|
||||
if block {
|
||||
f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31)
|
||||
} else {
|
||||
@ -20,7 +18,7 @@ func (f *rawICMPFilter) set(typ ICMPType, block bool) {
|
||||
}
|
||||
}
|
||||
|
||||
func (f *rawICMPFilter) setAll(block bool) {
|
||||
func (f *sysICMPFilter) setAll(block bool) {
|
||||
for i := range f.Filt {
|
||||
if block {
|
||||
f.Filt[i] = 0
|
||||
@ -30,6 +28,6 @@ func (f *rawICMPFilter) setAll(block bool) {
|
||||
}
|
||||
}
|
||||
|
||||
func (f *rawICMPFilter) willBlock(typ ICMPType) bool {
|
||||
func (f *sysICMPFilter) willBlock(typ ICMPType) bool {
|
||||
return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user