diff -ur iproute2/ip/ipaddress.c iproute2-noarp/ip/ipaddress.c --- iproute2/ip/ipaddress.c Sun Sep 10 19:03:26 2000 +++ iproute2-noarp/ip/ipaddress.c Sun May 27 19:07:13 2001 @@ -60,7 +60,7 @@ if (do_link) { iplink_usage(); } - fprintf(stderr, "Usage: ip addr {add|del} IFADDR dev STRING\n"); + fprintf(stderr, "Usage: ip addr {add|del} IFADDR dev STRING [ hidden ]\n"); fprintf(stderr, " ip addr {show|flush} [ dev STRING ] [ scope SCOPE-ID ]\n"); fprintf(stderr, " [ to PREFIX ] [ FLAG-LIST ] [ label PATTERN ]\n"); fprintf(stderr, "IFADDR := PREFIX | ADDR peer PREFIX\n"); @@ -69,7 +69,7 @@ fprintf(stderr, "SCOPE-ID := [ host | link | global | NUMBER ]\n"); fprintf(stderr, "FLAG-LIST := [ FLAG-LIST ] FLAG\n"); fprintf(stderr, "FLAG := [ permanent | dynamic | secondary | primary |\n"); - fprintf(stderr, " tentative | deprecated ]\n"); + fprintf(stderr, " tentative | deprecated | hidden ]\n"); exit(-1); } @@ -400,6 +400,12 @@ ifa->ifa_flags &= ~IFA_F_SECONDARY; fprintf(fp, "secondary "); } +#ifdef IFA_F_HIDDEN + if (ifa->ifa_flags&IFA_F_HIDDEN) { + ifa->ifa_flags &= ~IFA_F_HIDDEN; + fprintf(fp, "hidden "); + } +#endif if (ifa->ifa_flags&IFA_F_TENTATIVE) { ifa->ifa_flags &= ~IFA_F_TENTATIVE; fprintf(fp, "tentative "); @@ -541,6 +547,11 @@ } else if (strcmp(*argv, "primary") == 0) { filter.flags &= ~IFA_F_SECONDARY; filter.flagmask |= IFA_F_SECONDARY; +#ifdef IFA_F_HIDDEN + } else if (strcmp(*argv, "hidden") == 0) { + filter.flags &= ~IFA_F_HIDDEN; + filter.flagmask |= IFA_F_HIDDEN; +#endif } else if (strcmp(*argv, "tentative") == 0) { filter.flags |= IFA_F_TENTATIVE; filter.flagmask |= IFA_F_TENTATIVE; @@ -792,6 +803,11 @@ } else if (strcmp(*argv, "dev") == 0) { NEXT_ARG(); d = *argv; + } else if (strcmp(*argv, "hidden") == 0 || + strcmp(*argv, "noarp") == 0) { +#ifdef IFA_F_HIDDEN + req.ifa.ifa_flags |= IFA_F_HIDDEN; +#endif } else if (strcmp(*argv, "label") == 0) { NEXT_ARG(); l = *argv; diff -ur iproute2/ip/iproute.c iproute2-noarp/ip/iproute.c --- iproute2/ip/iproute.c Sat Sep 9 18:31:13 2000 +++ iproute2-noarp/ip/iproute.c Sun May 27 16:44:12 2001 @@ -61,7 +61,7 @@ fprintf(stderr, " unreachable | prohibit | blackhole | nat ]\n"); fprintf(stderr, "TABLE_ID := [ local | main | default | all | NUMBER ]\n"); fprintf(stderr, "SCOPE := [ host | link | global | NUMBER ]\n"); - fprintf(stderr, "FLAGS := [ equalize ]\n"); + fprintf(stderr, "FLAGS := [ equalize | noarp ]\n"); fprintf(stderr, "NHFLAGS := [ onlink | pervasive ]\n"); fprintf(stderr, "RTPROTO := [ kernel | boot | static | NUMBER ]\n"); exit(-1); @@ -355,6 +355,10 @@ fprintf(fp, "pervasive "); if (r->rtm_flags & RTM_F_EQUALIZE) fprintf(fp, "equalize "); +#ifdef RTM_F_NOARP + if (r->rtm_flags & RTM_F_NOARP) + fprintf(fp, "noarp "); +#endif if (r->rtm_flags & RTM_F_NOTIFY) fprintf(fp, "notify "); @@ -392,6 +396,9 @@ PRTFL(REDIRECTED, "redirected"); PRTFL(DOREDIRECT, "redirect"); PRTFL(FAST, "fastroute"); +#ifdef RTCF_NOARP + PRTFL(NOARP, "noarp"); +#endif PRTFL(NOTIFY, "notify"); #ifdef RTCF_EQUALIZE PRTFL(EQUALIZE, "equalize"); @@ -801,6 +808,10 @@ } else if (matches(*argv, "equalize") == 0 || strcmp(*argv, "eql") == 0) { req.r.rtm_flags |= RTM_F_EQUALIZE; +#ifdef RTM_F_NOARP + } else if (matches(*argv, "noarp") == 0) { + req.r.rtm_flags |= RTM_F_NOARP; +#endif } else if (strcmp(*argv, "nexthop") == 0) { nhs_ok = 1; break;