On Fri, Mar 01, 2019 at 12:36:08PM +0800, Hangbin Liu wrote:
> Cause there is a genl_open() in get_team_active_iface().
...
> Oh, I got what you mean. OK, how about just close the fd directly in
> get_team_active_iface() since we didn't use rtnl_buf there. Then I
> can move this check back.
You
On Thu, Feb 28, 2019 at 07:36:29AM -0800, Richard Cochran wrote:
> On Thu, Feb 28, 2019 at 09:22:22PM +0800, Hangbin Liu wrote:
> > v3: a) Do not make rtnl_buf global as it may be freed by calling
> > rtnl_close()
> >while we are using it in rtnl_link_status()
>
> This fix is wrong. You
On Thu, Feb 28, 2019 at 07:36:29AM -0800, Richard Cochran wrote:
> > +no_info:
> > + rtnl_close(fd);
> > + return len;
> > +}
>
> Here len is -1, as an error flag. Why simply propagate that error
> correct up the call stack?
>
> No need for rtnl_close() here.
The proper usage is:
r
On Thu, Feb 28, 2019 at 09:22:22PM +0800, Hangbin Liu wrote:
> v3: a) Do not make rtnl_buf global as it may be freed by calling rtnl_close()
>while we are using it in rtnl_link_status()
This fix is wrong. You added a call to rtnl_close() for (AFAICT) no
good reason. That is the bug.
>
On Thu, Feb 28, 2019 at 09:22:22PM +0800, Hangbin Liu wrote:
> This patch add team interface activebackup mode support. As linux team use
> genl netlink message, when we get a rtnl link change notify, we have to setup
> a new genl socket and request the current active port.
The patch looks good to