FreeBSD Bugzilla – Attachment 147097 Details for
Bug 186841
rc.conf ifconfig syntax for binding ip-ranges broken [regression]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch to make the limit user-configurable and bump the default value up to 2048.
netif_ipexpand.20140909-1.diff (text/plain), 2.88 KB, created by
Hiroki Sato
on 2014-09-09 06:40:49 UTC
(
hide
)
Description:
A patch to make the limit user-configurable and bump the default value up to 2048.
Filename:
MIME Type:
Creator:
Hiroki Sato
Created:
2014-09-09 06:40:49 UTC
Size:
2.88 KB
patch
obsolete
>Index: etc/defaults/rc.conf >=================================================================== >--- etc/defaults/rc.conf (revision 270991) >+++ etc/defaults/rc.conf (working copy) >@@ -110,6 +110,7 @@ > # interfaces during startup. > defaultroute_delay="30" # Time to wait for a default route on a DHCP interface. > defaultroute_carrier_delay="5" # Time to wait for carrier while waiting for a default route. >+netif_expand_max="2048" # Maximum number of addrs in a range spec. > wpa_supplicant_program="/usr/sbin/wpa_supplicant" > wpa_supplicant_flags="-s" # Extra flags to pass to wpa_supplicant > wpa_supplicant_conf_file="/etc/wpa_supplicant.conf" >Index: etc/network.subr >=================================================================== >--- etc/network.subr (revision 270991) >+++ etc/network.subr (working copy) >@@ -25,10 +25,8 @@ > # $FreeBSD$ > # > IFCONFIG_CMD="/sbin/ifconfig" >+: ${netif_ipexpand_max:=2048} > >-# Maximum number of addresses expanded from a address range specification. >-_IPEXPANDMAX=31 >- > # > # Subroutines commonly used from network startup scripts. > # Requires that rc.conf be loaded first. >@@ -886,8 +884,8 @@ > _ipcount=$_iplow > while [ "$_ipcount" -le "$_iphigh" ]; do > _retstr="${_retstr} ${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail}${_plen:+/}${_plen}" >- if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ]; then >- warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed." >+ if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ]; then >+ warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed. Increase \$netif_ipexpand_max in rc.conf." > break > else > _ipcount=$(($_ipcount + 1)) >@@ -976,9 +974,9 @@ > $_ipleft $_ipcount $_ipright \ > ${_plen:+/}$_plen` > _retstr="$_retstr $_r" >- if [ $_ipcount -gt $(($_iplow + $_IPEXPANDMAX)) ] >+ if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ] > then >- warn "Range specification is too large $(printf '(%s:%04x%s-%s:%04x%s)' $_ipleft $_iplow $_ipright $_ipleft $_iphigh $_ipright). $(printf '%s:%04x%s-%s:%04x%s' $_ipleft $_iplow $_ipright $_ipleft $_ipcount $_ipright) was processed." >+ warn "Range specification is too large $(printf '(%s:%x%s-%s:%x%s)' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_iphigh" "$_ipright"). $(printf '%s:%x%s-%s:%x%s' "$_ipleft" "$_iplow" "$_ipright" "$_ipleft" "$_ipcount" "$_ipright") was processed. Increase \$netif_ipexpand_max in rc.conf." > break > else > _ipcount=$(($_ipcount + 1))
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 186841
: 147097