#23 doen't work on arm linux platform


Hi, i have tested netcat on arm linux platform and it
seem to doesn't work on it. it exit without any error
message and with no connection attempt.
> netcat 6600


  • Nobody/Anonymous

    Logged In: NO

    I see the same behavior on ppc-linux. Don't have time for a
    useful bug report yet.

    netcat (The GNU Netcat) 0.7.1

    # /root/netcat -d -v -v -v -v 2323
    (debug) Trying to parse non-args parameters (argc=8, optind=6)
    (debug) netcat_resolvehost(dst=0x7fffefe8, name="")
    (debug) netcat_inet_ntop(src=0x7fffec3c)
    (debug) netcat_getport(dst=0x7ffffc98, port_string="2323",
    (debug) netcat_getport(dst=0x7ffffc98, port_string="(null)",
    (debug) Arguments parsing complete! Total ports=-1
    (debug) Main: EXIT (cleaning up)
    Total received bytes: 0
    Total sent bytes: 0
    # echo $?

    -Peter Jensen / diff.net

  • Nobody/Anonymous

    Logged In: NO

    Had the same problem (on arm). The following line of the debug messages is interessting:

    (debug) Arguments parsing complete! Total ports=-1

    The result of netcat_flag_count() gets negativ. So the problem is in netcat_flag_count(). The following patch seemed to work for me:

    --- netcat-0.7.1/src/flagset.c 2003-12-10 17:18:07.000000000 +0100

    +++ ../netcat-0.7.1/src/flagset.c 2007-03-26 12:47:53.000000000 +0200

    @@ -134,7 +134,7 @@

    int netcat_flag_count(void)


    - register char c;

    + register unsigned char c;

    register int i;

    int ret = 0;

    @@ -154,8 +154,8 @@

    Assumed that the bit number 1 is the sign, and that we will shift the

    bit 1 (or the bit that takes its place later) until the the most right,

    WHY it has to keep the wrong sign? */

    - ret -= (c >> 7);

    - c <<= 1;

    + ret += c&1;

    + c>>=1;



  • Michael Chaney

    Michael Chaney - 2007-10-03

    Logged In: YES
    Originator: NO

    The following ARM patch works for me, too. Looks like someone wrote some very presumptious code :)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks