WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] vif-common.sh, antispoof and multiple ips w/ ip=

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-users] vif-common.sh, antispoof and multiple ips w/ ip=
From: Adrian Chadd <adrian@xxxxxxxxxxxxxxx>
Date: Mon, 20 Nov 2006 13:58:03 +0800
Delivery-date: Sun, 19 Nov 2006 21:53:04 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
hiya,

I'm running Xen w/ bridges and antispoof. I found this in vif-common.sh:

  if [ "$ip" != "" ]
  then
      local addr
      for addr in "$ip"
      do
        frob_iptable -s "$addr"
      done

      # Always allow the domain to talk to a DHCP server.
      frob_iptable -p udp --sport 68 --dport 67
  else
      # No IP addresses have been specified, so allow anything.
      frob_iptable
  fi

This works fine for one IP in the vif config but I can't figure out how to coax
it into >1 IP like the for addr loop suggests. It always treats "$ip" as one
entry and passes $addr as the whole IP string, not each IP.

Here's an example:

vif = [ 'bridge=xenbr0,ip=a.b.c.25 a.b.c.26 a.b.c.27 a.b.c.28' ]

If I remove the ""'s around $ip then addr is passed individual IPs from that 
list
and iptables is setup appropriately.

Is this the correct solution?

Thanks,



Adrian



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] vif-common.sh, antispoof and multiple ips w/ ip=, Adrian Chadd <=