<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>745</bug_id>
          
          <creation_ts>2002-03-23 18:13:41 +0300</creation_ts>
          <short_desc>--set-counters does not work</short_desc>
          <delta_ts>2003-08-25 15:18:29 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>iptables</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marat Khairullin">xmm</reporter>
          <assigned_to name="Nobody&apos;s working on this, feel free to take it">nobody</assigned_to>
          <cc>glebfm</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>705</commentid>
    <comment_count>0</comment_count>
    <who name="Marat Khairullin">xmm</who>
    <bug_when>2002-03-23 18:13:41 +0300</bug_when>
    <thetext>Скорее всего ошибка в sscanf, но здесь решить быстрее...
(Хотя там тоже надо)
iptables-1.2.5-alt2
glibc-2.2.5-alt1

# iptables -t filter --set-counters 71 23181 -A INPUT -p tcp -m tcp --sport 80 -j ACCEPT
iptables v1.2.5: -c packet counter not numeric
Try `iptables -h\&apos; or \&apos;iptables --help\&apos; for more information.

Та же ошибка в iptables-restore.
Решается с помощью патча:

--- iptables.c.old	Tue Mar  5 15:22:45 2002
+++ iptables.c	Sat Mar 23 00:40:52 2002
@@ -1989,12 +1989,12 @@
 					\&amp;quot;-%c requires packet and byte counter\&amp;quot;,
 					opt2char(OPT_COUNTERS));
 
-			if (sscanf(pcnt, \&amp;quot;%llu\&amp;quot;, &amp;amp;fw.counters.pcnt) != 1)
+			if (sscanf(pcnt, \&amp;quot;%Lu\&amp;quot;, &amp;amp;fw.counters.pcnt) != 1)
 				exit_error(PARAMETER_PROBLEM,
 					\&amp;quot;-%c packet counter not numeric\&amp;quot;,
 					opt2char(OPT_COUNTERS));
 
-			if (sscanf(bcnt, \&amp;quot;%llu\&amp;quot;, &amp;amp;fw.counters.bcnt) != 1)
+			if (sscanf(bcnt, \&amp;quot;%Lu\&amp;quot;, &amp;amp;fw.counters.bcnt) != 1)
 				exit_error(PARAMETER_PROBLEM,
 					\&amp;quot;-%c byte counter not numeric\&amp;quot;,
 					opt2char(OPT_COUNTERS));
--- По манам параметры %ll и %L эквивалентны
+++ 

---

---

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3418</commentid>
    <comment_count>1</comment_count>
    <who name="Bug Reporter">reporter</who>
    <bug_when>2002-04-16 20:13:06 +0400</bug_when>
    <thetext>Fixed in 1.2.6a-alt1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6783</commentid>
    <comment_count>2</comment_count>
    <who name="Bug Reporter">reporter</who>
    <bug_when>2002-04-16 20:13:06 +0400</bug_when>
    <thetext>Fixed in 1.2.6a-alt1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>