chiark
/
gitweb
/
~ianmdlvl
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changelog: start 0.6.8
[secnet.git]
/
polypath.c
diff --git
a/polypath.c
b/polypath.c
index 1d73a0a5d59c8eed5ad7f00c69e3117ab723ec75..adac598b3505784f2a3065ad17e49fcb3a15c06f 100644
(file)
--- a/
polypath.c
+++ b/
polypath.c
@@
-7,7
+7,7
@@
*
* secnet is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
*
* secnet is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version
d
of the License, or
+ * the Free Software Foundation; either version
3
of the License, or
* (at your option) any later version.
*
* secnet is distributed in the hope that it will be useful, but
* (at your option) any later version.
*
* secnet is distributed in the hope that it will be useful, but
@@
-27,6
+27,7
@@
#include <adns.h>
#include <ctype.h>
#include <adns.h>
#include <ctype.h>
+#include <limits.h>
#ifdef CONFIG_IPV6
#ifdef CONFIG_IPV6
@@
-98,7
+99,7
@@
static bool_t ifname_search_pats(struct polypath *st, struct cloc loc,
const char *const *pati;
for (pati=pats; *pati; pati++) {
const char *pat=*pati;
const char *const *pati;
for (pati=pats; *pati; pati++) {
const char *pat=*pati;
- if (*pat=='!' || *pat=='+') { *want_io=*pat; pat++; }
+ if (*pat=='!' || *pat=='+'
|| *pat=='@'
) { *want_io=*pat; pat++; }
else if (*pat=='*' || isalnum((unsigned char)*pat)) { *want_io='+'; }
else cfgfatal(loc,"polypath","invalid interface name pattern `%s'",pat);
int match=fnmatch(pat,ifname,0);
else if (*pat=='*' || isalnum((unsigned char)*pat)) { *want_io='+'; }
else cfgfatal(loc,"polypath","invalid interface name pattern `%s'",pat);
int match=fnmatch(pat,ifname,0);
@@
-351,8
+352,8
@@
static void polypath_record_ifaddr(struct polypath *st,
struct interf_list *interfs;
switch (want) {
struct interf_list *interfs;
switch (want) {
- case '+':
interfs=&st->interfs_general; max_interfs=st->max_interfs
;
- case '@':
interfs=&st->interfs_dedicated; max_interfs=INT_MAX
;
+ case '+':
interfs=&st->interfs_general; max_interfs=st->max_interfs; break
;
+ case '@':
interfs=&st->interfs_dedicated; max_interfs=INT_MAX; break
;
default: fatal("polypath: got bad want (%#x, %s)", want, ifname);
}
default: fatal("polypath: got bad want (%#x, %s)", want, ifname);
}
@@
-503,9
+504,6
@@
static void polypath_sendmsg_interf(struct polypath *st,
}
if (!(errno==EAFNOSUPPORT || errno==ENETUNREACH))
reasonable=True;
}
if (!(errno==EAFNOSUPPORT || errno==ENETUNREACH))
reasonable=True;
- lg_perror(LG,M_DEBUG,errno,"%s [%s] xmit %"PRIu32" bytes to %s",
- interf->name,iaddr_to_string(&us->addr),
- buf->size,iaddr_to_string(&dest->ia));
}
if (!wanted)
return;
}
if (!wanted)
return;
@@
-516,7
+514,7
@@
static void polypath_sendmsg_interf(struct polypath *st,
"%s has no suitable address to transmit %s",
interf->name, af_name(af));
"%s has no suitable address to transmit %s",
interf->name, af_name(af));
- *allreasonable
*
= reasonable;
+ *allreasonable
&
= reasonable;
}
static bool_t polypath_sendmsg(void *commst, struct buffer_if *buf,
}
static bool_t polypath_sendmsg(void *commst, struct buffer_if *buf,