diff options
author | Jakob Schlyter <jakob@cvs.openbsd.org> | 2003-01-20 21:37:00 +0000 |
---|---|---|
committer | Jakob Schlyter <jakob@cvs.openbsd.org> | 2003-01-20 21:37:00 +0000 |
commit | fcba4afeb17a3a143b0ef5959eb6727c05d628f7 (patch) | |
tree | 608ec646c2d1957d37e32c84300010c52eb8aed6 | |
parent | 2ba2f62de600424a7c704a20df974a1c27776b1e (diff) |
add option to force IPv4/IPv6
-rw-r--r-- | usr.sbin/bind/bin/dig/dig.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/usr.sbin/bind/bin/dig/dig.c b/usr.sbin/bind/bin/dig/dig.c index babb6bef40d..530cac3201d 100644 --- a/usr.sbin/bind/bin/dig/dig.c +++ b/usr.sbin/bind/bin/dig/dig.c @@ -162,6 +162,8 @@ help(void) { " -c class (specify query class)\n" " -k keyfile (specify tsig key file)\n" " -y name:key (specify named base64 tsig key)\n" +" -4 (force IPv4 query transport)\n" +" -6 (force IPv6 query transport)\n" " d-opt is of the form +keyword[=value], where keyword is:\n" " +[no]vc (TCP mode)\n" " +[no]tcp (TCP mode, alternate syntax)\n" @@ -912,6 +914,18 @@ dash_option(char *option, char *next, dig_lookup_t **lookup, case 'n': nibble = ISC_TRUE; return (ISC_FALSE); + case '4': + if (have_ipv4) + have_ipv6 = ISC_FALSE; + else + fatal("can't find v4 networking"); + return (ISC_FALSE); + case '6': + if (have_ipv6) + have_ipv4 = ISC_FALSE; + else + fatal("can't find v6 networking"); + return (ISC_FALSE); } if (value == NULL) goto invalid_option; |