From: Alan T. DeKok Date: Sat, 26 Aug 2023 19:48:20 +0000 (-0400) Subject: Packet-Type is a real attribute here, too X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c7a030a52d34382ff642d053a5ef2c1f5202690;p=thirdparty%2Ffreeradius-server.git Packet-Type is a real attribute here, too --- diff --git a/src/lib/server/tmpl_eval.c b/src/lib/server/tmpl_eval.c index 6aa6044093f..1ffc591769d 100644 --- a/src/lib/server/tmpl_eval.c +++ b/src/lib/server/tmpl_eval.c @@ -1148,20 +1148,13 @@ static int tmpl_eval_pair_virtual(TALLOC_CTX *ctx, fr_value_box_list_t *out, packet = tmpl_packet_ptr(request, tmpl_list(vpt)); if (!packet) return 0; - if (tmpl_attr_tail_da(vpt) == attr_packet_type) { - if (!packet || !packet->code) return 0; - - MEM(value = fr_value_box_alloc(ctx, tmpl_attr_tail_da(vpt)->type, NULL)); - value->enumv = tmpl_attr_tail_da(vpt); - value->datum.int32 = packet->code; - /* * Virtual attributes which require a temporary fr_pair_t * to be allocated. We can't use stack allocated memory * because of the talloc checks sprinkled throughout the * various VP functions. */ - } else if (tmpl_attr_tail_da(vpt) == attr_packet_authentication_vector) { + if (tmpl_attr_tail_da(vpt) == attr_packet_authentication_vector) { MEM(value = fr_value_box_alloc_null(ctx)); fr_value_box_memdup(ctx, value, tmpl_attr_tail_da(vpt), packet->vector, sizeof(packet->vector), true);