Brief description
According to the description in rfc7871, the length of the ADDRESS field depends on the SOURCE PREFIX-LENGTH field.
FYI:

https://datatracker.ietf.org/doc/html/rfc7871#autoid-6:~:text=o%20%20ADDRESS%2C%20variable%20number%20of%20octets%2C%20contains%20either%20an%20IPv4%20or%0A%20%20%20%20%20%20IPv6%20address%2C%20depending%20on%20FAMILY%2C%20which%20MUST%20be%20truncated%20to%20the%0A%20%20%20%20%20%20number%20of%20bits%20indicated%20by%20the%20SOURCE%20PREFIX%2DLENGTH%20field%2C%0A%20%20%20%20%20%20padding%20with%200%20bits%20to%20pad%20to%20the%20end%20of%20the%20last%20octet%20needed.
Scapy version
2.7.0
Python version
3.13.5
Operating system
Linux 5.4.143
Additional environment information
No response
How to reproduce
I have 1 minimal reproducible code snippet here:
from scapy.layers.dns import EDNS0ClientSubnet
b = EDNS0ClientSubnet(source_plen=23, address='101.132.0.0')
# actual: b'\x00\x08\x00\x06\x00\x01\x17\x00e\x84'
# expected: b'\x00\x08\x00\x07\x00\x01\x17\x00e\x84\x00'
print(bytes(b))
Actual result
No response
Expected result
No response
Related resources
No response