issue with bridge handling

Oliver, Jef jef.oliver at intel.com
Tue Nov 28 13:13:40 PST 2017


Patch to fix issue sent for your review.

> -----Original Message-----
> From: Oliver, Jef
> Sent: Tuesday, November 28, 2017 11:22 AM
> To: 'Thomas Haller' <thaller at redhat.com>; libnl at lists.infradead.org
> Subject: RE: issue with bridge handling
> 
> I have narrowed down the cause. The issue arises when building the change
> request for the link and the special case of this being a bridge. On links, the
> request type needs to be RTM_NEWLINK. But, because this is a bridge, some
> operations require a change request of RTM_SETLINK. This is controlled by the
> ao_override_rtm that I introduced. (Spotted in af_request_type in
> lib/route/link.c)
> 
> The RTM_SETLINK only needs to be applied if bridge flags are being set.
> (IFLA_BRPORT_GUARD, IFLA_BRPORT_MODE, etc...) These flags are set with
> ao_fill_pi, which is called to fill IFLA_PROTINFO. (Nested attribute) I am working
> on a patch that will only set ao_override_rtm if ao_fill_pi needs to be run.
> 
> Thanks,
> Jef
> 
> > -----Original Message-----
> > From: Thomas Haller [mailto:thaller at redhat.com]
> > Sent: Tuesday, November 28, 2017 7:50 AM
> > To: Oliver, Jef <jef.oliver at intel.com>; libnl at lists.infradead.org
> > Subject: Re: issue with bridge handling
> >
> > On Tue, 2017-11-28 at 14:55 +0000, Oliver, Jef wrote:
> > > Thomas,
> > >
> > > I will investigate and send a patch if required. Can you provide the
> > > kernel version you are using, or if this is happening on multiple
> > > kernels?
> >
> > Hi Jef,
> >
> > Thanks, I'd be highly appreciated if you can find the time!!
> >
> > I didn't look into it yet except a quick git-bisect.
> > I only tested it on Fedora 27 kernel: 4.13.13-300.fc27.x86_64
> >
> >
> > best,
> > Thomas
> >
> >
> > >
> > > Thank You,
> > > Jef
> > >
> > >
> > > -------- Original message --------
> > > From: Thomas Haller <thaller at redhat.com>
> > > Date: 11/28/17 6:13 AM (GMT-08:00)
> > > To: libnl at lists.infradead.org
> > > Cc: "Oliver, Jef" <jef.oliver at intel.com>
> > > Subject: issue with bridge handling
> > >
> > > Hi,
> > >
> > > seems something with bridge handling is broken since commit:
> > >
> >
> https://github.com/thom311/libnl/commit/55bc931a7272e6ac8f555bcc2a373
> > > eb2b6b58377
> > >
> > >   ip link add name br0 type bridge
> > >   ./src/nl-link-set -n br0 --state=up
> > >
> > > fails now with:
> > > Error: Unable to change link: Operation not supported
> > >
> > >
> > > Just a heads up. It needs investigation.
> > > (as always, patches welcome ;-) )
> > >
> > > best
> > > Thomas


More information about the libnl mailing list