chiark
/
gitweb
/
~ianmdlvl
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Import release 0.1.16
[secnet.git]
/
netlink.c
diff --git
a/netlink.c
b/netlink.c
index 704dcf6d35a2287f1ccdf041abcc05b1243bcdfa..466e68f1d66d6704dfe2efac158314c344e3bb02 100644
(file)
--- a/
netlink.c
+++ b/
netlink.c
@@
-97,6
+97,7
@@
their use.
*/
*/
+#include <string.h>
#include "secnet.h"
#include "util.h"
#include "ipaddr.h"
#include "secnet.h"
#include "util.h"
#include "ipaddr.h"
@@
-414,7
+415,7
@@
static void netlink_packet_deliver(struct netlink *st,
BUF_ASSERT_USED(buf);
if (dest==st->secnet_address) {
BUF_ASSERT_USED(buf);
if (dest==st->secnet_address) {
- Message(M_ERR,"%s: trying to deliver a packet to myself!\n");
+ Message(M_ERR,"%s: trying to deliver a packet to myself!\n"
,st->name
);
BUF_FREE(buf);
return;
}
BUF_FREE(buf);
return;
}
@@
-935,7
+936,7
@@
static list_t *netlink_inst_apply(closure_t *self, struct cloc loc,
netlink_deliver_fn *netlink_init(struct netlink *st,
void *dst, struct cloc loc,
netlink_deliver_fn *netlink_init(struct netlink *st,
void *dst, struct cloc loc,
- dict_t *dict, string_t description,
+ dict_t *dict,
c
string_t description,
netlink_route_fn *set_routes,
netlink_deliver_fn *to_host)
{
netlink_route_fn *set_routes,
netlink_deliver_fn *to_host)
{
@@
-961,9
+962,10
@@
netlink_deliver_fn *netlink_init(struct netlink *st,
if (l)
st->networks=string_list_to_ipset(l,loc,st->name,"networks");
else {
if (l)
st->networks=string_list_to_ipset(l,loc,st->name,"networks");
else {
- Message(M_WARNING,"%s: no local networks (parameter \"networks\") "
- "defined\n",st->name);
- st->networks=ipset_new();
+ struct ipset *empty;
+ empty=ipset_new();
+ st->networks=ipset_complement(empty);
+ ipset_free(empty);
}
l=dict_lookup(dict,"remote-networks");
if (l) {
}
l=dict_lookup(dict,"remote-networks");
if (l) {