Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Nov 2024 05:28:53 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 282870] rtnl_handle_iflink() has a type mismatch for ifnet_link_event
Message-ID:  <bug-282870-227@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 282870
           Summary: rtnl_handle_iflink() has a type mismatch for
                    ifnet_link_event
           Product: Base System
           Version: Unspecified
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: nakayamakenjiro@gmail.com

Created attachment 255318
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D255318&action=
=3Dedit
patch for rtnl_handle_iflink type mismatch

In sys/net/if_var.h, the type for ifnet_link_event is defined as:

```
/* Interface link state change event */
typedef void (*ifnet_link_event_handler_t)(void *, if_t, int);
EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_event_handler_t);
```

However, in sys/netlink/route/iface.c, the rtnl_handle_iflink() function, w=
hich
only takes two arguments, is registered as a handler for ifnet_link_event.


```
static void
rtnl_handle_iflink(void *arg, if_t ifp)
{
        NL_LOG(LOG_DEBUG2, "ifnet %s", if_name(ifp));
        rtnl_handle_ifevent(ifp, NL_RTM_NEWLINK, 0);
}
   ...
        iflink_event =3D EVENTHANDLER_REGISTER(
            ifnet_link_event, rtnl_handle_iflink, NULL,
            EVENTHANDLER_PRI_ANY);
```

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