}
PolicyKind d_kind;
std::shared_ptr<DNSRecordContent> d_custom;
+ int d_ttl;
};
DNSFilterEngine();
res=RCode::NoError;
spoofed.d_name=dc->d_mdp.d_qname;
spoofed.d_type=dfepol.d_custom->getType();
- spoofed.d_ttl = 1234;
+ spoofed.d_ttl = dfepol.d_ttl;
spoofed.d_class = 1;
spoofed.d_content = dfepol.d_custom;
spoofed.d_place = DNSResourceRecord::ANSWER;
res=RCode::NoError;
spoofed.d_name=dc->d_mdp.d_qname;
spoofed.d_type=dfepol.d_custom->getType();
- spoofed.d_ttl = 1234;
+ spoofed.d_ttl = dfepol.d_ttl;
spoofed.d_class = 1;
spoofed.d_content = dfepol.d_custom;
spoofed.d_place = DNSResourceRecord::ANSWER;
boost::get<string>(constGet(have,"defcontent"))
)
);
+
+ if(have.count("defttl"))
+ defpol->d_ttl = boost::get<int>(constGet(have, "defttl"));
+ else
+ defpol->d_ttl = -1; // get it from the zone
}
}
boost::get<string>(constGet(have,"defcontent"))
)
);
+ if(have.count("defttl"))
+ defpol->d_ttl = boost::get<int>(constGet(have, "defttl"));
+ else
+ defpol->d_ttl = -1; // get it from the zone
+
}
}
// cerr<<"Wants custom "<<dr.d_content->getZoneRepresentation()<<" for "<<dr.d_name<<": ";
}
+ if(pol.d_ttl < 0)
+ pol.d_ttl = dr.d_ttl;
+
// now to DO something with that
if(dr.d_name.isPartOf(rpzNSDname)) {