summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2011-05-05 14:14:34 +1000
committerDamien Miller <djm@mindrot.org>2011-05-05 14:14:34 +1000
commit91475865997f16a728ae1dc3a98dda957c997a5d (patch)
tree696fda1bb4daa024fa0176dc998c2a67beecc160
parent044f4a6cc39d1c3d109c143c162c4c00fc4df0aa (diff)
- stevesk@cvs.openbsd.org 2011/03/29 18:54:17
[misc.c misc.h servconf.c] print ipqos friendly string for sshd -T; ok markus # sshd -Tf sshd_config|grep ipqos ipqos lowdelay throughput
-rw-r--r--ChangeLog5
-rw-r--r--misc.c15
-rw-r--r--misc.h3
-rw-r--r--servconf.c5
4 files changed, 24 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b12fa96..695f4ed2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,11 @@
- stevesk@cvs.openbsd.org 2011/03/24 22:14:54
[ssh-keygen.c]
use strcasecmp() for "clear" cert permission option also; ok djm
+ - stevesk@cvs.openbsd.org 2011/03/29 18:54:17
+ [misc.c misc.h servconf.c]
+ print ipqos friendly string for sshd -T; ok markus
+ # sshd -Tf sshd_config|grep ipqos
+ ipqos lowdelay throughput
20110221
- (dtucker) [contrib/cygwin/ssh-host-config] From Corinna: revamp of the
diff --git a/misc.c b/misc.c
index 919b04e6..5f63090d 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.84 2010/11/21 01:01:13 djm Exp $ */
+/* $OpenBSD: misc.c,v 1.85 2011/03/29 18:54:17 stevesk Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -985,6 +985,19 @@ parse_ipqos(const char *cp)
return val;
}
+const char *
+iptos2str(int iptos)
+{
+ int i;
+ static char iptos_str[sizeof "0xff"];
+
+ for (i = 0; ipqos[i].name != NULL; i++) {
+ if (ipqos[i].value == iptos)
+ return ipqos[i].name;
+ }
+ snprintf(iptos_str, sizeof iptos_str, "0x%02x", iptos);
+ return iptos_str;
+}
void
sock_set_v6only(int s)
{
diff --git a/misc.h b/misc.h
index 65cf4a61..f3142a95 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.h,v 1.47 2010/11/21 01:01:13 djm Exp $ */
+/* $OpenBSD: misc.h,v 1.48 2011/03/29 18:54:17 stevesk Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -89,6 +89,7 @@ void bandwidth_limit_init(struct bwlimit *, u_int64_t, size_t);
void bandwidth_limit(struct bwlimit *, size_t);
int parse_ipqos(const char *);
+const char *iptos2str(int);
void mktemp_proto(char *, size_t);
/* readpass.c */
diff --git a/servconf.c b/servconf.c
index e2f20a3d..48cb0d5b 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: servconf.c,v 1.213 2010/11/13 23:27:50 djm Exp $ */
+/* $OpenBSD: servconf.c,v 1.214 2011/03/29 18:54:17 stevesk Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -1775,7 +1775,8 @@ dump_config(ServerOptions *o)
}
dump_cfg_string(sPermitTunnel, s);
- printf("ipqos 0x%02x 0x%02x\n", o->ip_qos_interactive, o->ip_qos_bulk);
+ printf("ipqos %s ", iptos2str(o->ip_qos_interactive));
+ printf("%s\n", iptos2str(o->ip_qos_bulk));
channel_print_adm_permitted_opens();
}