-diff -ur olsrd-0-5-6-fc691af9a18d.orig/Makefile.inc olsrd-0-5-6-fc691af9a18d/Makefile.inc
---- olsrd-0-5-6-fc691af9a18d.orig/Makefile.inc 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/Makefile.inc 2009-03-15 16:32:39.000000000 +0000
-@@ -205,6 +205,10 @@
+--- a/Makefile.inc
++++ b/Makefile.inc
+@@ -204,6 +204,10 @@
$(warning Use CPPFLAGS instead of DEFINES for -D)
endif
TAGFILE ?= src/TAGS
help:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/lib/bmf/src/NetworkInterfaces.c olsrd-0-5-6-fc691af9a18d/lib/bmf/src/NetworkInterfaces.c
---- olsrd-0-5-6-fc691af9a18d.orig/lib/bmf/src/NetworkInterfaces.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/lib/bmf/src/NetworkInterfaces.c 2009-03-15 16:32:39.000000000 +0000
+--- a/lib/bmf/src/NetworkInterfaces.c
++++ b/lib/bmf/src/NetworkInterfaces.c
@@ -544,7 +544,9 @@
OLSR_PRINTF(9, "%s: ----> Not forwarding to %s: no link found\n", PLUGIN_NAME_SHORT,
olsr_ip_to_string(&buf, &walker->neighbor_iface_addr));
OLSR_PRINTF(9, "%s: ----> Not forwarding to %s: \"%s\" gives a better link to this neighbor, costing %5.2f\n",
PLUGIN_NAME_SHORT, olsr_ip_to_string(&buf, &walker->neighbor_iface_addr), bestIntf->int_name,
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/lib/httpinfo/Makefile olsrd-0-5-6-fc691af9a18d/lib/httpinfo/Makefile
---- olsrd-0-5-6-fc691af9a18d.orig/lib/httpinfo/Makefile 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/lib/httpinfo/Makefile 2009-03-15 16:32:39.000000000 +0000
+--- a/lib/httpinfo/Makefile
++++ b/lib/httpinfo/Makefile
@@ -47,7 +47,11 @@
CPPFLAGS += -DADMIN_INTERFACE
endif
default_target: $(PLUGIN_FULLNAME)
ifdef ADMIN_INTERFACE
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/lib/httpinfo/src/olsrd_httpinfo.c olsrd-0-5-6-fc691af9a18d/lib/httpinfo/src/olsrd_httpinfo.c
---- olsrd-0-5-6-fc691af9a18d.orig/lib/httpinfo/src/olsrd_httpinfo.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/lib/httpinfo/src/olsrd_httpinfo.c 2009-03-15 16:59:39.000000000 +0000
+--- a/lib/httpinfo/src/olsrd_httpinfo.c
++++ b/lib/httpinfo/src/olsrd_httpinfo.c
@@ -67,7 +67,9 @@
#include "olsrd_httpinfo.h"
static int
check_allowed_ip(const struct allowed_net *const allowed_nets, const union olsr_ip_addr *const addr)
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/lib/nameservice/src/nameservice.c olsrd-0-5-6-fc691af9a18d/lib/nameservice/src/nameservice.c
---- olsrd-0-5-6-fc691af9a18d.orig/lib/nameservice/src/nameservice.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/lib/nameservice/src/nameservice.c 2009-03-15 17:04:54.000000000 +0000
+--- a/lib/nameservice/src/nameservice.c
++++ b/lib/nameservice/src/nameservice.c
@@ -65,6 +65,11 @@
#include "mapwrite.h"
#include "compat.h"
/* config parameters */
static char my_hosts_file[MAX_FILE + 1];
static char my_sighup_pid_file[MAX_FILE + 1];
-@@ -73,12 +78,16 @@
- static char my_suffix[MAX_SUFFIX];
- static int my_interval = EMISSION_INTERVAL;
- static double my_timeout = NAME_VALID_TIME;
-+#ifndef SVEN_OLA_UNBLOAT
- static char my_resolv_file[MAX_FILE + 1];
-+#endif /* SVEN_OLA_UNBLOAT */
- static char my_services_file[MAX_FILE + 1];
- static char my_macs_file[MAX_FILE + 1];
-+#ifndef SVEN_OLA_UNBLOAT
- static char my_name_change_script[MAX_FILE + 1];
- static char my_services_change_script[MAX_FILE + 1];
- static char my_macs_change_script[MAX_FILE + 1];
-+#endif
- static char latlon_in_file[MAX_FILE + 1];
- static char my_latlon_file[MAX_FILE + 1];
- float my_lat = 0.0, my_lon = 0.0;
-@@ -102,9 +111,11 @@
- static struct name_entry *my_macs = NULL;
- static bool mac_table_changed = true;
-
-+#ifndef SVEN_OLA_UNBLOAT
- static struct list_node forwarder_list[HASHSIZE];
- static struct name_entry *my_forwarders = NULL;
- static bool forwarder_table_changed = true;
-+#endif /* SVEN_OLA_UNBLOAT */
-
- struct list_node latlon_list[HASHSIZE];
- static bool latlon_table_changed = true;
-@@ -138,7 +149,9 @@
- GetWindowsDirectory(my_hosts_file, MAX_FILE - 12);
- GetWindowsDirectory(my_services_file, MAX_FILE - 12);
- GetWindowsDirectory(my_macs_file, MAX_FILE - 12);
-+#ifndef SVEN_OLA_UNBLOAT
- GetWindowsDirectory(my_resolv_file, MAX_FILE - 12);
-+#endif /* SVEN_OLA_UNBLOAT */
-
- len = strlen(my_hosts_file);
- if (my_hosts_file[len - 1] != '\\')
-@@ -155,15 +168,19 @@
- strscat(my_macs_file, "\\", sizeof(my_macs_file));
- strscat(my_macs_file, "macs_olsr", sizeof(my_macs_file));
-
-+#ifndef SVEN_OLA_UNBLOAT
- len = strlen(my_resolv_file);
- if (my_resolv_file[len - 1] != '\\')
- strscat(my_resolv_file, "\\", sizeof(my_resolv_file));
- strscat(my_resolv_file, "resolvconf_olsr", sizeof(my_resolv_file));
-+#endif /* SVEN_OLA_UNBLOAT */
- #else
- strscpy(my_hosts_file, "/var/run/hosts_olsr", sizeof(my_hosts_file));
- strscpy(my_services_file, "/var/run/services_olsr", sizeof(my_services_file));
- strscpy(my_macs_file, "/var/run/macs_olsr", sizeof(my_macs_file));
-+#ifndef SVEN_OLA_UNBLOAT
- strscpy(my_resolv_file, "/var/run/resolvconf_olsr", sizeof(my_resolv_file));
-+#endif /* SVEN_OLA_UNBLOAT */
- *my_sighup_pid_file = 0;
- #endif
-
-@@ -171,14 +188,18 @@
- my_add_hosts[0] = '\0';
- my_latlon_file[0] = '\0';
- latlon_in_file[0] = '\0';
-+#ifndef SVEN_OLA_UNBLOAT
- my_name_change_script[0] = '\0';
- my_services_change_script[0] = '\0';
- my_macs_change_script[0] = '\0';
-+#endif /* SVEN_OLA_UNBLOAT */
-
- /* init the lists heads */
- for (i = 0; i < HASHSIZE; i++) {
- list_head_init(&name_list[i]);
-+#ifndef SVEN_OLA_UNBLOAT
- list_head_init(&forwarder_list[i]);
-+#endif /* SVEN_OLA_UNBLOAT */
- list_head_init(&service_list[i]);
- list_head_init(&mac_list[i]);
- list_head_init(&latlon_list[i]);
-@@ -186,6 +207,7 @@
-
- }
-
-+#ifndef SVEN_OLA_UNBLOAT
- static int
- set_nameservice_server(const char *value, void *data, set_plugin_parameter_addon addon)
- {
-@@ -204,6 +226,7 @@
- }
- return 1;
- }
-+#endif /* SVEN_OLA_UNBLOAT */
-
- static int
- set_nameservice_name(const char *value, void *data, set_plugin_parameter_addon addon)
-@@ -253,10 +276,12 @@
- { .name = "timeout", .set_plugin_parameter = &set_nameservice_float, .data = &my_timeout },
- { .name = "sighup-pid-file", .set_plugin_parameter = &set_plugin_string, .data = &my_sighup_pid_file, .addon = {sizeof(my_sighup_pid_file)} },
- { .name = "hosts-file", .set_plugin_parameter = &set_plugin_string, .data = &my_hosts_file, .addon = {sizeof(my_hosts_file)} },
-+#ifndef SVEN_OLA_UNBLOAT
- { .name = "name-change-script", .set_plugin_parameter = &set_plugin_string, .data = &my_name_change_script, .addon = {sizeof(my_name_change_script)} },
- { .name = "services-change-script", .set_plugin_parameter = &set_plugin_string, .data = &my_services_change_script, .addon = {sizeof(my_services_change_script)} },
- { .name = "macs-change-script", .set_plugin_parameter = &set_plugin_string, .data = &my_macs_change_script, .addon = {sizeof(my_macs_change_script)} },
- { .name = "resolv-file", .set_plugin_parameter = &set_plugin_string, .data = &my_resolv_file, .addon = {sizeof(my_resolv_file)} },
-+#endif /* SVEN_OLA_UNBLOAT */
- { .name = "suffix", .set_plugin_parameter = &set_plugin_string, .data = &my_suffix, .addon = {sizeof(my_suffix)} },
- { .name = "add-hosts", .set_plugin_parameter = &set_plugin_string, .data = &my_add_hosts, .addon = {sizeof(my_add_hosts)} },
- { .name = "services-file", .set_plugin_parameter = &set_plugin_string, .data = &my_services_file, .addon = {sizeof(my_services_file)} },
-@@ -265,7 +290,9 @@
- { .name = "lon", .set_plugin_parameter = &set_nameservice_float, .data = &my_lon },
- { .name = "latlon-file", .set_plugin_parameter = &set_plugin_string, .data = &my_latlon_file, .addon = {sizeof(my_latlon_file)} },
- { .name = "latlon-infile", .set_plugin_parameter = &set_plugin_string, .data = &latlon_in_file, .addon = {sizeof(latlon_in_file)} },
-+#ifndef SVEN_OLA_UNBLOAT
- { .name = "dns-server", .set_plugin_parameter = &set_nameservice_server, .data = &my_forwarders, .addon = {NAME_FORWARDER} },
-+#endif /* SVEN_OLA_UNBLOAT */
- { .name = "name", .set_plugin_parameter = &set_nameservice_name, .data = &my_names, .addon = {NAME_HOST} },
- { .name = "service", .set_plugin_parameter = &set_nameservice_name, .data = &my_services, .addon = {NAME_SERVICE} },
- { .name = "mac", .set_plugin_parameter = &set_nameservice_name, .data = &my_macs, .addon = {NAME_MACADDR} },
-@@ -381,16 +408,20 @@
+@@ -381,6 +386,7 @@
name->ip = olsr_cnf->main_addr;
}
}
-+#ifndef SVEN_OLA_UNBLOAT
++
for (name = my_forwarders; name != NULL; name = name->next) {
if (name->ip.v4.s_addr == 0) {
OLSR_PRINTF(2, "NAME PLUGIN: insert main addr for name %s \n", name->name);
- name->ip = olsr_cnf->main_addr;
- }
- }
-+#endif /* SVEN_OLA_UNBLOAT */
-
- //check if entries I want to announce myself are valid and allowed
- my_names = remove_nonvalid_names_from_list(my_names, NAME_HOST);
-+#ifndef SVEN_OLA_UNBLOAT
- my_forwarders = remove_nonvalid_names_from_list(my_forwarders, NAME_FORWARDER);
-+#endif /* SVEN_OLA_UNBLOAT */
- my_services = remove_nonvalid_names_from_list(my_services, NAME_SERVICE);
- my_macs = remove_nonvalid_names_from_list(my_macs, NAME_MACADDR);
-
-@@ -463,12 +494,16 @@
- free_name_entry_list(&my_names);
- free_name_entry_list(&my_services);
- free_name_entry_list(&my_macs);
-+#ifndef SVEN_OLA_UNBLOAT
- free_name_entry_list(&my_forwarders);
-+#endif /* SVEN_OLA_UNBLOAT */
-
- free_all_list_entries(name_list);
- free_all_list_entries(service_list);
- free_all_list_entries(mac_list);
-+#ifndef SVEN_OLA_UNBLOAT
- free_all_list_entries(forwarder_list);
-+#endif /* SVEN_OLA_UNBLOAT */
- free_all_list_entries(latlon_list);
-
- olsr_stop_timer(write_file_timer);
-@@ -511,7 +546,9 @@
- {
- write_file_timer = NULL;
-
-+#ifndef SVEN_OLA_UNBLOAT
- write_resolv_file(); /* if forwarder_table_changed */
-+#endif /* SVEN_OLA_UNBLOAT */
- write_hosts_file(); /* if name_table_changed */
- write_services_file(false); /* if service_table_changed */
- write_services_file(true); /* if mac_table_changed */
-@@ -693,11 +730,13 @@
- pos = create_packet((struct name *)pos, my_name);
- i++;
- }
-+#ifndef SVEN_OLA_UNBLOAT
- // forwarders
- for (my_name = my_forwarders; my_name != NULL; my_name = my_name->next) {
- pos = create_packet((struct name *)pos, my_name);
- i++;
- }
-+#endif /* SVEN_OLA_UNBLOAT */
- // services
- for (my_name = my_services; my_name != NULL; my_name = my_name->next) {
- pos = create_packet((struct name *)pos, my_name);
-@@ -880,9 +919,11 @@
- case NAME_HOST:
- insert_new_name_in_list(originator, name_list, from_packet, &name_table_changed, vtime);
- break;
-+#ifndef SVEN_OLA_UNBLOAT
- case NAME_FORWARDER:
- insert_new_name_in_list(originator, forwarder_list, from_packet, &forwarder_table_changed, vtime);
- break;
-+#endif /* SVEN_OLA_UNBLOAT */
- case NAME_SERVICE:
- insert_new_name_in_list(originator, service_list, from_packet, &service_table_changed, vtime);
- break;
-@@ -901,9 +942,11 @@
+@@ -901,9 +907,11 @@
pos += sizeof(struct name);
pos += 1 + ((ntohs(from_packet->len) - 1) | 3);
}
}
/**
-@@ -1120,6 +1163,7 @@
- #endif
- name_table_changed = false;
+--- a/src/apm.h
++++ b/src/apm.h
+@@ -41,6 +41,7 @@
+ #ifndef _OLSR_APM
+ #define _OLSR_APM
+#ifndef SVEN_OLA_UNBLOAT
- // Executes my_name_change_script after writing the hosts file
- if (my_name_change_script[0] != '\0') {
- if (system(my_name_change_script) != -1) {
-@@ -1128,6 +1172,7 @@
- OLSR_PRINTF(2, "NAME PLUGIN: WARNING! Failed to execute %s on hosts change\n", my_name_change_script);
- }
- }
-+#endif /* SVEN_OLA_UNBLOAT */
- }
- /**
-@@ -1193,6 +1238,7 @@
+ /*
+ * Interface to OS dependent power management information
+@@ -69,6 +70,7 @@
+ int apm_read(struct olsr_apm_info *);
- fclose(file);
- if (writemacs) {
-+#ifndef SVEN_OLA_UNBLOAT
- // Executes my_macs_change_script after writing the macs file
- if (my_macs_change_script[0] != '\0') {
- if (system(my_macs_change_script) != -1) {
-@@ -1201,9 +1247,11 @@
- OLSR_PRINTF(2, "NAME PLUGIN: WARNING! Failed to execute %s on mac change\n", my_macs_change_script);
- }
- }
+ #endif
+#endif /* SVEN_OLA_UNBLOAT */
- mac_table_changed = false;
- }
- else {
+
+ /*
+ * Local Variables:
+--- a/src/cfgparser/cfgfile_gen.c
++++ b/src/cfgparser/cfgfile_gen.c
+@@ -57,7 +57,9 @@
+ struct olsr_if *in = cnf->interfaces;
+ struct plugin_entry *pe = cnf->plugins;
+ struct plugin_param *pp;
+#ifndef SVEN_OLA_UNBLOAT
- // Executes my_services_change_script after writing the services file
- if (my_services_change_script[0] != '\0') {
- if (system(my_services_change_script) != -1) {
-@@ -1212,6 +1260,7 @@
- OLSR_PRINTF(2, "NAME PLUGIN: WARNING! Failed to execute %s on service change\n", my_services_change_script);
- }
- }
+ struct ip_prefix_list *ie = cnf->ipc_nets;
+#endif /* SVEN_OLA_UNBLOAT */
- service_table_changed = false;
- }
- }
-@@ -1222,6 +1271,7 @@
- * fresh entries are at the beginning of the array and
- * the best entry is at the end of the array.
- */
+ struct olsr_lq_mult *mult;
+
+ char ipv6_buf[100]; /* buffer for IPv6 inet_htop */
+@@ -133,6 +135,7 @@
+ else
+ fprintf(fd, "Willingness\t%d\n\n", cnf->willingness);
+
+#ifndef SVEN_OLA_UNBLOAT
- static void
- select_best_nameserver(struct rt_entry **rt)
- {
-@@ -1253,11 +1303,13 @@
- }
+ /* IPC */
+ fprintf(fd, "# Allow processes like the GUI front-end\n# to connect to the daemon.\n\n");
+ fprintf(fd, "IpcConnect {\n");
+@@ -149,6 +152,7 @@
}
- }
+
+ fprintf(fd, "}\n\n");
+#endif /* SVEN_OLA_UNBLOAT */
- /**
- * write the 3 best upstream DNS servers to resolv.conf file
- * best means the 3 with the best etx value in routing table
- */
+ /* Hysteresis */
+ fprintf(fd, "# Hysteresis adds more robustness to the\n# link sensing.\n# Used by default. 'yes' or 'no'\n\n");
+@@ -367,7 +371,9 @@
+ struct olsr_if *in = cnf->interfaces;
+ struct plugin_entry *pe = cnf->plugins;
+ struct plugin_param *pp;
+#ifndef SVEN_OLA_UNBLOAT
- void
- write_resolv_file(void)
- {
-@@ -1341,6 +1393,7 @@
- fclose(resolv);
- forwarder_table_changed = false;
- }
+ struct ip_prefix_list *ie = cnf->ipc_nets;
+#endif /* SVEN_OLA_UNBLOAT */
+ struct olsr_lq_mult *mult;
- /**
- * completely free a list of name_entries
-@@ -1359,9 +1412,11 @@
- case NAME_HOST:
- name_table_changed = true;
- break;
-+#ifndef SVEN_OLA_UNBLOAT
- case NAME_FORWARDER:
- forwarder_table_changed = true;
- break;
-+#endif /* SVEN_OLA_UNBLOAT */
- case NAME_SERVICE:
- service_table_changed = true;
- break;
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/apm.h olsrd-0-5-6-fc691af9a18d/src/apm.h
---- olsrd-0-5-6-fc691af9a18d.orig/src/apm.h 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/apm.h 2009-03-15 16:32:39.000000000 +0000
-@@ -41,6 +41,7 @@
+ int size = 0;
+@@ -434,6 +440,7 @@
+ else
+ WRITE_TO_BUF("Willingness\t%d\n\n", cnf->willingness);
- #ifndef _OLSR_APM
- #define _OLSR_APM
+#ifndef SVEN_OLA_UNBLOAT
+ /* IPC */
+ WRITE_TO_BUF("# Allow processes like the GUI front-end\n# to connect to the daemon.\n\n");
+ WRITE_TO_BUF("IpcConnect {\n");
+@@ -449,6 +456,7 @@
+ }
- /*
- * Interface to OS dependent power management information
-@@ -69,6 +70,7 @@
- int apm_read(struct olsr_apm_info *);
-
- #endif
+ WRITE_TO_BUF("}\n\n");
+#endif /* SVEN_OLA_UNBLOAT */
- /*
- * Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/cfgparser/local.mk olsrd-0-5-6-fc691af9a18d/src/cfgparser/local.mk
---- olsrd-0-5-6-fc691af9a18d.orig/src/cfgparser/local.mk 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/cfgparser/local.mk 2009-03-15 16:32:39.000000000 +0000
+ /* Hysteresis */
+ WRITE_TO_BUF("# Hysteresis adds more robustness to the\n# link sensing.\n# Used by default. 'yes' or 'no'\n\n");
+--- a/src/cfgparser/local.mk
++++ b/src/cfgparser/local.mk
@@ -41,8 +41,13 @@
C=$(if $(CFGDIR),$(CFGDIR)/)
HDRS += $(foreach file,olsrd_conf oparse,$(C)$(file).h)
$(C)oscan.c: $(C)oscan.lex $(C)Makefile
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/cfgparser/olsrd_conf.c olsrd-0-5-6-fc691af9a18d/src/cfgparser/olsrd_conf.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/cfgparser/olsrd_conf.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/cfgparser/olsrd_conf.c 2009-03-15 16:53:43.000000000 +0000
+--- a/src/cfgparser/olsrd_conf.c
++++ b/src/cfgparser/olsrd_conf.c
@@ -81,11 +81,13 @@
}
}
return olsr_cnf;
}
-@@ -389,7 +393,9 @@
+@@ -405,7 +409,9 @@
cnf->debug_level = DEF_DEBUGLVL;
cnf->no_fork = false;
cnf->ip_version = AF_INET;
cnf->ipsize = sizeof(struct in_addr);
cnf->maxplen = 32;
-@@ -398,7 +404,9 @@
- cnf->rttable = 254;
+@@ -416,7 +422,9 @@
+ cnf->rtproto = DEF_RTPROTO;
cnf->rttable_default = 0;
cnf->willingness_auto = DEF_WILL_AUTO;
+#ifndef SVEN_OLA_UNBLOAT
cnf->fib_metric = DEF_FIB_METRIC;
cnf->use_hysteresis = DEF_USE_HYST;
-@@ -477,6 +485,7 @@
+@@ -495,6 +503,7 @@
}
void
olsrd_print_cnf(struct olsrd_config *cnf)
{
-@@ -613,6 +622,7 @@
+@@ -638,6 +647,7 @@
}
}
}
#if defined WIN32
struct ioinfo {
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/cfgparser/oparse.y olsrd-0-5-6-fc691af9a18d/src/cfgparser/oparse.y
---- olsrd-0-5-6-fc691af9a18d.orig/src/cfgparser/oparse.y 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/cfgparser/oparse.y 2009-03-15 16:32:39.000000000 +0000
-@@ -176,7 +176,6 @@
- %token TOK_RTTABLE
+--- a/src/cfgparser/oparse.y
++++ b/src/cfgparser/oparse.y
+@@ -178,7 +178,6 @@
+ %token TOK_RTPROTO
%token TOK_RTTABLE_DEFAULT
%token TOK_WILLINGNESS
-%token TOK_IPCCON
%token TOK_FIBMETRIC
%token TOK_USEHYST
%token TOK_HYSTSCALE
-@@ -199,7 +198,6 @@
+@@ -203,7 +202,6 @@
%token TOK_HOSTLABEL
%token TOK_NETLABEL
-%token TOK_MAXIPC
%token TOK_IP4BROADCAST
- %token TOK_IP6ADDRTYPE
-@@ -258,7 +256,6 @@
+ %token TOK_IFMODE
+@@ -267,7 +265,6 @@
block: TOK_HNA4 hna4body
| TOK_HNA6 hna6body
| ifblock ifbody
| plblock plbody
;
-@@ -283,18 +280,6 @@
+@@ -292,18 +289,6 @@
| ihna6entry
;
ifblock: ifstart ifnicks
;
-@@ -335,77 +320,6 @@
+@@ -345,77 +330,6 @@
| vcomment
;
iifweight: TOK_IFWEIGHT TOK_INTEGER
{
int ifcnt = ifs_in_curr_cfg;
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/cfgparser/oscan.lex olsrd-0-5-6-fc691af9a18d/src/cfgparser/oscan.lex
---- olsrd-0-5-6-fc691af9a18d.orig/src/cfgparser/oscan.lex 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/cfgparser/oscan.lex 2009-03-15 16:32:39.000000000 +0000
+--- a/src/cfgparser/oscan.lex
++++ b/src/cfgparser/oscan.lex
@@ -253,11 +253,6 @@
return TOK_NETLABEL;
}
"DebugLevel" {
yylval = NULL;
return TOK_DEBUGLEVEL;
-@@ -323,11 +318,6 @@
+@@ -334,11 +329,6 @@
return TOK_WILLINGNESS;
}
"FIBMetric" {
yylval = NULL;
return TOK_FIBMETRIC;
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/defs.h olsrd-0-5-6-fc691af9a18d/src/defs.h
---- olsrd-0-5-6-fc691af9a18d.orig/src/defs.h 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/defs.h 2009-03-15 16:32:39.000000000 +0000
+--- a/src/defs.h
++++ b/src/defs.h
@@ -190,6 +190,8 @@
*/
clock_t olsr_times(void);
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/duplicate_set.c olsrd-0-5-6-fc691af9a18d/src/duplicate_set.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/duplicate_set.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/duplicate_set.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/duplicate_set.c
++++ b/src/duplicate_set.c
@@ -174,6 +174,7 @@
return false; /* no duplicate */
}
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/hna_set.c olsrd-0-5-6-fc691af9a18d/src/hna_set.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/hna_set.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/hna_set.c 2009-03-15 16:32:39.000000000 +0000
-@@ -279,6 +279,7 @@
+--- a/src/hna_set.c
++++ b/src/hna_set.c
+@@ -280,6 +280,7 @@
*
*@return nada
*/
void
olsr_print_hna_set(void)
{
-@@ -320,6 +321,7 @@
+@@ -321,6 +322,7 @@
}
#endif
}
/**
*Process incoming HNA message.
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/interfaces.c olsrd-0-5-6-fc691af9a18d/src/interfaces.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/interfaces.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/interfaces.c 2009-03-15 16:54:47.000000000 +0000
+--- a/src/interfaces.c
++++ b/src/interfaces.c
@@ -93,12 +93,16 @@
OLSR_PRINTF(1, "\n ---- Interface configuration ---- \n\n");
/* Run trough all interfaces immedeatly */
strscpy(interf_n->name, name, name_size);
interf_n->next = olsr_cnf->interfaces;
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/interfaces.h olsrd-0-5-6-fc691af9a18d/src/interfaces.h
---- olsrd-0-5-6-fc691af9a18d.orig/src/interfaces.h 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/interfaces.h 2009-03-15 16:32:39.000000000 +0000
-@@ -196,7 +196,12 @@
+--- a/src/interfaces.h
++++ b/src/interfaces.h
+@@ -200,7 +200,12 @@
struct interface *if_ifwithindex(const int if_index);
int add_ifchgf(int (*f) (struct interface *, int));
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/ipc_frontend.c olsrd-0-5-6-fc691af9a18d/src/ipc_frontend.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/ipc_frontend.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/ipc_frontend.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/ipc_frontend.c
++++ b/src/ipc_frontend.c
@@ -46,6 +46,7 @@
*
*/
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/ipc_frontend.h olsrd-0-5-6-fc691af9a18d/src/ipc_frontend.h
---- olsrd-0-5-6-fc691af9a18d.orig/src/ipc_frontend.h 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/ipc_frontend.h 2009-03-15 16:32:39.000000000 +0000
+--- a/src/ipc_frontend.h
++++ b/src/ipc_frontend.h
@@ -48,6 +48,7 @@
#ifndef _OLSR_IPC
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/ipcalc.c olsrd-0-5-6-fc691af9a18d/src/ipcalc.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/ipcalc.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/ipcalc.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/ipcalc.c
++++ b/src/ipcalc.c
@@ -121,6 +121,7 @@
return prefix;
}
/* see if the ipaddr is in the net. That is equivalent to the fact that the net part
* of both are equal. So we must compare the first <prefixlen> bits.
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/ipcalc.h olsrd-0-5-6-fc691af9a18d/src/ipcalc.h
---- olsrd-0-5-6-fc691af9a18d.orig/src/ipcalc.h 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/ipcalc.h 2009-03-15 16:32:39.000000000 +0000
+--- a/src/ipcalc.h
++++ b/src/ipcalc.h
@@ -146,7 +146,9 @@
return inet_ntop(olsr_cnf->ip_version, addr, buf->buf, sizeof(buf->buf));
}
static INLINE const char *
sockaddr4_to_string(struct ipaddr_str *const buf, const struct sockaddr *const addr)
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/link_set.c olsrd-0-5-6-fc691af9a18d/src/link_set.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/link_set.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/link_set.c 2009-03-15 16:32:39.000000000 +0000
-@@ -761,6 +761,7 @@
+--- a/src/link_set.c
++++ b/src/link_set.c
+@@ -762,6 +762,7 @@
return ret;
}
void
olsr_print_link_set(void)
{
-@@ -782,6 +783,7 @@
+@@ -783,6 +784,7 @@
} OLSR_FOR_ALL_LINK_ENTRIES_END(walker);
#endif
}
/*
* called for every LQ HELLO message.
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/linux/apm.c olsrd-0-5-6-fc691af9a18d/src/linux/apm.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/linux/apm.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/linux/apm.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/linux/apm.c
++++ b/src/linux/apm.c
@@ -44,6 +44,7 @@
* Acpi-Power Enlightenment epplet
*/
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/linux/kernel_routes.c olsrd-0-5-6-fc691af9a18d/src/linux/kernel_routes.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/linux/kernel_routes.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/linux/kernel_routes.c 2009-03-15 16:49:14.000000000 +0000
-@@ -288,11 +288,13 @@
- if (rt_ret > 0) rt_ret = 0;//0 means successful recovery
- else rt_ret = -1;//unrecoverable error
+--- a/src/linux/kernel_routes.c
++++ b/src/linux/kernel_routes.c
+@@ -300,11 +300,13 @@
+ if (rt_ret > 0) rt_ret = 0; /* successful recovery */
+ else rt_ret = -1; /* unrecoverable error */
}
+#ifndef SVEN_OLA_UNBLOAT
//send ipc update on success
- if ( ( cmd != RTM_NEWRULE ) & ( cmd != RTM_DELRULE ) & (flag = RT_ORIG_REQUEST) & (0 <= rt_ret && olsr_cnf->ipc_connections > 0)) {
+ if ( ( cmd != RTM_NEWRULE ) && ( cmd != RTM_DELRULE ) && (flag = RT_ORIG_REQUEST) && (0 <= rt_ret && olsr_cnf->ipc_connections > 0)) {
ipc_route_send_rtentry(&rt->rt_dst.prefix, &nexthop->gateway, metric, RTM_NEWROUTE == cmd,
if_ifwithindex_name(nexthop->iif_index));
}
+#endif /* SVEN_OLA_UNBLOAT */
- if (rt_ret == -2) olsr_syslog(OLSR_LOG_ERR,"no rtnetlink response was received! (no more system ressources?, everything may happen now ...)");
+ if (rt_ret == -2) olsr_syslog(OLSR_LOG_ERR,"no rtnetlink response! (no system ressources left?, everything may happen now ...)");
return rt_ret;
}
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/linux/net.c olsrd-0-5-6-fc691af9a18d/src/linux/net.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/linux/net.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/linux/net.c 2009-03-15 16:32:39.000000000 +0000
+@@ -342,7 +344,9 @@
+ int rslt;
+ #endif /* LINUX_POLICY_ROUTING */
+
++#ifndef SVEN_OLA_UNBLOAT
+ OLSR_PRINTF(2, "KERN: Adding %s\n", olsr_rtp_to_string(rt->rt_best));
++#endif /* SVEN_OLA_UNBLOAT */
+
+ #if !LINUX_POLICY_ROUTING
+ memset(&kernel_route, 0, sizeof(struct rtentry));
+@@ -416,7 +420,9 @@
+ struct in6_rtmsg kernel_route;
+ int rslt;
+
++#ifndef SVEN_OLA_UNBLOAT
+ OLSR_PRINTF(2, "KERN: Adding %s\n", olsr_rtp_to_string(rt->rt_best));
++#endif /* SVEN_OLA_UNBLOAT */
+
+ memset(&kernel_route, 0, sizeof(struct in6_rtmsg));
+
+@@ -468,7 +474,9 @@
+ int rslt;
+ #endif /* LINUX_POLICY_ROUTING */
+
++#ifndef SVEN_OLA_UNBLOAT
+ OLSR_PRINTF(2, "KERN: Deleting %s\n", olsr_rt_to_string(rt));
++#endif /* SVEN_OLA_UNBLOAT */
+
+ #if !LINUX_POLICY_ROUTING
+ memset(&kernel_route, 0, sizeof(struct rtentry));
+@@ -535,7 +543,9 @@
+ int rslt;
+ #endif /* LINUX_POLICY_ROUTING */
+
++#ifndef SVEN_OLA_UNBLOAT
+ OLSR_PRINTF(2, "KERN: Deleting %s\n", olsr_rt_to_string(rt));
++#endif /* SVEN_OLA_UNBLOAT */
+
+ #if !LINUX_POLICY_ROUTING
+ memset(&kernel_route, 0, sizeof(struct in6_rtmsg));
+--- a/src/linux/net.c
++++ b/src/linux/net.c
@@ -69,8 +69,10 @@
#define SIOCGIWRATE 0x8B21 /* get default bit rate (bps) */
/**
*Creates a nonblocking broadcast socket.
*@param sa sockaddr struct. Used for bind(2).
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/lq_plugin.c olsrd-0-5-6-fc691af9a18d/src/lq_plugin.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/lq_plugin.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/lq_plugin.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/lq_plugin.c
++++ b/src/lq_plugin.c
@@ -67,12 +67,18 @@
init_lq_handler_tree(void)
{
}
/*
-@@ -417,7 +423,11 @@
+@@ -399,7 +405,11 @@
* @return pointer to hello_neighbor
*/
struct hello_neighbor *
{
struct hello_neighbor *h;
-@@ -439,7 +449,11 @@
+@@ -421,7 +431,11 @@
* @return pointer to tc_mpr_addr
*/
struct tc_mpr_addr *
{
struct tc_mpr_addr *t;
-@@ -461,7 +475,11 @@
+@@ -443,7 +457,11 @@
* @return pointer to lq_hello_neighbor
*/
struct lq_hello_neighbor *
{
struct lq_hello_neighbor *h;
-@@ -483,7 +501,11 @@
+@@ -465,7 +483,11 @@
* @return pointer to link_entry
*/
struct link_entry *
{
struct link_entry *h;
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/lq_plugin_default_float.c olsrd-0-5-6-fc691af9a18d/src/lq_plugin_default_float.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/lq_plugin_default_float.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/lq_plugin_default_float.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/lq_plugin_default_float.c
++++ b/src/lq_plugin_default_float.c
@@ -39,6 +39,7 @@
*
*/
#include "tc_set.h"
#include "link_set.h"
#include "olsr_spf.h"
-@@ -223,6 +224,7 @@
+@@ -212,6 +213,7 @@
return buffer->buf;
}
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/lq_plugin_default_float.h olsrd-0-5-6-fc691af9a18d/src/lq_plugin_default_float.h
---- olsrd-0-5-6-fc691af9a18d.orig/src/lq_plugin_default_float.h 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/lq_plugin_default_float.h 2009-03-15 16:32:39.000000000 +0000
+--- a/src/lq_plugin_default_float.h
++++ b/src/lq_plugin_default_float.h
@@ -39,6 +39,7 @@
*
*/
#ifndef LQ_PLUGIN_DEFAULT_H_
#define LQ_PLUGIN_DEFAULT_H_
-@@ -77,6 +78,7 @@
+@@ -75,6 +76,7 @@
extern struct lq_handler lq_etx_float_handler;
#endif /*LQ_PLUGIN_DEFAULT_H_ */
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/lq_plugin_default_fpm.c olsrd-0-5-6-fc691af9a18d/src/lq_plugin_default_fpm.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/lq_plugin_default_fpm.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/lq_plugin_default_fpm.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/lq_plugin_default_fpm.c
++++ b/src/lq_plugin_default_fpm.c
@@ -39,6 +39,7 @@
*
*/
#include "tc_set.h"
#include "link_set.h"
#include "lq_plugin.h"
-@@ -235,6 +236,7 @@
+@@ -238,6 +239,7 @@
snprintf(buffer->buf, sizeof(buffer->buf), "%.3f", (float)(cost) / LQ_FPM_LINKCOST_MULTIPLIER);
return buffer->buf;
}
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/lq_plugin_default_fpm.h olsrd-0-5-6-fc691af9a18d/src/lq_plugin_default_fpm.h
---- olsrd-0-5-6-fc691af9a18d.orig/src/lq_plugin_default_fpm.h 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/lq_plugin_default_fpm.h 2009-03-15 16:32:39.000000000 +0000
+--- a/src/lq_plugin_default_fpm.h
++++ b/src/lq_plugin_default_fpm.h
@@ -39,6 +39,7 @@
*
*/
#ifndef LQ_ETX_FPM_
#define LQ_ETX_FPM_
-@@ -83,6 +84,7 @@
+@@ -79,6 +80,7 @@
extern struct lq_handler lq_etx_fpm_handler;
#endif /*LQ_ETX_FPM_ */
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/main.c olsrd-0-5-6-fc691af9a18d/src/main.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/main.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/main.c 2009-03-15 16:52:17.000000000 +0000
-@@ -258,13 +258,17 @@
+--- a/src/main.c
++++ b/src/main.c
+@@ -312,13 +312,17 @@
/*
* Print configuration
*/
/*
* socket for ioctl calls
-@@ -300,7 +304,9 @@
+@@ -354,7 +358,9 @@
/*
*enable ip forwarding on host
*/
/* Initialize parser */
olsr_init_parser();
-@@ -318,6 +324,7 @@
+@@ -372,6 +378,7 @@
*Set up willingness/APM
*/
if (olsr_cnf->willingness_auto) {
if (apm_init() < 0) {
OLSR_PRINTF(1, "Could not read APM info - setting default willingness(%d)\n", WILL_DEFAULT);
-@@ -326,10 +333,13 @@
+@@ -382,10 +389,13 @@
olsr_cnf->willingness_auto = 0;
olsr_cnf->willingness = WILL_DEFAULT;
} else {
}
/* Initialize net */
-@@ -364,9 +374,11 @@
+@@ -415,9 +425,11 @@
/* Initialize the IPC socket */
/* Initialisation of different tables to be used. */
olsr_init_tables();
-@@ -489,9 +501,11 @@
+@@ -549,9 +561,11 @@
OLSR_PRINTF(1, "Closing sockets...\n");
/* front-end IPC socket */
/* OLSR sockets */
for (ifn = ifnet; ifn; ifn = ifn->int_next)
-@@ -501,7 +515,9 @@
+@@ -561,7 +575,9 @@
olsr_close_plugins();
/* Reset network settings */
/* ioctl socket */
close(olsr_cnf->ioctl_s);
-@@ -542,7 +558,11 @@
- "usage: olsrd [-f <configfile>] [ -i interface1 interface2 ... ]\n"
- " [-d <debug_level>] [-ipv6] [-multi <IPv6 multicast address>]\n"
- " [-lql <LQ level>] [-lqw <LQ winsize>] [-lqnt <nat threshold>]\n"
+@@ -601,7 +617,11 @@
+ "usage: olsrd [-f <configfile>] [ -i interface1 interface2 ... ]\n"
+ " [-d <debug_level>] [-ipv6] [-multi <IPv6 multicast address>]\n"
+ " [-lql <LQ level>] [-lqw <LQ winsize>] [-lqnt <nat threshold>]\n"
+#ifdef SVEN_OLA_UNBLOAT
-+ " [-bcast <broadcastaddr>] [-delgw] (Note: no -ipc,-dispin,-dispout)\n"
-+#else /* SVEN_OLA_UNBLOAT */
- " [-bcast <broadcastaddr>] [-ipc] [-dispin] [-dispout] [-delgw]\n"
++ " [-bcast <broadcastaddr>] [-delgw] (Note: no -ipc,-dispin,-dispout)\n"
++#else
+ " [-bcast <broadcastaddr>] [-ipc] [-dispin] [-dispout] [-delgw]\n"
+#endif /* SVEN_OLA_UNBLOAT */
- " [-hint <hello interval (secs)>] [-tcint <tc interval (secs)>]\n"
- " [-midint <mid interval (secs)>] [-hnaint <hna interval (secs)>]\n"
- " [-T <Polling Rate (secs)>] [-nofork] [-hemu <ip_address>]\n" " [-lql <LQ level>] [-lqa <LQ aging factor>]\n");
-@@ -706,12 +726,20 @@
+ " [-hint <hello interval (secs)>] [-tcint <tc interval (secs)>]\n"
+ " [-midint <mid interval (secs)>] [-hnaint <hna interval (secs)>]\n"
+ " [-T <Polling Rate (secs)>] [-nofork] [-hemu <ip_address>]\n" " [-lql <LQ level>] [-lqa <LQ aging factor>]\n");
+@@ -765,12 +785,20 @@
olsr_exit(__func__, EXIT_FAILURE);
}
printf("Queuing if %s\n", *argv);
}
continue;
-@@ -773,7 +801,7 @@
+@@ -833,7 +861,7 @@
sscanf(*argv, "%f", &cnf->pollrate);
continue;
}
/*
* Should we display the contents of packages beeing sent?
*/
-@@ -797,6 +825,7 @@
+@@ -857,6 +885,7 @@
cnf->ipc_connections = 1;
continue;
}
/*
* IPv6 multicast addr
-@@ -814,7 +843,7 @@
+@@ -874,7 +903,7 @@
continue;
}
/*
* Host emulation
*/
-@@ -842,6 +871,7 @@
+@@ -902,6 +931,7 @@
continue;
}
/*
* Delete possible default GWs
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/neighbor_table.c olsrd-0-5-6-fc691af9a18d/src/neighbor_table.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/neighbor_table.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/neighbor_table.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/neighbor_table.c
++++ b/src/neighbor_table.c
@@ -362,6 +362,7 @@
*
*@return nada
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/net_olsr.c olsrd-0-5-6-fc691af9a18d/src/net_olsr.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/net_olsr.c 2009-03-15 17:06:26.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/net_olsr.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/net_olsr.c
++++ b/src/net_olsr.c
@@ -44,7 +44,9 @@
#include "log.h"
#include "olsr.h"
retval = -1;
}
}
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/olsr.c olsrd-0-5-6-fc691af9a18d/src/olsr.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/olsr.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/olsr.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/olsr.c
++++ b/src/olsr.c
@@ -149,7 +149,9 @@
return;
for (tmp_pc_list = pcf_list; tmp_pc_list != NULL; tmp_pc_list = tmp_pc_list->next) {
tmp_pc_list->function(changes_neighborhood, changes_topology, changes_hna);
-@@ -415,12 +418,15 @@
+@@ -420,12 +423,15 @@
uint8_t
olsr_calculate_willingness(void)
{
if (apm_read(&ainfo) < 1)
return WILL_DEFAULT;
-@@ -437,8 +443,12 @@
+@@ -442,8 +448,12 @@
* 26% > juice will: 1
*/
return (ainfo.battery_percentage / 26);
const char *
olsr_msgtype_to_string(uint8_t msgtype)
{
-@@ -508,6 +518,7 @@
+@@ -513,6 +523,7 @@
snprintf(type, sizeof(type), "UNKNOWN(%d)", status);
return type;
}
/**
*Termination function to be called whenever a error occures
-@@ -536,6 +547,7 @@
+@@ -541,6 +552,7 @@
*
* @return a void pointer to the memory allocated
*/
void *
olsr_malloc(size_t size, const char *id)
{
-@@ -560,6 +572,7 @@
+@@ -565,6 +577,7 @@
return ptr;
}
/**
*Wrapper for printf that prints to a specific
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/olsr.h olsrd-0-5-6-fc691af9a18d/src/olsr.h
---- olsrd-0-5-6-fc691af9a18d.orig/src/olsr.h 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/olsr.h 2009-03-15 16:42:54.000000000 +0000
+--- a/src/olsr.h
++++ b/src/olsr.h
@@ -72,15 +72,21 @@
uint8_t olsr_calculate_willingness(void);
int olsr_printf(int, const char *, ...) __attribute__ ((format(printf, 2, 3)));
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/olsr_cfg.h olsrd-0-5-6-fc691af9a18d/src/olsr_cfg.h
---- olsrd-0-5-6-fc691af9a18d.orig/src/olsr_cfg.h 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/olsr_cfg.h 2009-03-15 16:45:53.000000000 +0000
-@@ -140,8 +140,10 @@
+--- a/src/olsr_cfg.h
++++ b/src/olsr_cfg.h
+@@ -149,8 +149,10 @@
char *name;
char *config;
bool configured;
struct interface *interf;
struct if_config_options *cnf;
struct olsr_if *next;
-@@ -183,7 +185,9 @@
- struct olsrd_config {
+@@ -193,7 +195,9 @@
+ uint16_t olsrport;
int debug_level;
bool no_fork;
+#ifndef SVEN_OLA_UNBLOAT
int ip_version;
bool allow_no_interfaces;
uint16_t tos;
-@@ -191,13 +195,17 @@
+@@ -202,13 +206,17 @@
uint8_t rttable_default;
uint8_t willingness;
bool willingness_auto;
struct olsr_if *interfaces;
float pollrate;
float nic_chgs_pollrate;
-@@ -257,7 +265,9 @@
+@@ -271,7 +279,9 @@
void olsrd_free_cnf(struct olsrd_config *);
int olsrd_write_cnf(struct olsrd_config *, const char *);
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/parser.c olsrd-0-5-6-fc691af9a18d/src/parser.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/parser.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/parser.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/parser.c
++++ b/src/parser.c
@@ -51,7 +51,9 @@
#include "rebuild_packet.h"
#include "net_os.h"
#include "net_olsr.h"
#ifdef WIN32
-@@ -280,8 +282,10 @@
+@@ -281,8 +283,10 @@
//printf("Message from %s\n\n", olsr_ip_to_string(&buf, from_addr));
/* Display packet */
if (olsr_cnf->ip_version == AF_INET)
msgsize = ntohs(m->v4.olsr_msgsize);
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/print_packet.c olsrd-0-5-6-fc691af9a18d/src/print_packet.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/print_packet.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/print_packet.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/print_packet.c
++++ b/src/print_packet.c
@@ -39,6 +39,7 @@
*
*/
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/process_routes.c olsrd-0-5-6-fc691af9a18d/src/process_routes.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/process_routes.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/process_routes.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/process_routes.c
++++ b/src/process_routes.c
@@ -159,6 +159,7 @@
static void
olsr_delete_kernel_route(struct rt_entry *rt)
}
}
+#else /* SVEN_OLA_UNBLOAT */
-+ olsr_16_t error = olsr_cnf->ip_version == AF_INET ? olsr_delroute_function(rt) : olsr_delroute6_function(rt);
++ int16_t error = olsr_cnf->ip_version == AF_INET ? olsr_delroute_function(rt) : olsr_delroute6_function(rt);
+ if (0 > error) {
+ olsr_syslog(OLSR_LOG_ERR, "Delete route: %s", strerror(errno));
+ }
}
}
+#else /* SVEN_OLA_UNBLOAT */
-+ olsr_16_t error = olsr_cnf->ip_version == AF_INET ? olsr_addroute_function(rt) : olsr_addroute6_function(rt);
++ int16_t error = olsr_cnf->ip_version == AF_INET ? olsr_addroute_function(rt) : olsr_addroute6_function(rt);
+ if (0 > error) {
+ olsr_syslog(OLSR_LOG_ERR, "Add route: %s", strerror(errno));
+ } else {
}
/**
-@@ -385,7 +401,7 @@
+@@ -385,9 +401,11 @@
/* route additions */
olsr_add_kernel_routes(&add_kernel_list);
-#if DEBUG
++#ifndef SVEN_OLA_UNBLOAT
+#ifdef DEBUG
olsr_print_routing_table(&routingtree);
#endif
++#endif /* SVEN_OLA_UNBLOAT */
}
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/rebuild_packet.c olsrd-0-5-6-fc691af9a18d/src/rebuild_packet.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/rebuild_packet.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/rebuild_packet.c 2009-03-15 16:32:39.000000000 +0000
+
+ /*
+--- a/src/rebuild_packet.c
++++ b/src/rebuild_packet.c
@@ -60,7 +60,11 @@
mid_chgestruct(struct mid_message *mmsg, const union olsr_message *m)
{
}
}
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/routing_table.c olsrd-0-5-6-fc691af9a18d/src/routing_table.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/routing_table.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/routing_table.c 2009-03-15 16:32:39.000000000 +0000
-@@ -623,6 +623,7 @@
+--- a/src/routing_table.c
++++ b/src/routing_table.c
+@@ -628,6 +628,7 @@
/**
* format a route entry into a buffer
*/
char *
olsr_rt_to_string(const struct rt_entry *rt)
{
-@@ -654,11 +655,13 @@
+@@ -659,11 +660,13 @@
return buff;
}
void
olsr_print_routing_table(struct avl_tree *tree)
{
-@@ -692,6 +695,7 @@
+@@ -697,6 +700,7 @@
#endif
tree = NULL; /* squelch compiler warnings */
}
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/routing_table.h olsrd-0-5-6-fc691af9a18d/src/routing_table.h
---- olsrd-0-5-6-fc691af9a18d.orig/src/routing_table.h 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/routing_table.h 2009-03-15 16:32:39.000000000 +0000
+--- a/src/routing_table.h
++++ b/src/routing_table.h
@@ -210,9 +210,11 @@
bool olsr_cmp_rt(const struct rt_entry *, const struct rt_entry *);
uint8_t olsr_fib_metric(const struct rt_metric *);
const struct rt_nexthop *olsr_get_nh(const struct rt_entry *);
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/tc_set.c olsrd-0-5-6-fc691af9a18d/src/tc_set.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/tc_set.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/tc_set.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/tc_set.c
++++ b/src/tc_set.c
@@ -336,6 +336,7 @@
/**
* Format tc_edge contents into a buffer.
/**
* Wrapper for the timer callback.
-@@ -686,6 +688,7 @@
+@@ -693,6 +695,7 @@
/**
* Print the topology table to stdout
*/
void
olsr_print_tc_table(void)
{
-@@ -711,6 +714,7 @@
+@@ -718,6 +721,7 @@
} OLSR_FOR_ALL_TC_ENTRIES_END(tc);
#endif
}
/*
* calculate the border IPs of a tc edge set according to the border flags
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/tc_set.h olsrd-0-5-6-fc691af9a18d/src/tc_set.h
---- olsrd-0-5-6-fc691af9a18d.orig/src/tc_set.h 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/tc_set.h 2009-03-15 16:47:08.000000000 +0000
+--- a/src/tc_set.h
++++ b/src/tc_set.h
@@ -157,7 +157,9 @@
/* tc_edge_entry manipulation */
struct tc_edge_entry *olsr_lookup_tc_edge(struct tc_entry *, union olsr_ip_addr *);
struct tc_edge_entry *olsr_add_tc_edge_entry(struct tc_entry *, union olsr_ip_addr *, uint16_t);
void olsr_delete_tc_entry(struct tc_entry *);
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/two_hop_neighbor_table.c olsrd-0-5-6-fc691af9a18d/src/two_hop_neighbor_table.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/two_hop_neighbor_table.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/two_hop_neighbor_table.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/two_hop_neighbor_table.c
++++ b/src/two_hop_neighbor_table.c
@@ -203,6 +203,8 @@
return NULL;
}
/*
* Local Variables:
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/unix/ifnet.c olsrd-0-5-6-fc691af9a18d/src/unix/ifnet.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/unix/ifnet.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/unix/ifnet.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/unix/ifnet.c
++++ b/src/unix/ifnet.c
@@ -70,6 +70,8 @@
#define BUFSPACE (127*1024) /* max. input buffer size to request */
/* Check interface address (IPv4) */
if (ioctl(olsr_cnf->ioctl_s, SIOCGIFADDR, &ifr) < 0) {
OLSR_PRINTF(1, "\tCould not get address of interface - removing it\n");
-@@ -304,7 +314,9 @@
+@@ -294,17 +304,21 @@
+ if (memcmp
+ (&((struct sockaddr_in *)&ifp->int_addr)->sin_addr.s_addr, &((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr,
+ olsr_cnf->ipsize) != 0) {
++#ifndef SVEN_OLA_UNBLOAT
+ /* New address */
+ OLSR_PRINTF(1, "IPv4 address changed for %s\n", ifr.ifr_name);
+ OLSR_PRINTF(1, "\tOld:%s\n", ip4_to_string(&buf, ifp->int_addr.sin_addr));
+ OLSR_PRINTF(1, "\tNew:%s\n", sockaddr4_to_string(&buf, &ifr.ifr_addr));
++#endif /* SVEN_OLA_UNBLOAT */
+
+ ifp->int_addr = *(struct sockaddr_in *)&ifr.ifr_addr;
+ /* deactivated to prevent change of originator IP */
#if 0
if (memcmp(&olsr_cnf->main_addr, &ifp->ip_addr, olsr_cnf->ipsize) == 0) {
OLSR_PRINTF(1, "New main address: %s\n", sockaddr4_to_string(&buf, &ifr.ifr_addr));
memcpy(&olsr_cnf->main_addr, &((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr, olsr_cnf->ipsize);
}
#endif
-@@ -366,7 +378,9 @@
+@@ -366,7 +380,9 @@
remove_interface:
OLSR_PRINTF(1, "Removing interface %s\n", iface->name);
olsr_delete_link_entry_by_ip(&ifp->ip_addr);
-@@ -398,10 +412,14 @@
+@@ -398,10 +414,14 @@
memset(&olsr_cnf->main_addr, 0, olsr_cnf->ipsize);
OLSR_PRINTF(1, "No more interfaces...\n");
} else {
}
}
#endif
-@@ -425,7 +443,9 @@
+@@ -425,7 +445,9 @@
if ((ifnet == NULL) && (!olsr_cnf->allow_no_interfaces)) {
OLSR_PRINTF(1, "No more active interfaces - exiting.\n");
olsr_cnf->exit_value = EXIT_FAILURE;
kill(getpid(), SIGINT);
}
-@@ -434,6 +454,8 @@
+@@ -434,6 +456,8 @@
}
/**
* Initializes the special interface used in
* host-client emulation
-@@ -583,6 +605,7 @@
+@@ -585,6 +609,7 @@
return 1;
}
static char basenamestr[32];
static const char *if_basename(const char *name);
-@@ -618,8 +641,10 @@
+@@ -620,8 +645,10 @@
int tos_bits = IPTOS_TOS(olsr_cnf->tos);
#endif
memset(&ifr, 0, sizeof(struct ifreq));
memset(&ifs, 0, sizeof(struct interface));
-@@ -726,11 +751,13 @@
+@@ -728,11 +755,13 @@
ifs.int_broadaddr = *(struct sockaddr_in *)&ifr.ifr_broadaddr;
}
}
-@@ -760,7 +787,9 @@
+@@ -762,7 +791,9 @@
OLSR_PRINTF(1, "\tMTU - IPhdr: %d\n", ifs.int_mtu);
OLSR_PRINTF(1, "\tIndex %d\n", ifs.if_index);
if (olsr_cnf->ip_version == AF_INET) {
-@@ -865,10 +894,14 @@
+@@ -867,10 +898,14 @@
*/
memset(&null_addr, 0, olsr_cnf->ipsize);
if (ipequal(&null_addr, &olsr_cnf->main_addr)) {
struct ipaddr_str buf;
+#endif
olsr_cnf->main_addr = ifp->ip_addr;
- OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&buf, &olsr_cnf->main_addr));
+#ifndef SVEN_OLA_UNBLOAT
+ OLSR_PRINTF(1, "New main address: %s\n", olsr_ip_to_string(&buf, &olsr_cnf->main_addr));
olsr_syslog(OLSR_LOG_INFO, "New main address: %s\n", olsr_ip_to_string(&buf, &olsr_cnf->main_addr));
+#endif /* SVEN_OLA_UNBLOAT */
}
/*
-diff -ur olsrd-0-5-6-fc691af9a18d.orig/src/unix/misc.c olsrd-0-5-6-fc691af9a18d/src/unix/misc.c
---- olsrd-0-5-6-fc691af9a18d.orig/src/unix/misc.c 2009-03-14 22:39:09.000000000 +0000
-+++ olsrd-0-5-6-fc691af9a18d/src/unix/misc.c 2009-03-15 16:32:39.000000000 +0000
+--- a/src/unix/misc.c
++++ b/src/unix/misc.c
@@ -44,6 +44,7 @@
#include "misc.h"
#include "olsr_types.h"