Re: [B.A.T.M.A.N.] [PATCH 1/2] batman-adv: free an hard-interface before adding it

Antonio Quartulli
2013-02-16T12:35:12Z

[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]

On Sat, Feb 16, 2013 at 08:22:37PM +0800, Marek Lindner wrote:
> On Tuesday, February 12, 2013 23:21:55 Antonio Quartulli wrote:
> > @@ -347,6 +342,13 @@ int batadv_hardif_enable_interface(struct
> > batadv_hard_iface *hard_iface, goto err_dev;
> > }
> >
> > + /* check if the interface is enslaved in another virtual one and
> > + * in that case unlink it first
> > + */
> > + master = netdev_master_upper_dev_get(hard_iface->net_dev);
> > + if (master)
> > + netdev_upper_dev_unlink(hard_iface->net_dev, master);
> > +
> > hard_iface->soft_iface = soft_iface;
> > bat_priv = netdev_priv(hard_iface->soft_iface);
>
> Seems we need some compat code here:
>
> hard-interface.c:348:2: error: implicit declaration of function
> 'netdev_master_upper_dev_get'

Correct. I'm not used to test code for master on kernel older than net-next.
I'll send v2 with the proper support for ancient kernels.

Cheers (:D),

--
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]