qubes_netwatcher: add a note about NETCFG untrusted origin
This commit is contained in:
parent
0d785fcbf8
commit
5923741c83
@ -13,11 +13,12 @@ trap 'exit 0' SIGTERM
|
|||||||
while true; do
|
while true; do
|
||||||
NET_DOMID=$(/usr/bin/xenstore-read qubes_netvm_domid)
|
NET_DOMID=$(/usr/bin/xenstore-read qubes_netvm_domid)
|
||||||
if [[ -n "$NET_DOMID" ]] && [[ $NET_DOMID -gt 0 ]]; then
|
if [[ -n "$NET_DOMID" ]] && [[ $NET_DOMID -gt 0 ]]; then
|
||||||
NETCFG=$(/usr/bin/xenstore-read /local/domain/$NET_DOMID/qubes_netvm_external_ip)
|
UNTRUSTED_NETCFG=$(/usr/bin/xenstore-read /local/domain/$NET_DOMID/qubes_netvm_external_ip)
|
||||||
if [[ "$NETCFG" != "$CURR_NETCFG" ]]; then
|
# UNTRUSTED_NETCFG is not parsed in any way
|
||||||
|
if [[ "$UNTRUSTED_NETCFG" != "$CURR_NETCFG" ]]; then
|
||||||
/sbin/service qubes_firewall stop
|
/sbin/service qubes_firewall stop
|
||||||
/sbin/service qubes_firewall start
|
/sbin/service qubes_firewall start
|
||||||
CURR_NETCFG="$NETCFG"
|
CURR_NETCFG="$UNTRUSTED_NETCFG"
|
||||||
/usr/bin/xenstore-write qubes_netvm_external_ip "$CURR_NETCFG"
|
/usr/bin/xenstore-write qubes_netvm_external_ip "$CURR_NETCFG"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user