diff options
author | Vladimir Lavor <vlavor@cisco.com> | 2020-08-04 12:37:25 +0200 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2020-08-07 06:56:10 +0000 |
commit | 8c3f04816a8fd23a5eabde1b36cb2471e06229bc (patch) | |
tree | 46c342d822551eb4edfcbe588581bfb35363fd27 /extras/libmemif/examples/icmp-responder/icmp-responder.go | |
parent | 8049bd25baca6f5059ccd03c48a090607a65d8d0 (diff) |
Update libmemif
Change-Id: I5db0460f375c9e34bc09170a310d52e1a619ed34
Signed-off-by: Vladimir Lavor <vlavor@cisco.com>
Diffstat (limited to 'extras/libmemif/examples/icmp-responder/icmp-responder.go')
-rw-r--r-- | extras/libmemif/examples/icmp-responder/icmp-responder.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/extras/libmemif/examples/icmp-responder/icmp-responder.go b/extras/libmemif/examples/icmp-responder/icmp-responder.go index 5e9f2e0..79bb9d0 100644 --- a/extras/libmemif/examples/icmp-responder/icmp-responder.go +++ b/extras/libmemif/examples/icmp-responder/icmp-responder.go @@ -155,7 +155,7 @@ func IcmpResponder(memif *libmemif.Memif, queueID uint8) { break } // Generate response for each supported request. - responses := []libmemif.RawPacketData{} + var responses []libmemif.RawPacketData for _, packet := range packets { fmt.Println("Received new packet:") DumpPacket(packet) @@ -325,7 +325,7 @@ func main() { hwAddr, err = net.ParseMAC(MAC) if err != nil { - fmt.Println("Failed to parse the MAC address: %v", err) + fmt.Printf("Failed to parse the MAC address: %v", err) return } @@ -334,7 +334,7 @@ func main() { ipAddr = ip.To4() } if ipAddr == nil { - fmt.Println("Failed to parse the IP address: %v", err) + fmt.Printf("Failed to parse the IP address: %v", err) return } |