Ticket #369: openvpn-ipv6-env.patch

File openvpn-ipv6-env.patch, 1.4 KB (added by kcodyjr, 10 years ago)
  • src/openvpn/multi.c

    diff -ruN openvpn-2.3.2-orig/src/openvpn/multi.c openvpn-2.3.2/src/openvpn/multi.c
    old new  
    13961396static void
    13971397multi_set_virtual_addr_env (struct multi_context *m, struct multi_instance *mi)
    13981398{
     1399  struct gc_arena gc = gc_new ();
     1400
     1401  setenv_del (mi->context.c2.es, "ifconfig_ipv6_pool_local_ip");
     1402  setenv_del (mi->context.c2.es, "ifconfig_ipv6_pool_remote_ip");
    13991403  setenv_del (mi->context.c2.es, "ifconfig_pool_local_ip");
    14001404  setenv_del (mi->context.c2.es, "ifconfig_pool_remote_ip");
    14011405  setenv_del (mi->context.c2.es, "ifconfig_pool_netmask");
     
    14101414                        mi->context.c2.push_ifconfig_local,
    14111415                        SA_SET_IF_NONZERO);
    14121416
     1417      setenv_str       (mi->context.c2.es,
     1418                        "ifconfig_ipv6_pool_remote_ip",
     1419                        print_in6_addr( mi->context.c2.push_ifconfig_ipv6_local, 0, &gc ));
     1420
    14131421      if (tunnel_type == DEV_TYPE_TAP || (tunnel_type == DEV_TYPE_TUN && tunnel_topology == TOP_SUBNET))
    14141422        {
    14151423          setenv_in_addr_t (mi->context.c2.es,
     
    14231431                            "ifconfig_pool_local_ip",
    14241432                            mi->context.c2.push_ifconfig_remote_netmask,
    14251433                            SA_SET_IF_NONZERO);
     1434          setenv_str       (mi->context.c2.es,
     1435                            "ifconfig_ipv6_pool_local_ip",
     1436                            print_in6_addr( mi->context.c2.push_ifconfig_ipv6_remote, 0, &gc ));
    14261437        }
    14271438    }
    14281439