On Tue, 2014-05-06 at 10:41 -0700, Justin Maggard wrote:
> If you are using a bond interface, the bond interface and the slave
> interfaces will share the same MAC address.  This can eventually
> cause connman to crash, because several things depend on a unique
> MAC address per interface.
> 
> We can just skip slave interfaces altogether, since connman can't
> do anything with them anyway.
> ---
>  src/rtnl.c |   11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/src/rtnl.c b/src/rtnl.c
> index be1bce9..77d1922 100644
> --- a/src/rtnl.c
> +++ b/src/rtnl.c
> @@ -431,6 +431,12 @@ static void process_newlink(unsigned short type, int 
> index, unsigned flags,
>                                               address.ether_addr_octet[4],
>                                               address.ether_addr_octet[5]);
>  
> +     if (flags & IFF_SLAVE) {
> +             connman_info("%s {newlink} ignoring slave, index %d address %s",
> +                                             ifname, index, str);
> +             return;
> +     }
> +
>       switch (type) {
>       case ARPHRD_ETHER:
>       case ARPHRD_LOOPBACK:
> @@ -442,9 +448,8 @@ static void process_newlink(unsigned short type, int 
> index, unsigned flags,
>               break;
>       }
>  
> -     if (memcmp(&address, &compare, ETH_ALEN) != 0)
> -             connman_info("%s {newlink} index %d address %s mtu %u",
> -                                             ifname, index, str, mtu);
> +     connman_info("%s {newlink} index %d address %s mtu %u",
> +                                     ifname, index, str, mtu);
>  
>       if (operstate != 0xff)
>               connman_info("%s {newlink} index %d operstate %u <%s>",

  CC     src/src_connmand-rtnl.o
src/rtnl.c: In function ‘process_newlink’:
src/rtnl.c:405:20: error: unused variable ‘compare’ [-Werror=unused-variable]
  struct ether_addr compare = {{ 0, 0, 0, 0, 0, 0 }};

We'd like to get rid of 'compare' as well as it's not used anymore.

Cheers,

        Patrik

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to