capt_init(): defer setting capturing protocol
commit0962b13b7ae2df2a2ef89c425007c21aa2dab71e
authorVitezslav Samel <vitezslav@samel.cz>
Thu, 26 Dec 2019 12:51:03 +0000 (26 13:51 +0100)
committerVitezslav Samel <vitezslav@samel.cz>
Thu, 26 Dec 2019 13:01:23 +0000 (26 14:01 +0100)
treeea0bb4728b789cad34bbe70d1ea0e0f88245ab36
parentbda9d5a9dddc0bca940f1baf4ca3645575a5f3ed
capt_init(): defer setting capturing protocol

Initialize packet capturing socket first with some
default protocol; the right protocol is then set
with bind().

This overcomes the problem with getting packets
from other interfaces, because the socket was not
properly initialized yet.

Signed-off-by: Vitezslav Samel <vitezslav@samel.cz>
src/capt.c