From: Hans Dedecker Date: Mon, 27 May 2019 19:01:25 +0000 (+0200) Subject: iprule: fix missing ip rules after a reload (FS#2296) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=beb810dbccee098add0347d551eb5362e404fbdc;hp=beb810dbccee098add0347d551eb5362e404fbdc;p=oweals%2Fnetifd.git iprule: fix missing ip rules after a reload (FS#2296) Since commit 5cf79759a24e9bb2a6a3aef7c83d73efb9bf2df3 (iprule: rework interface based rules to handle dynamic interfaces) the rule comparison is broken and doesn't correctly recognize matching rules. This in turn break the reloading as adding the "new" rule fails because it already exists and it then delete the "old" rule. The comparison is broken because it now include fields that are not defining the rule itself, as well as some pointer to malloced strings. To fix this we move back the offending fields in the iprule struct before the 'flags' field and match the malloced strings separately. Signed-off-by: Alban Bedel Signed-off-by: Hans Dedecker ---