]> git.ipfire.org Git - thirdparty/suricata.git/commit
netmap: refresh netmap_if address after each NIOCREGIF 3692/head
authorMurat Balaban <murat@sunnyvalley.io>
Wed, 27 Feb 2019 17:09:13 +0000 (09:09 -0800)
committerVictor Julien <victor@inliniac.net>
Thu, 28 Feb 2019 13:46:03 +0000 (14:46 +0100)
commitf7c00a175352c0b4c5681f1f498bbbaebe503052
tree058b156aecc8a2f4c0e49164c6d0f0d1441740d2
parentadbc65d9dfee4f6d1949cd6973a79c22989c4310
netmap: refresh netmap_if address after each NIOCREGIF

With the introduction of netmap "partial opening" feature
netmap requires that we get a new NETMAP_IF pointer after
every `NIOCREGIF` registration. Because this allocates an
independent instance of `struct netmap_if`. If one
separately opens hw rings and sw rings he/she'll get two
`struct netmap_if`, one with the valid hw rings, and the other
with valid sw rings.

Because of that we get a new netmap_if pointer after each
NIOCREGIF.

Also removing netmap_if struct from NetmapDevice since
it's no more required.

Ticket #2855.
src/source-netmap.c