From 037dabe80c7ef77c67ac6a51bd7692d108e337e5 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 5 Dec 2010 18:41:16 +0000 Subject: [PATCH 1/1] [packages] olsrd: bring txtinfo/gateways formatting in line with the other output modes SVN-Revision: 24265 --- net/olsrd/Makefile | 2 +- .../patches/100-no_forwarding_override.patch | 6 +++--- .../200-txtinfo_gateways_formatting.patch | 20 +++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 net/olsrd/patches/200-txtinfo_gateways_formatting.patch diff --git a/net/olsrd/Makefile b/net/olsrd/Makefile index 3d0cc53c7d..c7c6341385 100644 --- a/net/olsrd/Makefile +++ b/net/olsrd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=olsrd PKG_VERSION:=0.6.1 -PKG_RELEASE:=1 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.olsr.org/releases/0.6 diff --git a/net/olsrd/patches/100-no_forwarding_override.patch b/net/olsrd/patches/100-no_forwarding_override.patch index 1a54574ef7..16658e30bd 100644 --- a/net/olsrd/patches/100-no_forwarding_override.patch +++ b/net/olsrd/patches/100-no_forwarding_override.patch @@ -1,6 +1,6 @@ --- a/src/linux/net.c +++ b/src/linux/net.c -@@ -171,11 +171,13 @@ static bool is_at_least_linuxkernel_2_6_ +@@ -174,11 +174,13 @@ static bool is_at_least_linuxkernel_2_6_ */ void net_os_set_global_ifoptions(void) { @@ -14,7 +14,7 @@ if (olsr_cnf->smart_gw_active) { char procfile[FILENAME_MAX]; -@@ -266,10 +268,12 @@ net_os_restore_ifoptions(void) +@@ -273,10 +275,12 @@ net_os_restore_ifoptions(void) OLSR_PRINTF(1, "Restoring network state\n"); @@ -25,5 +25,5 @@ } +#endif - if (olsr_cnf->smart_gw_active) { + if (olsr_cnf->smart_gw_active && (olsr_cnf->ip_version == AF_INET || olsr_cnf->use_niit)) { /* Generate the procfile name */ diff --git a/net/olsrd/patches/200-txtinfo_gateways_formatting.patch b/net/olsrd/patches/200-txtinfo_gateways_formatting.patch new file mode 100644 index 0000000000..caf4253f34 --- /dev/null +++ b/net/olsrd/patches/200-txtinfo_gateways_formatting.patch @@ -0,0 +1,20 @@ +--- a/lib/txtinfo/src/olsrd_txtinfo.c ++++ b/lib/txtinfo/src/olsrd_txtinfo.c +@@ -562,7 +562,7 @@ ipc_print_gateway(struct autobuf *abuf) + struct lqtextbuffer lqbuf; + + // Status IP ETX Hopcount Uplink-Speed Downlink-Speed ipv4/ipv4-nat/- ipv6/- ipv6-prefix/- +- abuf_puts(abuf, "Table: Gateways\n Gateway\tETX\tHopcnt\tUplink\tDownlnk\tIPv4\tIPv6\tPrefix\n"); ++ abuf_puts(abuf, "Table: Gateways\nGateway\tETX\tHopcnt\tUplink\tDownlnk\tIPv4\tIPv6\tPrefix\n"); + OLSR_FOR_ALL_GATEWAY_ENTRIES(gw) { + char v4 = '-', v6 = '-'; + bool autoV4 = false, autoV6 = false; +@@ -595,7 +595,7 @@ ipc_print_gateway(struct autobuf *abuf) + v6type = IPV6; + } + +- abuf_appendf(abuf, "%c%c %s\t%s\t%d\t%u\t%u\t%s\t%s\t%s\n", ++ abuf_appendf(abuf, "%c%c\t%s\t%s\t%d\t%u\t%u\t%s\t%s\t%s\n", + v4, v6, olsr_ip_to_string(&buf, &gw->originator), + get_linkcost_text(tc->path_cost, true, &lqbuf), tc->hops, + gw->uplink, gw->downlink, v4type, v6type, -- 2.30.2