HomeFreeBSD

netmap: pkt-gen: fix ifname before cmp in source_hwaddr

Description

netmap: pkt-gen: fix ifname before cmp in source_hwaddr

In source_hwaddr(), the configured ifname is compared against all
interfaces. However, in main(), the string 'netmap:' is prepended to the
interface string if no explicit type is given. Therefore the ifname will
not match any system interface and the source MAC address is always
empty.

Check for the leading 'netmap:' string and skip past it to match against
system interfaces. Note that 'tap:' and 'pcap:' devices strip the type
string from the ifname in main() so no further work is needed.

MFC after: 7 days
Submitted by: Brian Poole <brian90013@gmail.com>

Details

Provenance
vmaffioneAuthored on Dec 24 2022, 4:06 PM
Parents
rG95fc11577d11: netmap: monitor: add missing netmap_adapter_put()
Branches
Unknown
Tags
Unknown