def update_ip_rule(self, ip, mac):
        """Update a rule associated with given ip and mac."""

        rule_no = self._find_rule_no(mac)
        chain = self._find_chain_name(mac)
        if not rule_no or not chain:
            LOG.error(_LE('Failed to update ip rule for %(ip)s %(mac)s'),
                      {'ip': ip, 'mac': mac})
            return

        update_cmd = ['iptables', '-R', '%s' % chain, '%s' % rule_no,
                      '-s', ip % '%s/32', '-m', 'mac', '--mac-source',
                      '%s' % mac, '-j', 'RETURN']
        LOG.debug('Execute command: %s', update_cmd)
        dsl.execute(update_cmd, self._root_helper, log_output=False)
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/apps/saf/agent/iptables_driver.py/IptablesDriver.update_ip_rule/swapped operands of `%`