Bug 228338 - ipfw: ambiguous and bad resolving of AAAA hostnames
Summary: ipfw: ambiguous and bad resolving of AAAA hostnames
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ipfw (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2018-05-18 15:37 UTC by bugs.freebsd.org
Modified: 2020-02-29 04:00 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugs.freebsd.org 2018-05-18 15:37:46 UTC
'ipv6.google.com' have only AAAA record.
'freebsd.org' have both.

ipfw table 4 create type addr valtype ipv4
ipfw table 6 create type addr valtype ipv6

It's ok to add ipv4&v6 address to any table, but value type must be exact as defined.

ipfw table 4 add 1::1 127.0.0.1
added: 1::1/128 127.0.0.1

ipfw table 6 add 127.0.0.1 1::1
added: 127.0.0.1/32 1::1


There are several examples:

ipfw table 4 add freebsd.org freebsd.org
added: 8.8.178.110/32 8.8.178.110
Ok.

ipfw table 6 add freebsd.org freebsd.org
ipfw: Unable to parse freebsd.org as ipv6
Bad. Cannot resolve ipv6 value.

ipfw table 6 add freebsd.org 2::2
added: 8.8.178.110/32 2::2
Ok, but ambiguous and useless.

ipfw table 6 add ipv6.google.com 2::2
ipfw: hostname ``ipv6.google.com'' unknown
Bad. Cannot resolve ipv6 addr.

ipfw add 11111 fwd freebsd.org ip4 from freebsd.org to freebsd.org
11111 fwd 8.8.178.110 ip4 from 8.8.178.110 to 8.8.178.110
Ok.

ipfw add 11111 fwd freebsd.org ip6 from freebsd.org to freebsd.org
11111 fwd 8.8.178.110 ip6 from 2001:1900:2254:206a::50:0 to 2001:1900:2254:206a::50:0
Ok, but ambiguous and useless.

ipfw add 11111 fwd ipv6.google.com ip6 from ipv6.google.com to ipv6.google.com
11111 fwd 2607:f8b0:4005:807::200e ip6 from 2607:f8b0:4005:807::200e to 2607:f8b0:4005:807::200e
Ok, because AAAA host only.
Comment 1 Neel Chauhan freebsd_committer freebsd_triage 2020-02-29 04:00:51 UTC
Phabricator URL: https://reviews.freebsd.org/D23888