Remove the default rule behavior 'static', this must now be specified.
Bump version to 0.2.5
This commit is contained in:
parent
9499745013
commit
9709759270
17
ChangeLog
17
ChangeLog
@ -1,10 +1,23 @@
|
||||
2016-04-18 Daniel Adolfsson <daniel@priv.nu>
|
||||
|
||||
* Version 0.2.5
|
||||
|
||||
* Defer configuration of interfaces until after daemonized; fixes an
|
||||
issue where ndppd would fail to set ALLMULTI on the interface
|
||||
properly.
|
||||
|
||||
* Fix a cast so ndppd can be compiled on GCC 6.
|
||||
|
||||
* Fix so ndppd changes working directory to / and umask to 0 once
|
||||
daemonized.
|
||||
|
||||
2015-10-13 Daniel Adolfsson <daniel@priv.nu>
|
||||
|
||||
* Version 0.2.4
|
||||
|
||||
* Fix an issue where ndppd daemonizes too early.
|
||||
* Fix an issue where ndppd daemonizes too early.
|
||||
|
||||
* Fix to make sure the right pid is written to the pidfile.
|
||||
* Fix to make sure the right pid is written to the pidfile.
|
||||
|
||||
2012-09-21 Daniel Adolfsson <daniel@priv.nu>
|
||||
|
||||
|
4
README
4
README
@ -1,13 +1,13 @@
|
||||
ndppd - NDP Proxy Daemon
|
||||
|
||||
Version 0.2.4
|
||||
Version 0.2.5
|
||||
|
||||
------------------------------------------------------------------------
|
||||
1. Legal
|
||||
------------------------------------------------------------------------
|
||||
|
||||
ndppd - NDP Proxy Daemon
|
||||
Copyright (C) 2011 Daniel Adolfsson <daniel@priv.nu>
|
||||
Copyright (C) 2011-2016 Daniel Adolfsson <daniel@priv.nu>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
40
src/ndppd.cc
40
src/ndppd.cc
@ -94,20 +94,34 @@ static ptr<conf> load_config(const std::string& path)
|
||||
address addr(*ru_cf);
|
||||
|
||||
if (x_cf = ru_cf->find("iface")) {
|
||||
if ((const std::string& )*x_cf == "") {
|
||||
if (ru_cf->find("static") || ru_cf->find("auto")) {
|
||||
logger::error()
|
||||
<< "Only one of 'iface', 'auto' and 'static' may "
|
||||
<< "be specified.";
|
||||
return (conf*)NULL;
|
||||
}
|
||||
if ((const std::string&)*x_cf == "") {
|
||||
logger::error() << "'iface' expected an interface name";
|
||||
return (conf*)NULL;
|
||||
}
|
||||
} else {
|
||||
if (!ru_cf->find("static")) {
|
||||
logger::warning()
|
||||
<< "## I'm going for 'static' since you didn't specify any method. Please fix this" << logger::endl
|
||||
<< "## as it's not going to be supported in future versions of ndppd. (See 'man ndppd.conf')";
|
||||
} else if (ru_cf->find("static")) {
|
||||
if (ru_cf->find("auto")) {
|
||||
logger::error()
|
||||
<< "Only one of 'iface', 'auto' and 'static' may "
|
||||
<< "be specified.";
|
||||
return (conf*)NULL;
|
||||
}
|
||||
|
||||
if (addr.prefix() <= 120) {
|
||||
logger::warning()
|
||||
<< "Low prefix length (" << addr.prefix() << " <= 120) when using 'static' method";
|
||||
<< "Low prefix length (" << addr.prefix()
|
||||
<< " <= 120) when using 'static' method";
|
||||
}
|
||||
} else if (!ru_cf->find("auto")) {
|
||||
logger::error()
|
||||
<< "You must specify either 'iface', 'auto' or "
|
||||
<< "'static'";
|
||||
return (conf*)NULL;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -163,18 +177,10 @@ static bool configure(ptr<conf>& cf)
|
||||
for (r_it = rules.begin(); r_it != rules.end(); r_it++) {
|
||||
ptr<conf> ru_cf =* r_it;
|
||||
|
||||
if (ru_cf->empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
address addr(*ru_cf);
|
||||
|
||||
if (x_cf = ru_cf->find("iface")) {
|
||||
if ((const std::string& )*x_cf == "") {
|
||||
|
||||
} else {
|
||||
pr->add_rule(addr, iface::open_ifd(*x_cf));
|
||||
}
|
||||
pr->add_rule(addr, iface::open_ifd(*x_cf));
|
||||
} else if (ru_cf->find("auto")) {
|
||||
pr->add_rule(addr, true);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user