Commit Graph

35 Commits

Author SHA1 Message Date
Manabu Sonoda af0c865ab3
fix Msg.Used TTL must be zero (#1280)
* fix Msg.Used RRset exists (value dependent -- with rdata) TTL must be zero

* Used(): change ttl using Header()
2021-07-18 09:24:05 +02:00
Tom Thorogood b9e1e7529b Avoid calling RR.Header more than once per RR (#891)
* Avoid calling RR.Header more than once per RR

Header is an interface method so there's non-zero overhead when calling
it.

* Reset entire RR_Header in SIG.Sign

This is equivilant (while also clearing Rdlength) while being simpler.
2019-01-04 08:12:32 +00:00
Pauline Middelink 13a6137d79 An update msg can have multiple, different prerequests and also multiple,
dfferent remove and inserts. The old code did a reset of the ANSWER and
AUTHORITY section each time a rrset was added.

Made a slight optimalisation that the first time an rrset is added, we
take it length as the initial size. Helps for the one-time add cases.

Added test to prevent regressions.
2016-02-27 12:58:10 +01:00
Miek Gieben 64fea017a2 Move all docs to docs.go
Another golint change.
2015-02-19 13:47:50 +00:00
Miek Gieben f5bc1323a1 update.go: make RemoveRRset as dumb as the rest.
The RemoveRRset method was the only one that had a check for RRsets.
While adding multiple identical RRs is an error, there should be now
check for that at this level.
2015-01-13 14:40:53 +00:00
Andrew Tunnell-Jones 022d2d4a01 Lose a loop in Msg.RemoveRRset() and use copyHeader()
Per @miekg's advice
2014-11-12 09:54:56 +00:00
Andrew Tunnell-Jones 104b206d2c Make RemoveRRset work as intended 2014-11-12 07:57:16 +00:00
Miek Gieben 0aa3021a83 Remove all copyright notices
Use the central COPYRIGHT file.
2014-09-11 20:57:37 +01:00
Miek Gieben 4dd48338af documentation tweaks 2014-07-30 07:35:06 +01:00
Miek Gieben 81941d4422 Update all copyright notices 2013-05-12 16:15:52 +02:00
Miek Gieben d53d9eab81 gofmt 2013-05-05 20:30:44 +02:00
Miek Gieben 235e892dfc Rename the RR types drop the RR_ prefix
This is also done in the official Go library. It also make the
code shorter.
2012-12-09 19:23:25 +01:00
Miek Gieben 9ca924a069 Rename dynamic update functions (again)
* Use simple names and add zone Remove function for dynamic update use.
* Locking 'n stuff is all taken care off
* TSIG is working and the duplicate code is removed.
* readClient and writeClient are renamed read and write, because that is
  what they do.
2012-10-16 10:41:20 +02:00
Miek Gieben 89cb935efe Rename *all* dynamic update function
Be more consistent with the rest of the function names. I also
started on implementinf the dynamic update function to the zone
implementation. Those names will also be in sync.
2012-10-15 16:50:39 +02:00
Miek Gieben e4fb00c34d Fix handling of non fully qualified domain names
When PackDomain sees such a name it calls panic.
All panic now use the prefix 'dns:'
2012-08-28 18:21:23 +02:00
Miek Gieben 1687a13438 Further minimize the lib 2012-08-20 09:39:10 +02:00
Miek Gieben 88a2d13a8f Remove NewUpdate, we already have the simpler SetUpdate 2012-05-26 14:56:23 +02:00
Miek Gieben 784713d0e0 Docs 2012-01-26 22:52:29 +01:00
Miek Gieben 9f3a1c1f13 Documentation and make ParseKey private (parseKey) 2012-01-16 21:44:49 +01:00
Miek Gieben 03a8ee13a2 NSEC3 encoding works
Only for 1 windows, but dig has stopped complaining. This
needs to be streamlined a little, but its looking good.
2012-01-14 11:08:42 +01:00
Miek Gieben 0509df509e gofmt 2012-01-12 23:17:34 +01:00
Miek Gieben 2e4ea2628c Default to non-compression 2012-01-11 20:28:13 +01:00
Miek Gieben 53de6bd81c Remove these methods 2011-12-16 19:36:33 +01:00
Miek Gieben 131f6962d1 gofmt 2011-12-09 21:45:57 +01:00
Miek Gieben 05eb569938 Test and fix dynamic updates
* Update to the new Go version
* Fix lot of things that need fixes

Need a why to communicate half RRs (i.e. A record without rdata)
2011-12-09 21:12:03 +01:00
Miek Gieben 92736e2a8a Dont create a new type for updates 2011-12-09 20:56:59 +01:00
Dusty Wilson 564a0fe2e0 RRsetDeleteRR must set TTL to 0 otherwise BIND rejects with a "FORMERR" error when attempting to delete.
The file named/update.c.html in the BIND project tests the TTL immediately after seeing that "update_class == dns_rdataclass_none".  See also http://www.fiveanddime.net/bind-9/bind-9.3.1/bin/named/update.c.html and search for the above conditional.
2011-12-06 02:59:28 -08:00
Miek Gieben 6f78219c22 Documentation updates 2011-09-11 20:47:25 +02:00
Miek Gieben 2de43f486f documentation 2011-09-08 19:41:26 +02:00
Miek Gieben 6eabda897c typo 2011-08-24 15:44:09 +02:00
Miek Gieben 7aa11e5d3e add panics to update if q section is empty 2011-08-24 15:39:26 +02:00
Miek Gieben 6751a16313 Fix the all the update operations 2011-08-22 15:43:52 +02:00
Miek Gieben 7195ce739c Need to think about naming 2011-08-22 15:35:52 +02:00
Miek Gieben 1ebb11deaf More dyn update stuff 2011-08-22 15:16:24 +02:00
Miek Gieben 9fcbef5edc Add dynamic update support 2011-08-22 14:51:10 +02:00