[gnome-nettool] Fix netstat routing table display on OpenBSD.
- From: GermÃn Poà CaamaÃo <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nettool] Fix netstat routing table display on OpenBSD.
- Date: Wed, 13 Jul 2011 03:08:09 +0000 (UTC)
commit de912b09b281ea9c8645f9b3870c1635f1db4fea
Author: Antoine Jacoutot <ajacoutot openbsd org>
Date: Thu Jun 16 11:35:43 2011 +0200
Fix netstat routing table display on OpenBSD.
netstat(1) arguments on OpenBSD differ from Linux, so adapt them
accordingly.
Signed-off-by: GermÃn PÃo-CaamaÃo <gpoo gnome org>
src/netstat.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/netstat.c b/src/netstat.c
index 42cc7e9..6c86cef 100644
--- a/src/netstat.c
+++ b/src/netstat.c
@@ -110,12 +110,20 @@ netstat_get_active_option (Netinfo * netinfo)
g_return_val_if_fail (netinfo != NULL, NULL);
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (netinfo->routing))) {
+#if defined (__OpenBSD__)
+ if (netinfo_is_ipv6_enable ()) {
+ option = g_strdup ("-rn");
+ } else {
+ option = g_strdup ("-rn -f inet");
+ }
+#else
/* Works for Solaris and Linux */
if (netinfo_is_ipv6_enable ()) {
option = g_strdup ("-rn -A inet -A inet6");
} else {
option = g_strdup ("-rn -A inet");
}
+#endif
if (netinfo->stbar_text)
g_free (netinfo->stbar_text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]