Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 385842 Details for
Bug 524156
net-misc/netifrc - add support for RFC 3442 / Classless Static Route Option to udhcpc
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for RFC 3442 support in udhcpc script
udhcpc-rfc-3442.patch (text/plain), 1.12 KB, created by
Jack Suter
on 2014-09-30 19:26:34 UTC
(
hide
)
Description:
Patch for RFC 3442 support in udhcpc script
Filename:
MIME Type:
Creator:
Jack Suter
Created:
2014-09-30 19:26:34 UTC
Size:
1.12 KB
patch
obsolete
>--- /lib/netifrc/sh/udhcpc-hook.sh 2014-03-20 14:35:49.000000000 +0000 >+++ /lib/netifrc/sh/udhcpc-hook.sh 2014-09-30 19:26:23.636110088 +0000 >@@ -61,11 +61,35 @@ > ifconfig "${interface}" ${ip} ${broadcast} ${netmask} ${mtu} > } > >+update_classless_routes() >+{ >+ if [ -n "${staticroutes}" ] ; then >+ max_routes=128 >+ metric= >+ [ -n "${IF_METRIC}" ] && metric="metric ${IF_METRIC}" >+ while [ -n "$1" -a -n "$2" -a $max_routes -gt 0 ]; do >+ gw_arg= >+ if [ "$2" != '0.0.0.0' ]; then >+ gw_arg="gw $2" >+ fi >+ >+ [ ${1##*/} -eq 32 ] && type=host || type=net >+ route add -$type "$1" ${gw_arg} ${metric} dev "${interface}" >+ max=$(($max-1)) >+ shift 2 >+ done >+ fi >+} > update_routes() > { > peer_var "${PEER_ROUTERS}" && return > >- if [ -n "${router}" ] ; then >+ # RFC 3442 >+ [ -n "${staticroutes}" ] && update_classless_routes $staticroutes >+ >+ # If the DHCP server returns both a Classless Static Routes option and >+ # a Router option, the DHCP client MUST ignore the Router option. >+ if [ -n "${router}" -a -z "${staticroutes}" ] ; then > metric= > [ -n "${IF_METRIC}" ] && metric="metric ${IF_METRIC}" > for i in ${router} ; do
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 524156
: 385842