File tree Expand file tree Collapse file tree
systemvm/patches/debian/config/opt/cloud/bin Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -462,16 +462,20 @@ def process(self):
462462 if m :
463463 self .confips .append (m .group (1 ))
464464
465- for public_ip in self .dbag :
466- if public_ip == "id" :
465+ for vpn in self .dbag :
466+ if vpn == "id" :
467467 continue
468- dev = CsHelper .get_device (public_ip )
468+
469+ local_ip = self .dbag [vpn ]['local_public_ip' ]
470+ dev = CsHelper .get_device (local_ip )
471+
469472 if dev == "" :
470- logging .error ("Request for ipsec to %s not possible because ip is not configured" , public_ip )
473+ logging .error ("Request for ipsec to %s not possible because ip is not configured" , local_ip )
471474 continue
475+
472476 CsHelper .start_if_stopped ("ipsec" )
473- self .configure_iptables (dev , self .dbag [public_ip ])
474- self .configure_ipsec (self .dbag [public_ip ])
477+ self .configure_iptables (dev , self .dbag [vpn ])
478+ self .configure_ipsec (self .dbag [vpn ])
475479
476480 # Delete vpns that are no longer in the configuration
477481 for ip in self .confips :
Original file line number Diff line number Diff line change 1919
2020
2121def merge (dbag , vpn ):
22- key = vpn ['local_public_ip ' ]
22+ key = vpn ['peer_gateway_ip ' ]
2323 op = vpn ['create' ]
2424 if key in dbag .keys () and not op :
2525 del (dbag [key ])
You can’t perform that action at this time.
0 commit comments