Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jun 2023 11:24:08 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 272144] netlink sets ifi_type to FreeBSD if_type instead of ARPHRD_*
Message-ID:  <bug-272144-227@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 272144
           Summary: netlink sets ifi_type to FreeBSD if_type instead of
                    ARPHRD_*
           Product: Base System
           Version: 13.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: misha@freebsd.org

Netlink software which uses ifi_type from ifinfomsg structure expects it to=
 be
set to ARPHRD_* values, but currently it's getting set to if_type (from
net/if_types.h).

sys/netlink/route/iface.c:259

ifinfo->ifi_type =3D ifp->if_type

ifinfomsg defenition is in sys/netlink/route/interface.h

struct ifinfomsg {
...
unsigned short ifi_type /* ARPHRD_* */
...
}

Because of this software receives 0x6 (IFT_ETHER) instead of 0x1 (ARPHRD_ET=
HER)
for wireless interfaces and 0x18 (IFT_LOOP) instead of 772 (ARPHRD_LOOPBACK=
).

Same assignment happens in 14-current.

Is this difference from Linux intentional?

--=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-272144-227>