aboutsummaryrefslogtreecommitdiff
path: root/networking/libiproute
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-04-07 18:14:46 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-04-07 18:14:46 +0200
commit4eaa0f7729e96660f69a6c4f4db6d608c420c05d (patch)
treea31ae101e71eaf99dfbff73a05b2d3f34e0c7e64 /networking/libiproute
parenteb76abb4f7093f05770f0d0fa2c69a54c5542d4e (diff)
downloadbusybox-w32-4eaa0f7729e96660f69a6c4f4db6d608c420c05d.tar.gz
busybox-w32-4eaa0f7729e96660f69a6c4f4db6d608c420c05d.tar.bz2
busybox-w32-4eaa0f7729e96660f69a6c4f4db6d608c420c05d.zip
ipaddress: tweak help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/libiproute')
-rw-r--r--networking/libiproute/ipaddress.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c
index d9e099607..36d6b65c6 100644
--- a/networking/libiproute/ipaddress.c
+++ b/networking/libiproute/ipaddress.c
@@ -593,9 +593,13 @@ static int default_scope(inet_prefix *lcl)
593/* Return value becomes exitcode. It's okay to not return at all */ 593/* Return value becomes exitcode. It's okay to not return at all */
594static int ipaddr_modify(int cmd, int flags, char **argv) 594static int ipaddr_modify(int cmd, int flags, char **argv)
595{ 595{
596 /* If you add stuff here, update ipaddr_full_usage */
596 static const char option[] ALIGN1 = 597 static const char option[] ALIGN1 =
597 "peer\0""remote\0""broadcast\0""brd\0" 598 "peer\0""remote\0""broadcast\0""brd\0"
598 "anycast\0""scope\0""dev\0""label\0""local\0"; 599 "anycast\0""scope\0""dev\0""label\0""local\0";
600#define option_peer option
601#define option_broadcast (option + sizeof("peer") + sizeof("remote"))
602#define option_anycast (option_broadcast + sizeof("broadcast") + sizeof("brd"))
599 struct rtnl_handle rth; 603 struct rtnl_handle rth;
600 struct { 604 struct {
601 struct nlmsghdr n; 605 struct nlmsghdr n;
@@ -627,7 +631,7 @@ static int ipaddr_modify(int cmd, int flags, char **argv)
627 631
628 if (arg <= 1) { /* peer, remote */ 632 if (arg <= 1) { /* peer, remote */
629 if (peer_len) { 633 if (peer_len) {
630 duparg("peer", *argv); 634 duparg(option_peer, *argv);
631 } 635 }
632 get_prefix(&peer, *argv, req.ifa.ifa_family); 636 get_prefix(&peer, *argv, req.ifa.ifa_family);
633 peer_len = peer.bytelen; 637 peer_len = peer.bytelen;
@@ -639,7 +643,7 @@ static int ipaddr_modify(int cmd, int flags, char **argv)
639 } else if (arg <= 3) { /* broadcast, brd */ 643 } else if (arg <= 3) { /* broadcast, brd */
640 inet_prefix addr; 644 inet_prefix addr;
641 if (brd_len) { 645 if (brd_len) {
642 duparg("broadcast", *argv); 646 duparg(option_broadcast, *argv);
643 } 647 }
644 if (LONE_CHAR(*argv, '+')) { 648 if (LONE_CHAR(*argv, '+')) {
645 brd_len = -1; 649 brd_len = -1;
@@ -655,7 +659,7 @@ static int ipaddr_modify(int cmd, int flags, char **argv)
655 } else if (arg == 4) { /* anycast */ 659 } else if (arg == 4) { /* anycast */
656 inet_prefix addr; 660 inet_prefix addr;
657 if (any_len) { 661 if (any_len) {
658 duparg("anycast", *argv); 662 duparg(option_anycast, *argv);
659 } 663 }
660 get_addr(&addr, *argv, req.ifa.ifa_family); 664 get_addr(&addr, *argv, req.ifa.ifa_family);
661 if (req.ifa.ifa_family == AF_UNSPEC) { 665 if (req.ifa.ifa_family == AF_UNSPEC) {