[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK3+h2xdZFSQFGm9W+HDP3nOsAhgrz1A=9MNtGP9bRbBXb7OJQ@mail.gmail.com>
Date: Thu, 19 Sep 2013 20:53:48 -0700
From: Vincent Li <vincent.mc.li@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: add ip to interface as primary ip address, not secondary ip when
there is alreadly primary ip?
yes, I found them too, they are for 'ip addr show' or 'ip addr list'
though, not for 'ip addr add' unless I am missing something obvious.
care to clarify further ?
Vincent
On Thu, Sep 19, 2013 at 7:28 PM, Cong Wang <xiyou.wangcong@...il.com> wrote:
> On Thu, 19 Sep 2013 at 16:54 GMT, Vincent Li <vincent.mc.li@...il.com> wrote:
>> thanks for the pointer
>>
>> 'ip addr' indeed has flag IFA_F_SECONDARY for this, but it is not
>> available for 'ip addr add', so I made a simple patch for iproute2
>> ip/ipaddress.c as below:
>
> % git grep secondary ip/ipaddress.c
> ip/ipaddress.c: fprintf(stderr, "FLAG := [ permanent | dynamic |
> secondary | primary |\n");
> ip/ipaddress.c: fprintf(fp, "secondary ");
> ip/ipaddress.c:static int print_addrinfo_secondary(const struct
> sockaddr_nl *who,
> ip/ipaddress.c: .filter =
> print_addrinfo_secondary,
> ip/ipaddress.c: } else if (strcmp(*argv, "secondary") == 0 ||
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists