netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: netdev@vger.kernel.org
Subject: Re: add ip to interface as primary ip address, not secondary ip when there is alreadly primary ip?
Date: Fri, 20 Sep 2013 02:28:21 +0000 (UTC)	[thread overview]
Message-ID: <l1gbs4$da2$1@ger.gmane.org> (raw)
In-Reply-To: CAK3+h2yWjswp6qrToMPbrQyuyCKkh5Yuuo6TeX8VhGQCGpCecw@mail.gmail.com

On Thu, 19 Sep 2013 at 16:54 GMT, Vincent Li <vincent.mc.li@gmail.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 ||

  reply	other threads:[~2013-09-20  2:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 22:31 add ip to interface as primary ip address, not secondary ip when there is alreadly primary ip? Vincent Li
2013-09-18  0:29 ` Cong Wang
2013-09-19 16:54   ` Vincent Li
2013-09-20  2:28     ` Cong Wang [this message]
2013-09-20  3:53       ` Vincent Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='l1gbs4$da2$1@ger.gmane.org' \
    --to=xiyou.wangcong@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).