msgencode.c (5a2b666ce590a56f147e167aa07684af2d6b854a) | msgencode.c (b75612f8e7445139aa2b10038feab06da4b45cc1) |
---|---|
1/* 2 * util/data/msgencode.c - Encode DNS messages, queries and replies. 3 * 4 * Copyright (c) 2007, NLnet Labs. All rights reserved. 5 * 6 * This software is open source. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 269 unchanged lines hidden (view full) --- 278 279/** compress owner name of RR, return RETVAL_OUTMEM RETVAL_TRUNC */ 280static int 281compress_owner(struct ub_packed_rrset_key* key, sldns_buffer* pkt, 282 struct regional* region, struct compress_tree_node** tree, 283 size_t owner_pos, uint16_t* owner_ptr, int owner_labs) 284{ 285 struct compress_tree_node* p; | 1/* 2 * util/data/msgencode.c - Encode DNS messages, queries and replies. 3 * 4 * Copyright (c) 2007, NLnet Labs. All rights reserved. 5 * 6 * This software is open source. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 269 unchanged lines hidden (view full) --- 278 279/** compress owner name of RR, return RETVAL_OUTMEM RETVAL_TRUNC */ 280static int 281compress_owner(struct ub_packed_rrset_key* key, sldns_buffer* pkt, 282 struct regional* region, struct compress_tree_node** tree, 283 size_t owner_pos, uint16_t* owner_ptr, int owner_labs) 284{ 285 struct compress_tree_node* p; |
286 struct compress_tree_node** insertpt; | 286 struct compress_tree_node** insertpt = NULL; |
287 if(!*owner_ptr) { 288 /* compress first time dname */ 289 if((p = compress_tree_lookup(tree, key->rk.dname, 290 owner_labs, &insertpt))) { 291 if(p->labs == owner_labs) 292 /* avoid ptr chains, since some software is 293 * not capable of decoding ptr after a ptr. */ 294 *owner_ptr = htons(PTR_CREATE(p->offset)); --- 547 unchanged lines hidden --- | 287 if(!*owner_ptr) { 288 /* compress first time dname */ 289 if((p = compress_tree_lookup(tree, key->rk.dname, 290 owner_labs, &insertpt))) { 291 if(p->labs == owner_labs) 292 /* avoid ptr chains, since some software is 293 * not capable of decoding ptr after a ptr. */ 294 *owner_ptr = htons(PTR_CREATE(p->offset)); --- 547 unchanged lines hidden --- |