summaryrefslogtreecommitdiffstats
path: root/src/plugins/acl/acl.api
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2022-11-09 01:18:56 +0000
committerBeno�t Ganne <bganne@cisco.com>2022-11-09 13:07:20 +0000
commit90943e5a049c18816a0da947a7366072e9a4a50a (patch)
treed8a56270ff1e125b1750dfbc8680e29159a6c90b /src/plugins/acl/acl.api
parent1f4b6518da19852a6e04f6dedc99224bc2963e1f (diff)
ip: fix unformat_ip_address forcing version to IP4 for some IP6 addresses
dd2f12ba made use of ip46_address_is_ip4() in order to determine whether the address is ipv4 or ipv6 within unformat_ip_address - however, its logic is correct only for some addresses. e.g. a valid IPv6 address of :: (unspecified) will result in "true" result. This is probably not an issue for most of the cases (the unspecified address is quite rare), however if the unformat_ip_address is used as part of the prefix parsing, the ::/0 is a fairly often utilized construct, which gets parsed as 0.0.0.0 Solution: return the old logic, but use a temporary variable to avoid overwriting the target memory on failure. Type: fix Fixes: dd2f12ba6ab952d9d66f4d9ba89ffde6309b1ff2. Change-Id: I272f740dfdf07036cec68516e153f0701a53233d Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/plugins/acl/acl.api')
0 files changed, 0 insertions, 0 deletions