From: Arran Cudbard-Bell Date: Sat, 17 Feb 2018 00:46:43 +0000 (+0000) Subject: Move cases to that ipv4addr, ifid, and ethernet all use the standard encoder X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ca533ec5a6c19c83f43919831db1ce50f962d86;p=thirdparty%2Ffreeradius-server.git Move cases to that ipv4addr, ifid, and ethernet all use the standard encoder --- diff --git a/src/protocols/dhcpv6/encode.c b/src/protocols/dhcpv6/encode.c index b6113d735f3..e1cfc4ba60d 100644 --- a/src/protocols/dhcpv6/encode.c +++ b/src/protocols/dhcpv6/encode.c @@ -263,13 +263,6 @@ static ssize_t encode_value(uint8_t *out, size_t outlen, } break; - /* - * Normal data types use the common encoder. - */ - case FR_TYPE_IPV4_ADDR: - case FR_TYPE_IFID: - case FR_TYPE_ETHERNET: /* just in case */ - /* * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 @@ -316,6 +309,9 @@ static ssize_t encode_value(uint8_t *out, size_t outlen, case FR_TYPE_INT16: case FR_TYPE_INT32: case FR_TYPE_INT64: + case FR_TYPE_IPV4_ADDR: + case FR_TYPE_IFID: + case FR_TYPE_ETHERNET: CHECK_FREESPACE(outlen, fr_dhcpv6_option_len(vp)); slen = fr_value_box_to_network(NULL, p, end - p, &vp->data); if (slen < 0) return PAIR_ENCODE_ERROR;