• Jussi Laakkonen's avatar
    [connman] Use config file name in firewall rule sorting. JB#44071 · 2298624d
    Jussi Laakkonen authored
    This adds sorting of firewall rules using the config file name as sort
    criteria. The rules are read from alphabetical list of configuration
    files at startup and were added in correct order. But when reloading the
    order must be kept and this commit, by adding each rule into sorted list
    of rules, guarantees that the order of the rules is always consistent.
    The rules that are added by the system (config_file is NULL) are sorted
    on top of the list.
    
    With currently active connections which have firewall enabled the rules
    are simply appended at the end. The order is effective after the service
    is reconnected.
    
    The default static rules are ordered but no change for these is made
    into iptables. The change of rule order is effective only after connman
    restart. This issue should be addressed in the future.
    2298624d
firewall.c 65.7 KB