## `forward-notify`
* IP addresses, separated by commas
-IP addresses to send received notifications to regardless of master or slave settings.
+IP addresses to forward received notifications to regardless of master or slave settings.
Note: The intended use is in anycast environments where it might be necessary for a
-proxy server to preform the AXFR. The usual checks are preformed before any received
+proxy server to perform the AXFR. The usual checks are performed before any received
notification is forwarded.
## `guardian`
#include "arguments.hh"
#include "packetcache.hh"
-#define CommunicatorLoadArgsIntoSet(listname, listset) do { \
- vector<string> parts; \
- stringtok(parts, ::arg()[(listname)], ", \t"); \
- for (vector<string>::const_iterator iter = parts.begin(); iter != parts.end(); ++iter) { \
- try { \
- ComboAddress caIp(*iter, 53); \
- (listset).insert(caIp.toStringWithPort()); \
- } \
- catch(PDNSException &e) { \
- L<<Logger::Error<<"Unparseable IP in "<<(listname)<<". Error: "<<e.reason<<endl; \
- exit(1); \
- } \
- } \
-} while(0)
-
// there can be MANY OF THESE
void CommunicatorClass::retrievalLoopThread(void)
{
}
}
+void CommunicatorClass::LoadArgsIntoSet(const char *listname, set<string> &listset)
+{
+ vector<string> parts;
+ stringtok(parts, ::arg()[listname], ", \t");
+ for (vector<string>::const_iterator iter = parts.begin(); iter != parts.end(); ++iter) {
+ try {
+ ComboAddress caIp(*iter, 53);
+ listset.insert(caIp.toStringWithPort());
+ }
+ catch(PDNSException &e) {
+ L<<Logger::Error<<"Unparseable IP in "<<listname<<". Error: "<<e.reason<<endl;
+ exit(1);
+ }
+ }
+}
+
void CommunicatorClass::go()
{
try {
exit(1);
}
- CommunicatorLoadArgsIntoSet("also-notify", d_alsoNotify);
+ LoadArgsIntoSet("also-notify", d_alsoNotify);
- CommunicatorLoadArgsIntoSet("forward-notify", PacketHandler::s_forwardNotify);
+ LoadArgsIntoSet("forward-notify", PacketHandler::s_forwardNotify);
}
void CommunicatorClass::mainloop(void)