dhclient-script: install link-local static routes with correct scope (#787318)
This commit is contained in:
parent
6e0cd32614
commit
4e92627fc4
@ -406,9 +406,16 @@ dhconfig() {
|
||||
gateway=${static_routes[$i+1]}
|
||||
|
||||
# special case 0.0.0.0 to allow static routing for link-local addresses
|
||||
# (including IPv4 multicast) which will not have a next-hop (#769463)
|
||||
if [ "${gateway}" = "0.0.0.0" ] ||
|
||||
is_router_reachable ${gateway}; then
|
||||
# (including IPv4 multicast) which will not have a next-hop (#769463, #787318)
|
||||
if [ "${gateway}" = "0.0.0.0" ]; then
|
||||
valid_gateway=0
|
||||
scope='scope link'
|
||||
else
|
||||
is_router_reachable ${gateway}
|
||||
valid_gateway=$?
|
||||
scope=''
|
||||
fi
|
||||
if [ ${valid_gateway} -eq 0 ]; then
|
||||
metric=''
|
||||
for t in ${route_targets[@]}; do
|
||||
if [ ${t} = ${target} ]; then
|
||||
@ -424,7 +431,7 @@ dhconfig() {
|
||||
metric="metric ${metric}"
|
||||
fi
|
||||
|
||||
ip -4 route replace ${target}/${prefix} proto static via ${gateway} dev ${interface} ${metric}
|
||||
ip -4 route replace ${target}/${prefix} proto static via ${gateway} dev ${interface} ${metric} ${scope}
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
logmessage "failed to create static route: ${target}/${prefix} via ${gateway} dev ${interface} ${metric}"
|
||||
|
@ -22,7 +22,7 @@
|
||||
Summary: Dynamic host configuration protocol software
|
||||
Name: dhcp
|
||||
Version: 4.2.3
|
||||
Release: 16.%{patchver}%{?dist}
|
||||
Release: 17.%{patchver}%{?dist}
|
||||
# NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
|
||||
# dcantrell maintaining the package) made incorrect use of the epoch and
|
||||
# that's why it is at 12 now. It should have never been used, but it was.
|
||||
@ -607,6 +607,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Feb 07 2012 Jiri Popelka <jpopelka@redhat.com> - 12:4.2.3-17.P2
|
||||
- dhclient-script: install link-local static routes with correct scope (#787318)
|
||||
|
||||
* Wed Feb 1 2012 Adam Williamson <awilliam@redhat.com> - 12:4.2.3-16.P2
|
||||
- rebuild for new bind-libs-lite
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user