#2379 IP address with just 3 octets are accepted as valid addresses in --a-rec option.
Closed: Fixed None Opened 12 years ago by dpal.

https://bugzilla.redhat.com/show_bug.cgi?id=789919 (Red Hat Enterprise Linux 6)

Description of problem:

This was detected by Niru as part of IPA DNS Test Day.

As part of negative testing, providing non-integers for --a-rec option gives
appropriate error message, however, providing data with just 3 octets doesn't
give any error.

Version-Release number of selected component (if applicable):
ipa-server-2.2.0-101.20120209T0933zgit52cf9d9.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. [root@skyfire ~]# ipa dnsrecord-add lab.eng.pnq.redhat.com bumblebee
--a-rec=a.b.c.d
ipa: ERROR: invalid 'ip_address': invalid IP address format
[root@skyfire ~]#

2. [root@skyfire ~]# ipa dnsrecord-add lab.eng.pnq.redhat.com bumblebee
--a-rec=10.65.211
  Record name: bumblebee
  A record: 10.65.211
[root@skyfire ~]#


Actual results:
IP address with just 3 octets is accepted.

Expected results:
Should error out stating "ipa: ERROR: invalid 'ip_address': invalid IP address
format"

Additional info:

I shouldn't have stolen this ticket :)

I revisited this issue, Petr's approach is OK, the reasoning is on the freeipa-devel list. Thus, we can go with his patch.

Metadata Update from @dpal:
- Issue assigned to pviktori
- Issue set to the milestone: FreeIPA 2.2 Core Effort - 2012/02

7 years ago

Login to comment on this ticket.

Metadata