commit: c9fcba63eba9760cdbd5effc9a63394a3fa9d3ae
Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 24 00:04:16 2016 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Mon Oct 24 00:04:16 2016 +0000
URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=c9fcba63
iproute2: error-check the error-behavior input.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
net/iproute2.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/iproute2.sh b/net/iproute2.sh
index b6fd847..408e293 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -198,6 +198,7 @@ _add_address()
info) msgfunc=einfo rc=0 ;;
warn) msgfunc=ewarn rc=0 ;;
error|fatal) msgfunc=eerror rc=1;;
+ *) msgfunc=eerror rc=1 ; eerror "Unknown error
behavior: $eh_behavior" ;;
esac
eval $msgfunc "Address
${address}${netmask:+/}${netmask} already existed!"
eval $msgfunc \"$(ip addr show to
"${address}/${family_maxnetmask}" dev "${IFACE}" 2>&1)\"
@@ -269,6 +270,7 @@ _add_route()
info) msgfunc=einfo rc=0 ;;
warn) msgfunc=ewarn rc=0 ;;
error|fatal) msgfunc=eerror rc=1;;
+ *) msgfunc=eerror rc=1 ; eerror "Unknown error
behavior: $eh_behavior" ;;
esac
eval $msgfunc "Route '$cmd' already existed."
eval $msgfunc \"$(ip $family route show $cmd dev
"${IFACE}" 2>&1)\"