@@ -2,7 +2,6 @@ package netlink
22
33import (
44 "encoding/binary"
5- "log"
65 "net"
76 "syscall"
87
@@ -516,8 +515,6 @@ func (result *IPSetResult) unserialize(msg []byte) {
516515 result .ProtocolMinVersion = attr .Value [0 ]
517516 case nl .IPSET_ATTR_MARKMASK :
518517 result .MarkMask = attr .Uint32 ()
519- default :
520- log .Printf ("unknown ipset attribute from kernel: %+v %v" , attr , attr .Type & nl .NLA_TYPE_MASK )
521518 }
522519 }
523520}
@@ -547,17 +544,13 @@ func (result *IPSetResult) parseAttrData(data []byte) {
547544 result .Entries = append (result .Entries , IPSetEntry {IP : nested .Value })
548545 case nl .IPSET_ATTR_IP :
549546 result .IPFrom = nested .Value
550- default :
551- log .Printf ("unknown nested ipset data attribute from kernel: %+v %v" , nested , nested .Type & nl .NLA_TYPE_MASK )
552547 }
553548 }
554549 case nl .IPSET_ATTR_IP_TO | nl .NLA_F_NESTED :
555550 for nested := range nl .ParseAttributes (attr .Value ) {
556551 switch nested .Type {
557552 case nl .IPSET_ATTR_IP :
558553 result .IPTo = nested .Value
559- default :
560- log .Printf ("unknown nested ipset data attribute from kernel: %+v %v" , nested , nested .Type & nl .NLA_TYPE_MASK )
561554 }
562555 }
563556 case nl .IPSET_ATTR_PORT_FROM | nl .NLA_F_NET_BYTEORDER :
@@ -570,8 +563,6 @@ func (result *IPSetResult) parseAttrData(data []byte) {
570563 result .Comment = nl .BytesToString (attr .Value )
571564 case nl .IPSET_ATTR_MARKMASK :
572565 result .MarkMask = attr .Uint32 ()
573- default :
574- log .Printf ("unknown ipset data attribute from kernel: %+v %v" , attr , attr .Type & nl .NLA_TYPE_MASK )
575566 }
576567 }
577568}
@@ -581,8 +572,6 @@ func (result *IPSetResult) parseAttrADT(data []byte) {
581572 switch attr .Type {
582573 case nl .IPSET_ATTR_DATA | nl .NLA_F_NESTED :
583574 result .Entries = append (result .Entries , parseIPSetEntry (attr .Value ))
584- default :
585- log .Printf ("unknown ADT attribute from kernel: %+v %v" , attr , attr .Type & nl .NLA_TYPE_MASK )
586575 }
587576 }
588577}
@@ -610,17 +599,13 @@ func parseIPSetEntry(data []byte) (entry IPSetEntry) {
610599 switch attr .Type {
611600 case nl .IPSET_ATTR_IPADDR_IPV4 , nl .IPSET_ATTR_IPADDR_IPV6 :
612601 entry .IP = net .IP (attr .Value )
613- default :
614- log .Printf ("unknown nested ADT attribute from kernel: %+v" , attr )
615602 }
616603 }
617604 case nl .IPSET_ATTR_IP2 | nl .NLA_F_NESTED :
618605 for attr := range nl .ParseAttributes (attr .Value ) {
619606 switch attr .Type {
620607 case nl .IPSET_ATTR_IPADDR_IPV4 , nl .IPSET_ATTR_IPADDR_IPV6 :
621608 entry .IP2 = net .IP (attr .Value )
622- default :
623- log .Printf ("unknown nested ADT attribute from kernel: %+v" , attr )
624609 }
625610 }
626611 case nl .IPSET_ATTR_CIDR :
@@ -638,8 +623,6 @@ func parseIPSetEntry(data []byte) (entry IPSetEntry) {
638623 case nl .IPSET_ATTR_MARK | nl .NLA_F_NET_BYTEORDER :
639624 val := attr .Uint32 ()
640625 entry .Mark = & val
641- default :
642- log .Printf ("unknown ADT attribute from kernel: %+v" , attr )
643626 }
644627 }
645628 return
0 commit comments