[packages] olsrd: bring txtinfo/gateways formatting in line with the other output...
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Dec 2010 18:41:16 +0000 (18:41 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 5 Dec 2010 18:41:16 +0000 (18:41 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages/net/olsrd@24265 3c298f89-4303-0410-b956-a3cf2f4a3e73

Makefile
patches/100-no_forwarding_override.patch
patches/200-txtinfo_gateways_formatting.patch [new file with mode: 0644]

index 3d0cc53..c7c6341 100644 (file)
--- a/Makefile
+++ b/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
index 1a54574..16658e3 100644 (file)
@@ -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/patches/200-txtinfo_gateways_formatting.patch b/patches/200-txtinfo_gateways_formatting.patch
new file mode 100644 (file)
index 0000000..caf4253
--- /dev/null
@@ -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,