Modify

Opened 8 years ago

Closed 5 years ago

Last modified 4 years ago

#6439 closed defect (fixed)

Wrong END from ipcalc.sh

Reported by: h.hampel@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Kamikaze 8.09
Keywords: Cc:

Description

In a static assigned network I wanted a dynamic IP for a service Laptop at the very end of the network (10.0.0.254) yust one before the broadcast address:

Original ipcalc.sh:

root@igate:/etc/config# /bin/ipcalc.sh 10.0.0.1 255.255.255.0 10.0.0.254 1
IP=10.0.0.1
NETMASK=255.255.255.0
BROADCAST=10.0.0.255
NETWORK=10.0.0.0
PREFIX=24
START=10.0.0.254
END=10.0.0.253 #### END lower than START

I changed the limit calculation to:

limit=or(network,compl(netmask))

Now the calculation at the end of the network is equal to the calculation somewhere in the mid of the network:

root@igate:/etc/config# /bin/ipcalc.sh 10.0.0.1 255.255.255.0 10.0.0.100 1
IP=10.0.0.1
NETMASK=255.255.255.0
BROADCAST=10.0.0.255
NETWORK=10.0.0.0
PREFIX=24
START=10.0.0.100
END=10.0.0.100
root@igate:/etc/config# /bin/ipcalc.sh 10.0.0.1 255.255.255.0 10.0.0.254 1
IP=10.0.0.1
NETMASK=255.255.255.0
BROADCAST=10.0.0.255
NETWORK=10.0.0.0
PREFIX=24
START=10.0.0.254
END=10.0.0.254

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by florian

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.