From: Steven Haigh Subject: Re: bridge call iptables being forced Date: Fri, 20 Nov 2015 11:59:48 +1100 Message-ID: References: <564D2A11.7080606@rimuhosting.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <564D2A11.7080606@rimuhosting.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: juan@rimuhosting.com Cc: RimuHosting , Xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 2015-11-19 12:46, Juan Rossi wrote: > Hi > > I am sending this due the change of behaviour in some parts, and > perhaps it needs some code amendments, unsure if the devel list is the > best place, fell free to point me to the right place for this. Let me > know if I should load a bug instead. I'm tracking this at: http://xen.crc.id.au/bugs/view.php?id=62 > diff --git a/tools/hotplug/Linux/vif-bridge > b/tools/hotplug/Linux/vif-bridge > index 3d72ca4..7fc6650 100644 > --- a/tools/hotplug/Linux/vif-bridge > +++ b/tools/hotplug/Linux/vif-bridge > @@ -93,7 +93,16 @@ case "$command" in > ;; > esac > > -handle_iptable > +brcalliptables=$(sysctl -n net.bridge.bridge-nf-call-iptables > 2>/dev/null) > +brcalliptables=${brcalliptables:-0} > + > +brcallip6tables=$(sysctl -n net.bridge.bridge-nf-call-ip6tables > 2>/dev/null) > +brcallip6tables=${brcallip6tables:-0} > + > +if [ "$brcalliptables" -eq "1" -a "$brcallip6tables" -eq "1" ]; > +then > + handle_iptable > +fi > > call_hooks vif post I'm not a fan of this as it will also enable the call to handle_iptable() if people create their own firewall rules - ie these will be true - hence the rule will get loaded anyway. My comment on the bug report is included below to hopefully get further input from people: Thinking about this further - as it is a change in behaviour for a point release, I believe we should do the following: 1) Create a new option in /etc/xen/xl.conf - and default it to False. 2) Name an option "autocreate_firewall_files" 3) Evaluate autocreate_firewall_rules in vif-common.sh function handle_iptable() I suggest something like the following psuedo code: if [ $autocreate_firewall_rules == 0 ]; then return fi Happy to start debate on the correct way of handling this :) Hopefully this can lead to some further debate. -- Steven Haigh Email: netwiz@crc.id.au Web: https://www.crc.id.au Phone: (03) 9001 6090 - 0412 935 897