~mdw
/
adns
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Portability fix for systems where socklen_t is bigger than int.
[adns]
/
src
/
types.c
diff --git
a/src/types.c
b/src/types.c
index
196a087
..
d65e155
100644
(file)
--- a/
src/types.c
+++ b/
src/types.c
@@
-4,7
+4,8
@@
*/
/*
* This file is part of adns, which is
*/
/*
* This file is part of adns, which is
- * Copyright (C) 1997-2000,2003,2006 Ian Jackson
+ * Copyright (C) 1997-2000,2003,2006,2014 Ian Jackson
+ * Copyright (C) 2014 Mark Wooding
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
* (See the file INSTALL for full details.)
* Copyright (C) 1999-2000,2003,2006 Tony Finch
* Copyright (C) 1991 Massachusetts Institute of Technology
* (See the file INSTALL for full details.)
@@
-20,8
+21,7
@@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * along with this program; if not, write to the Free Software Foundation.
*/
#include <stddef.h>
*/
#include <stddef.h>
@@
-1693,6
+1693,10
@@
DEEP_TYPE(unknown,0, "unknown",byteblock,opaque, 0, opaque );
const typeinfo *adns__findtype(adns_rrtype type) {
const typeinfo *begin, *end, *mid;
const typeinfo *adns__findtype(adns_rrtype type) {
const typeinfo *begin, *end, *mid;
+ if (type & ~(adns_rrtype)0x63ffffff)
+ /* 0x60000000 is reserved for `harmless' future expansion */
+ return 0;
+
if (type & adns_r_unknown) return &typeinfo_unknown;
type &= adns_rrt_reprmask;
if (type & adns_r_unknown) return &typeinfo_unknown;
type &= adns_rrt_reprmask;