From nobody Sat Oct 23 10:27:05 2021 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 714251818C8C for ; Sat, 23 Oct 2021 10:27:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hby7s2d4Jz4j7R for ; Sat, 23 Oct 2021 10:27:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B32620BC2 for ; Sat, 23 Oct 2021 10:27:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 19NAR57B076942 for ; Sat, 23 Oct 2021 10:27:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 19NAR5Rk076941 for bugs@FreeBSD.org; Sat, 23 Oct 2021 10:27:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 259374] [Linux Compatibility Layer] : getifaddrs() : errno = EAFNOSUPPORT Date: Sat, 23 Oct 2021 10:27:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: didu31@hotmail.fr X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259374 Bug ID: 259374 Summary: [Linux Compatibility Layer] : getifaddrs() : errno =3D EAFNOSUPPORT Product: Base System Version: 13.0-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: didu31@hotmail.fr Hi, interface with gnu/linux getifaddrs() is no perfect. This concerns at least interface with debian wheezy, buster and bulleyes kernels. freebsd-13% ifconfig bge0: flags=3D8843 metric 0 mtu 1500 =20=20=20=20=20=20=20 options=3Dc019b ether 84:2b:2b:ae:6a:85 inet 192.168.0.45 netmask 0xffffff00 broadcast 192.168.0.255 media: Ethernet autoselect (100baseTX ) status: active nd6 options=3D23 lo0: flags=3D8049 metric 0 mtu 16384 options=3D680003 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=3D21 And consider this snippet, if.c: #include #include #include int main(int argc, char** argv) { struct ifaddrs *addrs, *ent; if (getifaddrs(&addrs)) { printf("errno =3D %d\n", errno); perror("getifaddrs()"); return 1; } int count =3D 0; /* Count the number of interfaces */ for (ent =3D addrs; ent; ent =3D ent->ifa_next)=20 { count++; } freeifaddrs(addrs); } freebsd-13% cc if.c -o if freebsd-13% ./if "bge0" af_family =3D 18 (=3D AF_LINK /* Link layer interface */) "bge0" af_family =3D 2 (=3D AF_INET) "lo0" af_family =3D 18 "lo0" af_family =3D 2 freebsd-13% sudo chroot compat/debian /bin/bash debian% cc if.c -o if debian% ./if errno =3D 97 (EAFNOSUPPORT) getifaddrs(): Address family not supported by protocol Could it be a compatibility bug with AF_LINK ? --=20 You are receiving this mail because: You are the assignee for the bug.=