summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2006-04-21 16:36:39 +0000
committerclaudio <claudio@openbsd.org>2006-04-21 16:36:39 +0000
commita5bcf77abbafeb8900d590dc9b7cf197334ad327 (patch)
tree8eacf91fbfc1c225fecfcb777aff31882a3b20f0
parentmake udcf work as a SENSOR_TIMEDELTA type sensor. The sensor value is the (diff)
downloadwireguard-openbsd-a5bcf77abbafeb8900d590dc9b7cf197334ad327.tar.xz
wireguard-openbsd-a5bcf77abbafeb8900d590dc9b7cf197334ad327.zip
Add IFT_PPP to the iftype to ifmedia type conversion function. Now P2P links
will show the correct link state. While there do some cleanup and shorten the output if the media or link state is unknown.
-rw-r--r--usr.sbin/ospfctl/ospfctl.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/usr.sbin/ospfctl/ospfctl.c b/usr.sbin/ospfctl/ospfctl.c
index 5772466f1ae..e6b00dbe16b 100644
--- a/usr.sbin/ospfctl/ospfctl.c
+++ b/usr.sbin/ospfctl/ospfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfctl.c,v 1.32 2006/03/26 09:47:54 norby Exp $ */
+/* $OpenBSD: ospfctl.c,v 1.33 2006/04/21 16:36:39 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -332,19 +332,16 @@ get_ifms_type(int mediatype)
switch (mediatype) {
case IFT_ETHER:
return (IFM_ETHER);
- break;
case IFT_FDDI:
return (IFM_FDDI);
- break;
case IFT_ISO88025:
return (IFM_TOKEN);
- break;
case IFT_CARP:
return (IFM_CARP);
- break;
+ case IFT_PPP:
+ return (IFM_TDM);
default:
return (0);
- break;
}
}
@@ -1180,7 +1177,7 @@ get_media_descr(int media_type)
if (media_type == p->ifmt_word)
return (p->ifmt_string);
- return ("unknown media");
+ return ("unknown");
}
const char *
@@ -1200,7 +1197,7 @@ get_linkstate(int media_type, int link_state)
return (p->ifms_string[link_state == LINK_STATE_UP]);
}
- return ("unknown link state");
+ return ("unknown");
}
void