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>
Sun, 7 Oct 2018 13:18:45 +0000 (15:18 +0200)
commitd0fa124eac8bb0e35680d80ea719eada873267be
treebfa133760d22f8a867d777ed4963b6ff971e1c9b
parenta0a1e52eb300b574098ae18fc7e6849ff50c2e5e
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