mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 8347: skip ebtables if kernel doesn't support it
This commit is contained in:
parent
66cb75ded3
commit
58e92bbe84
@ -5,12 +5,12 @@
|
||||
import os, sys, time
|
||||
import XenAPIPlugin
|
||||
sys.path.extend(["/opt/xensource/sm/", "/usr/local/sbin/", "/sbin/"])
|
||||
from util import CommandException
|
||||
import base64
|
||||
import hostvmstats
|
||||
import socket
|
||||
import stat
|
||||
import base64
|
||||
import tempfile
|
||||
import util
|
||||
|
||||
def echo(fn):
|
||||
def wrapped(*v, **k):
|
||||
@ -482,7 +482,11 @@ def default_ebtables_rules(vm_name, vif, vm_ip, vm_mac):
|
||||
try:
|
||||
util.pread2(['ebtables', '-t', 'nat', '-N', chain])
|
||||
except:
|
||||
util.pread2(['ebtables', '-t', 'nat', '-F', chain])
|
||||
try:
|
||||
util.pread2(['ebtables', '-t', 'nat', '-F', chain])
|
||||
except:
|
||||
util.SMlog("Failed to create ebtables nat rule, skipping")
|
||||
return 'true'
|
||||
|
||||
try:
|
||||
# -s ! 52:54:0:56:44:32 -j DROP
|
||||
@ -513,6 +517,8 @@ def default_ebtables_rules(vm_name, vif, vm_ip, vm_mac):
|
||||
except:
|
||||
util.SMlog("Failed to program default ebtables OUT rules")
|
||||
return 'false'
|
||||
|
||||
return 'true'
|
||||
|
||||
@echo
|
||||
def default_network_rules_systemvm(session, args):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user