--- a/Makefile.inc
+++ b/Makefile.inc
-@@ -204,6 +204,10 @@
+@@ -207,6 +207,10 @@
$(warning Use CPPFLAGS instead of DEFINES for -D)
endif
help:
--- a/lib/bmf/src/NetworkInterfaces.c
+++ b/lib/bmf/src/NetworkInterfaces.c
-@@ -544,7 +544,9 @@
+@@ -541,7 +541,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));
} else {
#ifdef OS
#undef OS
-@@ -181,7 +183,9 @@
-
- static int build_about_body(char *, uint32_t);
-
-+#ifndef SVEN_OLA_UNBLOAT
- static int build_cfgfile_body(char *, uint32_t);
-+#endif /* SVEN_OLA_UNBLOAT */
-
- static int check_allowed_ip(const struct allowed_net *const allowed_nets, const union olsr_ip_addr *const addr);
-
-@@ -216,10 +220,13 @@
+@@ -222,10 +224,13 @@
{"Admin", "admin", build_admin_body, true},
#endif
{"About", "about", build_about_body, true},
static const struct static_bin_file_entry static_bin_files[] = {
{"favicon.ico", favicon_ico, sizeof(favicon_ico)}
,
-@@ -229,6 +236,7 @@
+@@ -235,6 +240,7 @@
,
{NULL, NULL, 0}
};
static const struct static_txt_file_entry static_txt_files[] = {
{"httpinfo.css", httpinfo_css},
-@@ -407,6 +415,7 @@
+@@ -428,6 +434,7 @@
} else if (!strcmp(req_type, "GET")) {
int i = 0;
for (i = 0; static_bin_files[i].filename; i++) {
if (FILENREQ_MATCH(filename, static_bin_files[i].filename)) {
break;
-@@ -422,6 +431,7 @@
+@@ -442,6 +449,7 @@
}
i = 0;
while (static_txt_files[i].filename) {
if (FILENREQ_MATCH(filename, static_txt_files[i].filename)) {
break;
-@@ -461,16 +471,22 @@
- snprintf(&body[size], sizeof(body) - size,
+@@ -480,16 +488,22 @@
+ abuf_appendf(&body_abuf,
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n" "<head>\n"
"<meta http-equiv=\"Content-type\" content=\"text/html; charset=ISO-8859-1\">\n"
- "<title>olsr.org httpinfo plugin</title>\n" "<link rel=\"icon\" href=\"favicon.ico\" type=\"image/x-icon\">\n"
+#endif /* SVEN_OLA_UNBLOAT */
+ );
- size += build_tabs(&body[size], sizeof(body) - size, i);
- size += build_frame(&body[size], sizeof(body) - size, "Current Routes", "routes", FRAMEWIDTH, tab_entries[i].build_body_cb);
-@@ -854,7 +870,7 @@
- size += snprintf(&buf[size], bufsize - size, "<tr><td colspan=\"3\">Status: DOWN</td></tr>\n");
+ build_tabs(&body_abuf, i);
+ build_frame(&body_abuf, "Current Routes", "routes", FRAMEWIDTH, tab_entries[i].build_body_cb);
+@@ -894,7 +908,7 @@
+ abuf_puts(abuf, "<tr><td colspan=\"3\">Status: DOWN</td></tr>\n");
continue;
}
-
+#ifndef SVEN_OLA_UNBLOAT
if (olsr_cnf->ip_version == AF_INET) {
struct ipaddr_str addrbuf, maskbuf, bcastbuf;
- size +=
-@@ -867,6 +883,7 @@
- snprintf(&buf[size], bufsize - size, "<tr>\n" "<td>IP: %s</td>\n" "<td>MCAST: %s</td>\n" "<td></td>\n" "</tr>\n",
+ abuf_appendf(abuf, "<tr>\n" "<td>IP: %s</td>\n" "<td>MASK: %s</td>\n" "<td>BCAST: %s</td>\n" "</tr>\n",
+@@ -905,6 +919,7 @@
+ abuf_appendf(abuf, "<tr>\n" "<td>IP: %s</td>\n" "<td>MCAST: %s</td>\n" "<td></td>\n" "</tr>\n",
ip6_to_string(&addrbuf, &rifs->int6_addr.sin6_addr), ip6_to_string(&maskbuf, &rifs->int6_multaddr.sin6_addr));
}
+#endif /* SVEN_OLA_UNBLOAT */
- size +=
- snprintf(&buf[size], bufsize - size, "<tr>\n" "<td>MTU: %d</td>\n" "<td>WLAN: %s</td>\n" "<td>STATUS: UP</td>\n" "</tr>\n",
+ abuf_appendf(abuf, "<tr>\n" "<td>MTU: %d</td>\n" "<td>WLAN: %s</td>\n" "<td>STATUS: UP</td>\n" "</tr>\n",
rifs->int_mtu, rifs->is_wireless ? "Yes" : "No");
-@@ -1115,6 +1132,7 @@
- build_host);
+ }
+@@ -1155,6 +1170,7 @@
+ #endif
}
+#ifndef SVEN_OLA_UNBLOAT
static int
- build_cfgfile_body(char *buf, uint32_t bufsize)
+ check_allowed_ip(const struct allowed_net *const my_allowed_nets, const union olsr_ip_addr *const addr)
{
-@@ -1149,6 +1167,7 @@
- #endif
- return size;
+@@ -1166,6 +1182,7 @@
+ }
+ return 0;
}
+#endif /* SVEN_OLA_UNBLOAT */
- static int
- check_allowed_ip(const struct allowed_net *const allowed_nets, const union olsr_ip_addr *const addr)
+ #if 0
+
--- a/lib/nameservice/src/nameservice.c
+++ b/lib/nameservice/src/nameservice.c
-@@ -65,6 +65,11 @@
+@@ -67,6 +67,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];
-@@ -381,6 +386,7 @@
+@@ -383,6 +388,7 @@
name->ip = olsr_cnf->main_addr;
}
}
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);
-@@ -901,9 +907,11 @@
+@@ -903,9 +909,11 @@
pos += sizeof(struct name);
pos += 1 + ((ntohs(from_packet->len) - 1) | 3);
}
}
return olsr_cnf;
}
-@@ -405,7 +409,9 @@
+@@ -416,7 +420,9 @@
cnf->debug_level = DEF_DEBUGLVL;
cnf->no_fork = false;
cnf->ip_version = AF_INET;
cnf->ipsize = sizeof(struct in_addr);
cnf->maxplen = 32;
-@@ -416,7 +422,9 @@
+@@ -427,7 +433,9 @@
cnf->rtproto = DEF_RTPROTO;
cnf->rttable_default = 0;
cnf->willingness_auto = DEF_WILL_AUTO;
cnf->fib_metric = DEF_FIB_METRIC;
cnf->use_hysteresis = DEF_USE_HYST;
-@@ -495,6 +503,7 @@
+@@ -506,6 +514,7 @@
}
void
olsrd_print_cnf(struct olsrd_config *cnf)
{
-@@ -638,6 +647,7 @@
+@@ -649,6 +658,7 @@
}
}
}
int ifcnt = ifs_in_curr_cfg;
--- a/src/cfgparser/oscan.lex
+++ b/src/cfgparser/oscan.lex
-@@ -253,11 +253,6 @@
+@@ -252,11 +252,6 @@
return TOK_NETLABEL;
}
"DebugLevel" {
yylval = NULL;
return TOK_DEBUGLEVEL;
-@@ -334,11 +329,6 @@
+@@ -333,11 +328,6 @@
return TOK_WILLINGNESS;
}
return TOK_FIBMETRIC;
--- a/src/defs.h
+++ b/src/defs.h
-@@ -190,6 +190,8 @@
- */
- clock_t olsr_times(void);
+@@ -189,6 +189,8 @@
+
+ uint32_t olsr_times(void);
+#ifndef SVEN_OLA_UNBLOAT
+
/*
*IPC functions
*These are moved to a plugin soon
-@@ -207,6 +209,7 @@
+@@ -206,6 +208,7 @@
int ipc_output(struct olsr *);
#endif
* Local Variables:
--- a/src/duplicate_set.c
+++ b/src/duplicate_set.c
-@@ -174,6 +174,7 @@
+@@ -177,6 +177,7 @@
return false; /* no duplicate */
}
void
olsr_print_duplicate_table(void)
{
-@@ -192,6 +193,7 @@
+@@ -195,6 +196,7 @@
} OLSR_FOR_ALL_DUP_ENTRIES_END(entry);
#endif
}
sockaddr4_to_string(struct ipaddr_str *const buf, const struct sockaddr *const addr)
--- a/src/link_set.c
+++ b/src/link_set.c
-@@ -762,6 +762,7 @@
+@@ -770,6 +770,7 @@
return ret;
}
void
olsr_print_link_set(void)
{
-@@ -783,6 +784,7 @@
+@@ -791,6 +792,7 @@
} OLSR_FOR_ALL_LINK_ENTRIES_END(walker);
#endif
}
* Local Variables:
--- 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 */
+@@ -486,7 +486,11 @@
}
+ /* send ipc update on success */
+ if ( ( cmd != RTM_NEWRULE ) && ( cmd != RTM_DELRULE )
+- && (flag = RT_ORIG_REQUEST) && (0 <= rt_ret && olsr_cnf->ipc_connections > 0) ) {
++ && (flag = RT_ORIG_REQUEST) && (0 <= rt_ret
+#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)) {
- ipc_route_send_rtentry(&rt->rt_dst.prefix, &nexthop->gateway, metric, RTM_NEWROUTE == cmd,
- if_ifwithindex_name(nexthop->iif_index));
- }
++ && olsr_cnf->ipc_connections > 0
+#endif /* SVEN_OLA_UNBLOAT */
- if (rt_ret == -2) olsr_syslog(OLSR_LOG_ERR,"no rtnetlink response! (no system ressources left?, everything may happen now ...)");
- return rt_ret;
- }
-@@ -342,7 +344,9 @@
++ ) ) {
+ ipc_route_send_rtentry(&rt->rt_dst.prefix, &nexthop->gateway, metric,
+ RTM_NEWROUTE == cmd, if_ifwithindex_name(nexthop->iif_index));
+ }
+@@ -528,7 +532,9 @@
int rslt;
#endif /* LINUX_POLICY_ROUTING */
#if !LINUX_POLICY_ROUTING
memset(&kernel_route, 0, sizeof(struct rtentry));
-@@ -416,7 +420,9 @@
+@@ -604,7 +610,9 @@
struct in6_rtmsg kernel_route;
int rslt;
memset(&kernel_route, 0, sizeof(struct in6_rtmsg));
-@@ -468,7 +474,9 @@
+@@ -658,7 +666,9 @@
int rslt;
#endif /* LINUX_POLICY_ROUTING */
#if !LINUX_POLICY_ROUTING
memset(&kernel_route, 0, sizeof(struct rtentry));
-@@ -535,7 +543,9 @@
+@@ -727,7 +737,9 @@
int rslt;
#endif /* 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 @@
+@@ -70,8 +70,10 @@
#define SIOCGIWRATE 0x8B21 /* get default bit rate (bps) */
/* The original state of the IP forwarding proc entry */
/**
*Bind a socket to a device
-@@ -91,6 +93,8 @@
+@@ -92,6 +94,8 @@
return setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, dev_name, strlen(dev_name) + 1);
}
/**
*Enable IP forwarding.
*Just writing "1" to the /proc/sys/net/ipv4/ip_forward
-@@ -110,6 +114,9 @@
+@@ -111,6 +115,9 @@
const char *const procfile = version == AF_INET ? "/proc/sys/net/ipv4/ip_forward" : "/proc/sys/net/ipv6/conf/all/forwarding";
if ((proc_fwd = fopen(procfile, "r")) == NULL) {
/* IPv4 */
if (version == AF_INET)
fprintf(stderr,
-@@ -122,6 +129,7 @@
+@@ -123,6 +130,7 @@
procfile);
sleep(3);
return 0;
}
-@@ -131,9 +139,13 @@
+@@ -132,9 +140,13 @@
OLSR_PRINTF(3, "\nIP forwarding is enabled on this system\n");
} else {
if ((proc_fwd = fopen(procfile, "w")) == NULL) {
return 0;
} else {
syslog(LOG_INFO, "Writing \"1\" to %s\n", procfile);
-@@ -154,11 +166,15 @@
+@@ -155,11 +167,15 @@
return -1;
if ((proc_redirect = fopen(procfile, "r")) == NULL) {
return -1;
}
orig_global_redirect_state = fgetc(proc_redirect);
-@@ -168,9 +184,13 @@
+@@ -169,9 +185,13 @@
return 0;
if ((proc_redirect = fopen(procfile, "w")) == NULL) {
return 0;
}
syslog(LOG_INFO, "Writing \"0\" to %s", procfile);
-@@ -196,19 +216,27 @@
+@@ -197,19 +217,27 @@
snprintf(procfile, sizeof(procfile), REDIRECT_PROC, if_name);
if ((proc_redirect = fopen(procfile, "r")) == NULL) {
return 0;
}
syslog(LOG_INFO, "Writing \"0\" to %s", procfile);
-@@ -234,20 +262,28 @@
+@@ -235,20 +263,28 @@
sprintf(procfile, SPOOF_PROC, if_name);
if ((proc_spoof = fopen(procfile, "r")) == NULL) {
return 0;
}
syslog(LOG_INFO, "Writing \"0\" to %s", procfile);
-@@ -272,7 +308,11 @@
+@@ -273,7 +309,11 @@
FILE *proc_fd;
if ((proc_fd = fopen(procfile, "w")) == NULL) {
} else {
syslog(LOG_INFO, "Resetting %s to %c\n", procfile, orig_fwd_state);
fputc(orig_fwd_state, proc_fd);
-@@ -287,7 +327,11 @@
+@@ -288,7 +328,11 @@
FILE *proc_fd;
if ((proc_fd = fopen(procfile, "w")) == NULL) {
} else {
syslog(LOG_INFO, "Resetting %s to %c\n", procfile, orig_global_redirect_state);
fputc(orig_global_redirect_state, proc_fd);
-@@ -311,7 +355,11 @@
+@@ -312,7 +356,11 @@
snprintf(procfile, sizeof(procfile), REDIRECT_PROC, ifs->int_name);
if ((proc_fd = fopen(procfile, "w")) == NULL)
else {
syslog(LOG_INFO, "Resetting %s to %c\n", procfile, ifs->nic_state.redirect);
-@@ -324,7 +372,11 @@
+@@ -325,7 +373,11 @@
/* Generate the procfile name */
sprintf(procfile, SPOOF_PROC, ifs->int_name);
if ((proc_fd = fopen(procfile, "w")) == NULL)
else {
syslog(LOG_INFO, "Resetting %s to %c\n", procfile, ifs->nic_state.spoof);
-@@ -372,6 +424,8 @@
+@@ -373,6 +425,8 @@
return sock;
}
#include "tc_set.h"
#include "link_set.h"
#include "lq_plugin.h"
-@@ -238,6 +239,7 @@
+@@ -223,6 +224,7 @@
snprintf(buffer->buf, sizeof(buffer->buf), "%.3f", (float)(cost) / LQ_FPM_LINKCOST_MULTIPLIER);
return buffer->buf;
}
* Local Variables:
--- a/src/main.c
+++ b/src/main.c
-@@ -312,13 +312,17 @@
+@@ -289,13 +289,17 @@
/*
* Print configuration
*/
/*
* socket for ioctl calls
-@@ -354,7 +358,9 @@
+@@ -331,7 +335,9 @@
/*
*enable ip forwarding on host
*/
/* Initialize parser */
olsr_init_parser();
-@@ -372,6 +378,7 @@
+@@ -349,6 +355,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);
-@@ -382,10 +389,13 @@
+@@ -359,10 +366,13 @@
olsr_cnf->willingness_auto = 0;
olsr_cnf->willingness = WILL_DEFAULT;
} else {
}
/* Initialize net */
-@@ -415,9 +425,11 @@
+@@ -392,9 +402,11 @@
/* Initialize the IPC socket */
/* Initialisation of different tables to be used. */
olsr_init_tables();
-@@ -549,9 +561,11 @@
+@@ -533,9 +545,11 @@
OLSR_PRINTF(1, "Closing sockets...\n");
/* front-end IPC socket */
/* OLSR sockets */
for (ifn = ifnet; ifn; ifn = ifn->int_next)
-@@ -561,7 +575,9 @@
+@@ -545,7 +559,9 @@
olsr_close_plugins();
/* Reset network settings */
/* ioctl socket */
close(olsr_cnf->ioctl_s);
-@@ -601,7 +617,11 @@
+@@ -585,7 +601,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"
" [-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 @@
+@@ -749,12 +769,20 @@
olsr_exit(__func__, EXIT_FAILURE);
}
printf("Queuing if %s\n", *argv);
}
continue;
-@@ -833,7 +861,7 @@
+@@ -817,7 +845,7 @@
sscanf(*argv, "%f", &cnf->pollrate);
continue;
}
/*
* Should we display the contents of packages beeing sent?
*/
-@@ -857,6 +885,7 @@
+@@ -841,6 +869,7 @@
cnf->ipc_connections = 1;
continue;
}
/*
* IPv6 multicast addr
-@@ -874,7 +903,7 @@
+@@ -858,7 +887,7 @@
continue;
}
/*
* Host emulation
*/
-@@ -902,6 +931,7 @@
+@@ -886,6 +915,7 @@
continue;
}
}
--- a/src/olsr.c
+++ b/src/olsr.c
-@@ -149,7 +149,9 @@
+@@ -150,7 +150,9 @@
return;
if (olsr_cnf->debug_level > 0 && olsr_cnf->clear_screen && isatty(1)) {
printf(" *** %s (%s on %s) ***\n", olsrd_version, build_date, build_host);
}
-@@ -165,7 +167,7 @@
+@@ -166,7 +168,7 @@
if (changes_neighborhood || changes_topology || changes_hna) {
olsr_calculate_routing_table();
}
if (olsr_cnf->debug_level > 0) {
if (olsr_cnf->debug_level > 2) {
olsr_print_mid_set();
-@@ -184,6 +186,7 @@
+@@ -185,6 +187,7 @@
olsr_print_tc_table();
#endif
}
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);
-@@ -420,12 +423,15 @@
+@@ -421,12 +424,15 @@
uint8_t
olsr_calculate_willingness(void)
{
if (apm_read(&ainfo) < 1)
return WILL_DEFAULT;
-@@ -442,8 +448,12 @@
+@@ -443,8 +449,12 @@
* 26% > juice will: 1
*/
return (ainfo.battery_percentage / 26);
const char *
olsr_msgtype_to_string(uint8_t msgtype)
{
-@@ -513,6 +523,7 @@
+@@ -514,6 +524,7 @@
snprintf(type, sizeof(type), "UNKNOWN(%d)", status);
return type;
}
/**
*Termination function to be called whenever a error occures
-@@ -541,6 +552,7 @@
+@@ -542,6 +553,7 @@
*
* @return a void pointer to the memory allocated
*/
void *
olsr_malloc(size_t size, const char *id)
{
-@@ -565,6 +577,7 @@
+@@ -566,6 +578,7 @@
return ptr;
}
--- a/src/olsr_cfg.h
+++ b/src/olsr_cfg.h
-@@ -149,8 +149,10 @@
+@@ -154,8 +154,10 @@
char *name;
char *config;
bool configured;
struct interface *interf;
struct if_config_options *cnf;
struct olsr_if *next;
-@@ -193,7 +195,9 @@
+@@ -198,7 +200,9 @@
uint16_t olsrport;
int debug_level;
bool no_fork;
int ip_version;
bool allow_no_interfaces;
uint16_t tos;
-@@ -202,13 +206,17 @@
+@@ -207,13 +211,17 @@
uint8_t rttable_default;
uint8_t willingness;
bool willingness_auto;
struct olsr_if *interfaces;
float pollrate;
float nic_chgs_pollrate;
-@@ -271,7 +279,9 @@
+@@ -275,7 +283,9 @@
void olsrd_free_cnf(struct olsrd_config *);
}
/**
-@@ -385,9 +401,11 @@
+@@ -388,9 +404,11 @@
/* route additions */
olsr_add_kernel_routes(&add_kernel_list);
ifp = iface->interf;
-@@ -281,7 +289,9 @@
+@@ -278,7 +286,9 @@
} else
/* IP version 4 */
{
/* 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");
-@@ -294,17 +304,21 @@
+@@ -291,17 +301,21 @@
if (memcmp
- (&((struct sockaddr_in *)&ifp->int_addr)->sin_addr.s_addr, &((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr,
+ (&((struct sockaddr_in *)(ARM_NOWARN_ALIGN)&ifp->int_addr)->sin_addr.s_addr, &((struct sockaddr_in *)(ARM_NOWARN_ALIGN)&ifr.ifr_addr)->sin_addr.s_addr,
olsr_cnf->ipsize) != 0) {
+#ifndef SVEN_OLA_UNBLOAT
/* New address */
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;
+ ifp->int_addr = *(struct sockaddr_in *)(ARM_NOWARN_ALIGN)&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) {
memcpy(&olsr_cnf->main_addr, &((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr, olsr_cnf->ipsize);
}
#endif
-@@ -366,7 +380,9 @@
+@@ -375,7 +389,9 @@
+ ifp = iface->interf;
- remove_interface:
OLSR_PRINTF(1, "Removing interface %s\n", iface->name);
+#ifndef SVEN_OLA_UNBLOAT
olsr_syslog(OLSR_LOG_INFO, "Removing interface %s\n", iface->name);
olsr_delete_link_entry_by_ip(&ifp->ip_addr);
-@@ -398,10 +414,14 @@
+@@ -417,10 +433,14 @@
memset(&olsr_cnf->main_addr, 0, olsr_cnf->ipsize);
OLSR_PRINTF(1, "No more interfaces...\n");
} else {
}
}
#endif
-@@ -425,7 +445,9 @@
+@@ -444,13 +464,17 @@
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 +456,8 @@
}
/**
* Initializes the special interface used in
* host-client emulation
-@@ -585,6 +609,7 @@
+@@ -602,6 +626,7 @@
return 1;
}
static char basenamestr[32];
static const char *if_basename(const char *name);
-@@ -620,8 +645,10 @@
+@@ -637,8 +662,10 @@
int tos_bits = IPTOS_TOS(olsr_cnf->tos);
#endif
memset(&ifr, 0, sizeof(struct ifreq));
memset(&ifs, 0, sizeof(struct interface));
-@@ -728,11 +755,13 @@
- ifs.int_broadaddr = *(struct sockaddr_in *)&ifr.ifr_broadaddr;
+@@ -745,11 +772,13 @@
+ ifs.int_broadaddr = *(struct sockaddr_in *)(ARM_NOWARN_ALIGN)&ifr.ifr_broadaddr;
}
+#ifndef SVEN_OLA_UNBLOAT
}
-@@ -762,7 +791,9 @@
+@@ -779,7 +808,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) {
-@@ -867,10 +898,14 @@
+@@ -884,10 +915,14 @@
*/
memset(&null_addr, 0, olsr_cnf->ipsize);
if (ipequal(&null_addr, &olsr_cnf->main_addr)) {
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/Makefile olsrd-0-5-6-ecb9cb41f488/Makefile
---- olsrd-0-5-6-ecb9cb41f488.orig/Makefile 2009-03-25 13:33:46.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/Makefile 2009-03-25 13:37:04.000000000 +0000
-@@ -148,7 +148,7 @@
- ifeq ($(OS),win32)
- SUBDIRS := dot_draw httpinfo mini pgraph secure txtinfo
+--- a/Makefile
++++ b/Makefile
+@@ -154,7 +154,7 @@
+ # nameservice: no regex
+ SUBDIRS := bmf dot_draw dyn_gw_plain httpinfo mini quagga secure tas txtinfo watchdog
else
-SUBDIRS := bmf dot_draw dyn_gw dyn_gw_plain httpinfo mini nameservice pgraph secure txtinfo watchdog
+SUBDIRS := bmf dot_draw dyn_gw dyn_gw_plain httpinfo mini nameservice pgraph secure txtinfo watchdog mdns
endif
endif
-
-@@ -234,6 +234,11 @@
+ endif
+@@ -241,6 +241,11 @@
$(MAKECMD) -C lib/watchdog
$(MAKECMD) -C lib/watchdog DESTDIR=$(DESTDIR) install
build_all: all switch libs
install_all: install install_libs
clean_all: uberclean clean_libs
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/Makefile olsrd-0-5-6-ecb9cb41f488/lib/mdns/Makefile
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/Makefile 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/Makefile 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/Makefile
@@ -0,0 +1,66 @@
+#
+# OLSR Basic Multicast Forwarding (BMF) plugin.
+ rm -f $(OBJS) $(SRCS:%.c=%.d) $(PLUGIN_FULLNAME)
+
+endif
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/Address.c olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/Address.c
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/Address.c 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/Address.c 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/src/Address.c
@@ -0,0 +1,164 @@
+/*
+ * OLSR Basic Multicast Forwarding (BMF) plugin.
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/Address.h olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/Address.h
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/Address.h 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/Address.h 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/src/Address.h
@@ -0,0 +1,62 @@
+#ifndef _BMF_ADDRESS_H
+#define _BMF_ADDRESS_H
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/NetworkInterfaces.c olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/NetworkInterfaces.c
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/NetworkInterfaces.c 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/NetworkInterfaces.c 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/src/NetworkInterfaces.c
@@ -0,0 +1,1703 @@
+/*
+ * OLSR Basic Multicast Forwarding (BMF) plugin.
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/NetworkInterfaces.h olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/NetworkInterfaces.h
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/NetworkInterfaces.h 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/NetworkInterfaces.h 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/src/NetworkInterfaces.h
@@ -0,0 +1,162 @@
+#ifndef _BMF_NETWORKINTERFACES_H
+#define _BMF_NETWORKINTERFACES_H
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/Packet.c olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/Packet.c
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/Packet.c 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/Packet.c 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/src/Packet.c
@@ -0,0 +1,238 @@
+/*
+ * OLSR Basic Multicast Forwarding (BMF) plugin.
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/Packet.h olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/Packet.h
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/Packet.h 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/Packet.h 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/src/Packet.h
@@ -0,0 +1,88 @@
+#ifndef _BMF_PACKET_H
+#define _BMF_PACKET_H
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/PacketHistory.c olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/PacketHistory.c
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/PacketHistory.c 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/PacketHistory.c 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/src/PacketHistory.c
@@ -0,0 +1,324 @@
+/*
+ * OLSR Basic Multicast Forwarding (BMF) plugin.
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/PacketHistory.h olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/PacketHistory.h
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/PacketHistory.h 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/PacketHistory.h 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/src/PacketHistory.h
@@ -0,0 +1,75 @@
+#ifndef _BMF_PACKETHISTORY_H
+#define _BMF_PACKETHISTORY_H
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/mdns.c olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/mdns.c
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/mdns.c 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/mdns.c 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/src/mdns.c
@@ -0,0 +1,1174 @@
+/*
+ * OLSR MDNS plugin.
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/mdns.h olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/mdns.h
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/mdns.h 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/mdns.h 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/src/mdns.h
@@ -0,0 +1,95 @@
+#ifndef _BMF_BMF_H
+#define _BMF_BMF_H
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/olsrd_plugin.c olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/olsrd_plugin.c
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/src/olsrd_plugin.c 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/src/olsrd_plugin.c 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/src/olsrd_plugin.c
@@ -0,0 +1,185 @@
+/*
+ * OLSR Basic Multicast Forwarding (BMF) plugin.
+ * indent-tabs-mode: nil
+ * End:
+ */
-diff -Nurb olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/version-script.txt olsrd-0-5-6-ecb9cb41f488/lib/mdns/version-script.txt
---- olsrd-0-5-6-ecb9cb41f488.orig/lib/mdns/version-script.txt 1970-01-01 00:00:00.000000000 +0000
-+++ olsrd-0-5-6-ecb9cb41f488/lib/mdns/version-script.txt 2009-03-16 18:04:32.000000000 +0000
+--- /dev/null
++++ b/lib/mdns/version-script.txt
@@ -0,0 +1,10 @@
+VERS_1.0
+{