Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 205894
Collapse All | Expand All

(-)ifconfig.sh (-15 / +7 lines)
Lines 362-382 Link Here
362
			[[ ${x} != *"-A inet6"* ]] && x="-A inet6 ${x}"
362
			[[ ${x} != *"-A inet6"* ]] && x="-A inet6 ${x}"
363
			x="${x// -net / }"
363
			x="${x// -net / }"
364
		else
364
		else
365
			# Work out if we're a host or a net if not told
365
			case ${x} in
366
			if [[ " ${x} " != *" -net "* && " ${x} " != *" -host "* ]] ; then
366
				-net" "*|-host" "*);;
367
				y="${x% *}"
367
				*" "netmask" "*) x="-net ${x}";;
368
				y="${y##* }"
368
				*.*.*.*/32*)     x="-host ${x}";;
369
				if [[ ${x} == *" netmask "* ]] ; then
369
				*.*.*.*/*|0.0.0.0" "*|default" "*) x="-net ${x}";;
370
					x="-net ${x}"
370
				*)               x="-host ${x}";;
371
				elif [[ ${y} == *.*.*.*/32 ]] ; then
371
			esac
372
					x="-host ${x}"
373
				elif [[ ${y} == *.*.*.*/* || ${y} == "default" || ${y} == "0.0.0.0" ]] ; then
374
					x="-net ${x}"
375
				else
376
					# Given the lack of a netmask, we assume a host
377
					x="-host ${x}"
378
				fi
379
			fi
380
		fi
372
		fi
381
373
382
		# Add a metric if we don't have one
374
		# Add a metric if we don't have one

Return to bug 205894