diff options
| author | Shulhan <ms@kilabit.info> | 2021-11-14 18:13:10 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-11-14 18:13:10 +0700 |
| commit | c2f3d1575ad29294ebadb9dd7ee6d7a06dc955ae (patch) | |
| tree | de6ffe45db74c5d305ad71616bef63b07e0f08c6 /lib/dns/server.go | |
| parent | 3f02602db8cfe6fbb09d550ac723fc251eb81f1d (diff) | |
| download | pakakeh.go-c2f3d1575ad29294ebadb9dd7ee6d7a06dc955ae.tar.xz | |
lib/dns: refactoring, introduce new type RecordClass
Previously, the record class is represented by uint16 using prefix
QueryClassXxx.
This changes make the record class to be an independent type, to make
code more strict (prevent passing invalid value), and readable.
Diffstat (limited to 'lib/dns/server.go')
| -rw-r--r-- | lib/dns/server.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dns/server.go b/lib/dns/server.go index 8f11471a..889be7c6 100644 --- a/lib/dns/server.go +++ b/lib/dns/server.go @@ -643,7 +643,7 @@ func (srv *Server) serveTCPClient(cl *TCPClient, kind connType) { func (srv *Server) isImplemented(msg *Message) bool { switch msg.Question.Class { - case QueryClassCS, QueryClassCH, QueryClassHS: + case RecordClassCH, RecordClassHS: log.Printf("dns: class %d is not implemented", msg.Question.Class) return false } |
