Modify

Opened 9 years ago

Closed 9 years ago

Last modified 4 years ago

#4929 closed defect (fixed)

redundant code in /etc/hotplug.d/iface/10-routes

Reported by: anonymous Owned by: developers
Priority: lowest Milestone: Barrier Breaker 14.07
Component: packages Version: Kamikaze 8.09
Keywords: Cc:

Description

The following code in /etc/hotplug.d/iface/10-routes is partly redundant:

	netmask="${netmask:-255.255.255.255}"
	dest="${netmask:+-net "$target" netmask "$netmask"}"
	dest="${dest:--host "$target"}"

The first line always sets $netmask. The second line sets $dest if netmask is set (which is always is, because of line 1), the third line sets $dest if it is not set (which never happens, as it is always set on line 2).

It should EITHER be

	dest="${netmask:+-net "$target" netmask "$netmask"}"
	dest="${dest:--host "$target"}"

OR it should be

	netmask="${netmask:-255.255.255.255}"
	dest="-net "$target" netmask "$netmask

(the first option will give "-net $target netmask 255.255.255.255" if the netmask is undefined, the second option gives "-host $target" if netmask is undefined).

Of course, the result in /sbin/route is the same, and the code is not wrong, only redundant, so I set the priority of this bug to lowest.

Attachments (0)

Change History (3)

comment:1 Changed 9 years ago by anonymous

sorry -- component is wrong, should be "base system".
reporter: software@… (is set to anonymous now)

comment:2 Changed 9 years ago by jow

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

see r15219 and r15220

comment:3 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.