X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=netlink.c;h=466e68f1d66d6704dfe2efac158314c344e3bb02;hb=3b83c93292fbf6c4e859ce513bdf54ad90733f96;hp=704dcf6d35a2287f1ccdf041abcc05b1243bcdfa;hpb=ff05a229397c75142725f45cad191ce4a00625ce;p=secnet.git diff --git a/netlink.c b/netlink.c index 704dcf6..466e68f 100644 --- a/netlink.c +++ b/netlink.c @@ -97,6 +97,7 @@ their use. */ +#include #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) { - 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; } @@ -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, - dict_t *dict, string_t description, + dict_t *dict, cstring_t description, 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 { - 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) {