This requires that a pseudo ethernet header be created so the netmap
processing hooks can pick up on packets coming from tun devices.
Details
Details
- Reviewers
- None
- Group Reviewers
Klara
Testing was done using the modified netcat from https://reviews.freebsd.org/D37435
#!/bin/sh . /code/freebsd/worktrees/netmap/tests/sys/common/vnet.subr nmbridge="/usr/obj/code/freebsd/worktrees/netmap/amd64.amd64/tools/tools/netmap/bridge" pktgen="/usr/obj/code/freebsd/worktrees/netmap/amd64.amd64/tools/tools/netmap/pkt-gen" nc="/usr/obj/code/freebsd/worktrees/netmap/amd64.amd64/usr.bin/nc/nc" vnet_init epair=$(vnet_mkepair) tun_duke=$(ifconfig tun create) tun_bass=$(ifconfig tun create) vnet_mkjail duke ${epair}a ${tun_duke} vnet_mkjail bass ${epair}b ${tun_bass} jexec duke ifconfig ${epair}a inet 10.0.0.1/24 up jexec bass ifconfig ${epair}b inet 10.0.0.2/24 up jexec duke $nc -u -l --tun /dev/${tun_duke} 10.0.0.1 2600 & jexec bass $nc -u --tun /dev/${tun_bass} 10.0.0.1 2600 & jexec duke ifconfig ${tun_duke} inet 10.100.0.1/24 10.100.0.2 up jexec bass ifconfig ${tun_bass} inet 10.100.0.2/24 10.100.0.1 up jexec bass ping -c 1 10.100.0.1 if [ $? -ne 0 ] then echo "ping over tunnel failed" fi echo "test environment ready for testing" echo "duke tun ${tun_duke}" echo "bass tun ${tun_bass}" echo "run the following command somewhere else, hit enter to start sending traffic" echo "sudo jexec duke ${pktgen} -f rx -i ${tun_duke}" read tmp jexec bass ${pktgen} -f tx -i ${tun_bass} -n 1000000000 -l 60 -d 198.19.0.1:2000-198.19.0.100 -D a0:36:9f:1e:28:14 -s 198.18.0.1:2000-198.18.0.20 -w 4
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Warnings Severity Location Code Message Warning sys/dev/netmap/if_tun_netmap.h:38 SPELL1 Possible Spelling Mistake - Unit
No Test Coverage - Build Status
Buildable 48422 Build 45308: arc lint + arc unit