Skip to content
  • Hans Dedecker's avatar
    iprule: fix missing ip rules after a reload (FS#2296) · beb810db
    Hans Dedecker authored
    Since commit 5cf79759
    
     (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: default avatarAlban Bedel <albeu@free.fr>
    Signed-off-by: default avatarHans Dedecker <dedeckeh@gmail.com>
    beb810db