device: test up/down using virtual conn
This prevents port clashing bugs. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
6603c05a4a
commit
9a29ae267c
3 changed files with 155 additions and 24 deletions
|
|
@ -79,7 +79,6 @@ func genICMPv4(payload []byte, dst, src net.IP) []byte {
|
|||
return pkt
|
||||
}
|
||||
|
||||
// TODO(crawshaw): find a reusable home for this. package devicetest?
|
||||
type ChannelTUN struct {
|
||||
Inbound chan []byte // incoming packets, closed on TUN close
|
||||
Outbound chan []byte // outbound packets, blocks forever on TUN close
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue