Modify

Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#2351 closed defect (worksforme)

whiterussian 0.9 host-route in ${ifname}_static_route not handled correctly (bugfix attached)

Reported by: anonymous Owned by: developers
Priority: normal Milestone:
Component: base system Version:
Keywords: Cc:

Description

/sbin/route does not like the netmask "255.255.255.255" in case you want to add a route to a host... so leave "netmask 255.255.255.255" blank within /etc/functions.sh

BugFix for /etc/functions.sh (beginning at line 59):

if [ "$2" = "255.255.255.255" ]; then

$DEBUG route add -host $1 gw $3 metric $4

else

$DEBUG route add -net $1 netmask $2 gw $3 metric $4

fi

Log which repruduces the above described bug:

root@wl500gp:/sbin# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.113.10.0 0.0.0.0 255.255.255.252 U 0 0 0 vlan10
10.113.1.0 0.0.0.0 255.255.255.248 U 0 0 0 vlan1
10.113.103.0 0.0.0.0 255.255.255.224 U 0 0 0 eth2
10.113.102.0 0.0.0.0 255.255.255.224 U 0 0 0 vlan12
0.0.0.0 10.113.10.1 0.0.0.0 UG 0 0 0 vlan10

root@wl500gp:/sbin# route add -host 10.113.2.1 netmask 255.255.255.255 gw 10.113.1.6 metric 1
route: netmask 00000000 and host route conflict

root@wl500gp:/sbin# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.113.10.0 0.0.0.0 255.255.255.252 U 0 0 0 vlan10
10.113.1.0 0.0.0.0 255.255.255.248 U 0 0 0 vlan1
10.113.103.0 0.0.0.0 255.255.255.224 U 0 0 0 eth2
10.113.102.0 0.0.0.0 255.255.255.224 U 0 0 0 vlan12
0.0.0.0 10.113.10.1 0.0.0.0 UG 0 0 0 vlan10

root@wl500gp:/sbin# route add -host 10.113.2.1 gw 10.113.1.6 metric 1
root@wl500gp:/sbin# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.113.2.1 10.113.1.6 255.255.255.255 UGH 1 0 0 vlan1
10.113.10.0 0.0.0.0 255.255.255.252 U 0 0 0 vlan10
10.113.1.0 0.0.0.0 255.255.255.248 U 0 0 0 vlan1
10.113.103.0 0.0.0.0 255.255.255.224 U 0 0 0 eth2
10.113.102.0 0.0.0.0 255.255.255.224 U 0 0 0 vlan12
0.0.0.0 10.113.10.1 0.0.0.0 UG 0 0 0 vlan10

Attachments (0)

Change History (2)

comment:2 Changed 10 years ago by nbd

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

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.