This commit is contained in:
黄思敏 2022-08-25 18:23:33 +08:00
parent 512bed4983
commit 226d8e777b

2
tap.go
View File

@ -160,7 +160,7 @@ func (nc *NetCard) runRead() {
log.Fatal(err) log.Fatal(err)
} }
log.Printf("%v %v", net.IP(rframe.Source()).String(), rframe.Destination()) log.Printf("%v %v", net.IP(rframe.Source()).To4().String(), net.IP(rframe.Destination()).To4())
if rframe.Ethertype() != ethernet.IPv4 { if rframe.Ethertype() != ethernet.IPv4 {
continue continue