Ricardo Mestre([email protected]) on 2015.11.13 18:00:11 +0000:
> Hello,
> 
> If '-n' argument is used on route(8) then nflag will be active and dns
> transactions won't be needed, am I correct?

please find out yourself.

at least the pledge call in monitor will fail with -n and your diff,
so some more work is required.

> Index: route.c
> ===================================================================
> RCS file: /cvs/src/sbin/route/route.c,v
> retrieving revision 1.179
> diff -u -p -u -r1.179 route.c
> --- route.c   25 Oct 2015 09:37:08 -0000      1.179
> +++ route.c   13 Nov 2015 15:37:37 -0000
> @@ -227,7 +227,7 @@ main(int argc, char **argv)
>       }
>               
>       if (nflag) {
> -             if (pledge("stdio rpath dns", NULL) == -1)
> +             if (pledge("stdio rpath", NULL) == -1)
>                       err(1, "pledge");
>       } else {
>               if (pledge("stdio rpath dns", NULL) == -1)
> @@ -330,7 +330,7 @@ flushroutes(int argc, char **argv)
>       }
>  
>       if (nflag) {
> -             if (pledge("stdio rpath dns", NULL) == -1)
> +             if (pledge("stdio rpath", NULL) == -1)
>                       err(1, "pledge");
>       } else {
>               if (pledge("stdio rpath dns", NULL) == -1)
> Index: show.c
> ===================================================================
> RCS file: /cvs/src/sbin/route/show.c,v
> retrieving revision 1.102
> diff -u -p -u -r1.102 show.c
> --- show.c    23 Oct 2015 15:03:25 -0000      1.102
> +++ show.c    13 Nov 2015 15:37:37 -0000
> @@ -146,7 +146,7 @@ p_rttables(int af, u_int tableid, int ha
>       }
>  
>       if (nflag) {
> -             if (pledge("stdio rpath dns", NULL) == -1)
> +             if (pledge("stdio rpath", NULL) == -1)
>                       err(1, "pledge");
>       } else {
>               if (pledge("stdio rpath dns", NULL) == -1)
> 
> Best regards,
> Ricardo Mestre
> 

-- 

Reply via email to