iprule: fix segfault (FS#1875)
authorHans Dedecker <dedeckeh@gmail.com>
Mon, 1 Oct 2018 15:52:01 +0000 (17:52 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 1 Oct 2018 20:14:14 +0000 (22:14 +0200)
commitaeec2a0c6b6bc16a2e43de8f79ddee1bf3d1af40
tree4661fee837f55ae59518c926868643748932fdad
parent94e156f90a58e0d4bea1248bd6088cf92192cdc1
iprule: fix segfault (FS#1875)

Fix segfault in generic_interface_cb by checking the
IPRULE_OUT/IPRULE_IN flags before doing the strcmp for the possible
configured out/in interface(s) of the ip rule.
Also don't copy the interface layer3 device as the layer 3 device is
not yet known when IFEV_CREATE event is launched.
The layer3 device will be known when the IFEV_UP event is processed in
rule_out_cb/rule_in_cb.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
iprule.c