IBM Support

IP Address Converted To Octal Value When IP Address Is Specified With Leading Zeros

Troubleshooting


Problem

When specifying an IP address in a policy with leading zeros using dotted decimal notation, each octet that has leading zeros will be converted and treated as an octal value and not a decimal value. For example, if you have 010.010.255.255 specified as an IP address in your policy this value will be converted to 8.8.255.255. These numbers are interpreted in C language syntax. Also, IP addresses specified with leading 0x are interpreted as hexadecimal values.

Symptom

The pasearch output will display the IP address as it is interpreted by the inet_addr() function:

For the following policy statements:
IpAddr VIPA
{
Addr 001.011.002.012
}
TTLSRule Test_VIPA
{
LocalAddrRef VIPA
}

The pasearch command will show:

pasearch -f Test_VIPA
FromAddr: 1.9.2.10
ToAddr: 1.9.2.10

Addr 1.011.002.012
FromAddr: 1.9.2.10
ToAddr: 1.9.2.10

Addr 1.11.002.012
FromAddr: 1.11.2.10
ToAddr: 1.11.2.10

Cause

Specifying IP addresses with leading zeros.

Environment

This applies to QOS, IDS, ATTLS or IPSEC policy statements.

Diagnosing The Problem

To diagnose this problem you can issue any pasearch command to see the IP address as it is interpreted by the inet_addr() function. Compare the IP address from the pasearch output to the IP address specified in your policy.

Resolving The Problem

Remove leading zeros from any IP addresses defined in the policy.

[{"Product":{"code":"SSSN3L","label":"z\/OS Communications Server"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"All","Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"1.10;1.11;1.12;1.13;2.1;2.2","Edition":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
15 June 2018

UID

swg21506388