diff -rNu iproute2-2.2.4-now-ss000305/ip/ipaddress.c iproute2-2.2.4-now-ss000305_no_ndisc/ip/ipaddress.c --- iproute2-2.2.4-now-ss000305/ip/ipaddress.c Sun Mar 5 14:33:32 2000 +++ iproute2-2.2.4-now-ss000305_no_ndisc/ip/ipaddress.c Sat Jun 3 23:10:03 2000 @@ -10,6 +10,7 @@ * * Changes: * Laszlo Valko 990223: address label must be zero terminated + * Jerome Etienne 000603: support of no_ndisc */ #include @@ -65,11 +66,11 @@ fprintf(stderr, " [ to PREFIX ] [ FLAG-LIST ] [ label PATTERN ]\n"); fprintf(stderr, "IFADDR := PREFIX | ADDR peer PREFIX\n"); fprintf(stderr, " [ broadcast ADDR ] [ anycast ADDR ]\n"); - fprintf(stderr, " [ label STRING ] [ scope SCOPE-ID ]\n"); + fprintf(stderr, " [ label STRING ] [ scope SCOPE-ID ] [ no_ndisc ]\n"); 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 | no_ndisc ]\n"); exit(-1); } @@ -401,6 +402,10 @@ ifa->ifa_flags &= ~IFA_F_DEPRECATED; fprintf(fp, "deprecated "); } + if (ifa->ifa_flags&IFA_F_NO_NDISC) { + ifa->ifa_flags &= ~IFA_F_NO_NDISC; + fprintf(fp, "no_ndisc "); + } if (!(ifa->ifa_flags&IFA_F_PERMANENT)) { fprintf(fp, "dynamic "); } else @@ -540,6 +545,9 @@ } else if (strcmp(*argv, "deprecated") == 0) { filter.flags |= IFA_F_DEPRECATED; filter.flagmask |= IFA_F_DEPRECATED; + } else if (strcmp(*argv, "no_ndisc") == 0) { + filter.flags |= IFA_F_NO_NDISC; + filter.flagmask |= IFA_F_NO_NDISC; } else if (strcmp(*argv, "label") == 0) { NEXT_ARG(); filter.label = *argv; @@ -737,8 +745,10 @@ req.ifa.ifa_family = preferred_family; while (argc > 0) { - if (strcmp(*argv, "peer") == 0 || - strcmp(*argv, "remote") == 0) { + if ( strcmp(*argv, "no_ndisc") == 0 ){ + req.ifa.ifa_flags |= IFA_F_NO_NDISC; + } else if (strcmp(*argv, "peer") == 0 || + strcmp(*argv, "remote") == 0) { NEXT_ARG(); if (peer_len)