Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 205214 | Differences between
and this patch

Collapse All | Expand All

(-)dhcp-4.0.0.ORIG/client/scripts/bsdos (-2 / +5 lines)
Lines 95-100 Link Here
95
if [ x$new_interface_mtu != x ]; then
95
if [ x$new_interface_mtu != x ]; then
96
  mtu_arg="mtu $new_interface_mtu"
96
  mtu_arg="mtu $new_interface_mtu"
97
fi
97
fi
98
if [ x$IF_METRIC != x ]; then
99
  metric_arg="metric $IF_METRIC"
100
fi
98
101
99
if [ x$reason = xMEDIUM ]; then
102
if [ x$reason = xMEDIUM ]; then
100
  eval "ifconfig $interface $medium"
103
  eval "ifconfig $interface $medium"
Lines 156-162 Link Here
156
  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
159
  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
157
     [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
160
     [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
158
    eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
161
    eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
159
					$new_broadcast_arg $mtu_arg $medium"
162
			$new_broadcast_arg $mtu_arg $metric_arg $medium"
160
    route add $new_ip_address 127.1 >/dev/null 2>&1
163
    route add $new_ip_address 127.1 >/dev/null 2>&1
161
    for router in $new_routers; do
164
    for router in $new_routers; do
162
      route add default $router >/dev/null 2>&1
165
      route add default $router >/dev/null 2>&1
Lines 213-219 Link Here
213
    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
216
    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
214
  fi
217
  fi
215
  eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
218
  eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
216
					$new_broadcast_arg $mtu_arg $medium"
219
			$new_broadcast_arg $mtu_arg $metric_arg $medium"
217
  sleep 1
220
  sleep 1
218
  if [ "$new_routers" != "" ]; then
221
  if [ "$new_routers" != "" ]; then
219
    set $new_routers
222
    set $new_routers
(-)dhcp-4.0.0.ORIG/client/scripts/freebsd (-2 / +5 lines)
Lines 139-144 Link Here
139
if [ x$new_interface_mtu != x ]; then
139
if [ x$new_interface_mtu != x ]; then
140
  mtu_arg="mtu $new_interface_mtu"
140
  mtu_arg="mtu $new_interface_mtu"
141
fi
141
fi
142
if [ x$IF_METRIC != x ]; then
143
  metric_arg="metric $IF_METRIC"
144
fi
142
145
143
if [ x$reason = xMEDIUM ]; then
146
if [ x$reason = xMEDIUM ]; then
144
  eval "ifconfig $interface $medium"
147
  eval "ifconfig $interface $medium"
Lines 200-206 Link Here
200
  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
203
  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
201
     [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
204
     [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
202
    eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
205
    eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
203
					$new_broadcast_arg $mtu_arg $medium"
206
			$new_broadcast_arg $mtu_arg $metric_arg $medium"
204
    $LOGGER "New IP Address ($interface): $new_ip_address"
207
    $LOGGER "New IP Address ($interface): $new_ip_address"
205
    $LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
208
    $LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
206
    $LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
209
    $LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
Lines 264-270 Link Here
264
    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
267
    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
265
  fi
268
  fi
266
  eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
269
  eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
267
					$new_broadcast_arg $mtu_arg $medium"
270
			$new_broadcast_arg $mtu_arg $metric_arg $medium"
268
  $LOGGER "New IP Address ($interface): $new_ip_address"
271
  $LOGGER "New IP Address ($interface): $new_ip_address"
269
  $LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
272
  $LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
270
  $LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
273
  $LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
(-)dhcp-4.0.0.ORIG/client/scripts/linux (-22 / +17 lines)
Lines 98-108 Link Here
98
  fi
98
  fi
99
fi
99
fi
100
100
101
release=`uname -r`
102
release=`expr $release : '\(.*\)\..*'`
103
relminor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'`
104
relmajor=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
105
106
###
101
###
107
### DHCPv4 Handlers
102
### DHCPv4 Handlers
108
###
103
###
Lines 125-130 Link Here
125
if [ x$new_interface_mtu != x ]; then
120
if [ x$new_interface_mtu != x ]; then
126
  mtu_arg="mtu $new_interface_mtu"
121
  mtu_arg="mtu $new_interface_mtu"
127
fi
122
fi
123
if [ x$IF_METRIC != x ]; then
124
  metric_arg="metric $IF_METRIC"
125
fi
128
126
129
if [ x$reason = xMEDIUM ]; then
127
if [ x$reason = xMEDIUM ]; then
130
  # Linux doesn't do mediums (ok, ok, media).
128
  # Linux doesn't do mediums (ok, ok, media).
Lines 136-150 Link Here
136
    # Bring down alias interface. Its routes will disappear too.
134
    # Bring down alias interface. Its routes will disappear too.
137
    ifconfig $interface:0- inet 0
135
    ifconfig $interface:0- inet 0
138
  fi
136
  fi
139
  if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] )
137
  ifconfig $interface 0 up
140
   then
141
    ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
142
		broadcast 255.255.255.255 up
143
    # Add route to make broadcast work. Do not omit netmask.
144
    route add default dev $interface netmask 0.0.0.0
145
  else
146
    ifconfig $interface 0 up
147
  fi
148
138
149
  # We need to give the kernel some time to get the interface up.
139
  # We need to give the kernel some time to get the interface up.
150
  sleep 1
140
  sleep 1
Lines 186-197 Link Here
186
    ifconfig $interface inet $new_ip_address $new_subnet_arg \
176
    ifconfig $interface inet $new_ip_address $new_subnet_arg \
187
					$new_broadcast_arg $mtu_arg
177
					$new_broadcast_arg $mtu_arg
188
    # Add a network route to the computed network address.
178
    # Add a network route to the computed network address.
189
    if [ $relmajor -lt 2 ] || \
179
    if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then
190
		( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
180
      route del -net $new_network_number $new_subnet_arg \
191
      route add -net $new_network_number $new_subnet_arg dev $interface
181
        dev $interface
182
      route add -net $new_network_number $new_subnet_arg $metric_arg \
183
      	dev $interface
192
    fi
184
    fi
193
    for router in $new_routers; do
185
    for router in $new_routers; do
194
      route add default gw $router
186
      route add default gw $router $metric_arg dev $interface
195
    done
187
    done
196
  fi
188
  fi
197
  if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
189
  if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
Lines 234-245 Link Here
234
      ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
226
      ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
235
      route add -host $alias_ip_address dev $interface:0
227
      route add -host $alias_ip_address dev $interface:0
236
    fi
228
    fi
237
    if [ $relmajor -lt 2 ] || \
229
    # Add a network route to the computed network address.
238
		( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
230
    if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then
239
      route add -net $new_network_number
231
      route del -net $new_network_number $new_subnet_arg \
232
        dev $interface
233
      route add -net $new_network_number $new_subnet_arg $metric_arg \
234
      	dev $interface
240
    fi
235
    fi
241
    for router in $new_routers; do
236
    for router in $new_routers; do
242
      route add default gw $router
237
      route add default gw $router $metric_arg dev $interface
243
    done
238
    done
244
    make_resolv_conf
239
    make_resolv_conf
245
    exit_with_hooks 0
240
    exit_with_hooks 0
(-)dhcp-4.0.0.ORIG/client/scripts/netbsd (-2 / +5 lines)
Lines 95-100 Link Here
95
if [ x$new_interface_mtu != x ]; then
95
if [ x$new_interface_mtu != x ]; then
96
  mtu_arg="mtu $new_interface_mtu"
96
  mtu_arg="mtu $new_interface_mtu"
97
fi
97
fi
98
if [ x$IF_METRIC != x ]; then
99
  metric_arg="metric $IF_METRIC"
100
fi
98
101
99
if [ x$reason = xMEDIUM ]; then
102
if [ x$reason = xMEDIUM ]; then
100
  eval "ifconfig $interface $medium"
103
  eval "ifconfig $interface $medium"
Lines 156-162 Link Here
156
  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
159
  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
157
     [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
160
     [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
158
    eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
161
    eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
159
					$new_broadcast_arg $mtu_arg $medium"
162
			$new_broadcast_arg $mtu_arg $metric_arg $medium"
160
    route add $new_ip_address 127.1 >/dev/null 2>&1
163
    route add $new_ip_address 127.1 >/dev/null 2>&1
161
    for router in $new_routers; do
164
    for router in $new_routers; do
162
      route add default $router >/dev/null 2>&1
165
      route add default $router >/dev/null 2>&1
Lines 213-219 Link Here
213
    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
216
    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
214
  fi
217
  fi
215
  eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
218
  eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
216
					$new_broadcast_arg $mtu_arg $medium"
219
			$new_broadcast_arg $mtu_arg $metric_arg $medium"
217
  sleep 1
220
  sleep 1
218
  if [ "$new_routers" != "" ]; then
221
  if [ "$new_routers" != "" ]; then
219
    set $new_routers
222
    set $new_routers
(-)dhcp-4.0.0.ORIG/client/scripts/solaris (-2 / +5 lines)
Lines 78-83 Link Here
78
if [ x$new_interface_mtu != x ]; then
78
if [ x$new_interface_mtu != x ]; then
79
  mtu_arg="mtu $new_interface_mtu"
79
  mtu_arg="mtu $new_interface_mtu"
80
fi
80
fi
81
if [ x$IF_METRIC != x ]; then
82
  metric_arg="metric $IF_METRIC"
83
fi
81
84
82
ifconfig=/sbin/ifconfig
85
ifconfig=/sbin/ifconfig
83
86
Lines 140-146 Link Here
140
  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
143
  if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
141
     [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
144
     [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
142
    eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
145
    eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
143
					$new_broadcast_arg $mtu_arg $medium"
146
			$new_broadcast_arg $mtu_arg $metric_arg $medium"
144
    route add $new_ip_address 127.1 1 >/dev/null 2>&1
147
    route add $new_ip_address 127.1 1 >/dev/null 2>&1
145
    for router in $new_routers; do
148
    for router in $new_routers; do
146
      route add default $router 1 >/dev/null 2>&1
149
      route add default $router 1 >/dev/null 2>&1
Lines 181-187 Link Here
181
    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
184
    route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
182
  fi
185
  fi
183
  eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
186
  eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
184
					$new_broadcast_arg $mtu_arg $medium"
187
			$new_broadcast_arg $mtu_arg $metric_arg $medium"
185
  sleep 1
188
  sleep 1
186
  set $new_routers
189
  set $new_routers
187
  if ping -s -n -I 1 $1 64 1; then
190
  if ping -s -n -I 1 $1 64 1; then

Return to bug 205214