Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jun 2021 19:49:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 256794] netstat -c issues
Message-ID:  <bug-256794-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256794

            Bug ID: 256794
           Summary: netstat -c issues
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: nreilly@blackberry.com

In usr.bin/netstat/inet.c protopr() uses so unitialized. Block beginning at
line 242


        if (cflag || Cflag) {
                fnamelen =3D strlen("Stack");
                cnamelen =3D strlen("CC");
                oxig =3D xig =3D (struct xinpgen *)buf;
                for (xig =3D (struct xinpgen*)((char *)xig + xig->xig_len);
                    xig->xig_len > sizeof(struct xinpgen);
                    xig =3D (struct xinpgen *)((char *)xig + xig->xig_len))=
 {
                        if (istcp) {
                                tp =3D (struct xtcpcb *)xig;
                                inp =3D &tp->xt_inp;
                        } else {
                                continue;
                        }
                        if (so->xso_protocol !=3D proto)

Looking at the next block suggests that it is missing:
                        so =3D &inp->xi_socket;

Also while "-c" is documented in the netstat.1 at line 175, it's missing fr=
om
the Synopsis at line 42 and line 114

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-256794-227>