View | Details | Raw Unified
Collapse All | Expand All

(-) tun.c (-7 / +21 lines)
 Lines 1226-1238    Link Here 
	    char command_line[256];
	    char command_line[256];
	    struct gc_arena gc = gc_new ();
	    struct gc_arena gc = gc_new ();
	    openvpn_snprintf (command_line, sizeof (command_line),
	    if (is_tun_p2p (tt))
			  "%s addr del dev %s local %s peer %s",
	      {
			  iproute_path,
		openvpn_snprintf (command_line, sizeof (command_line),
			  tt->actual_name,
			"%s addr del dev %s local %s peer %s",
			  print_in_addr_t (tt->local, 0, &gc),
			iproute_path,
			  print_in_addr_t (tt->remote_netmask, 0, &gc)
			tt->actual_name,
			  );
			print_in_addr_t (tt->local, 0, &gc),
			print_in_addr_t (tt->remote_netmask, 0, &gc)
			);
	      }
	    else
	      {
		openvpn_snprintf (command_line, sizeof (command_line),
			"%s addr add dev %s %s/%d broadcast %s",
			iproute_path,
			tt->actual_name,
			print_in_addr_t (tt->local, 0, &gc),
			count_netmask_bits(print_in_addr_t (tt->remote_netmask, 0, &gc)),
			print_in_addr_t (tt->broadcast, 0, &gc)
			);
	      }
	    msg (M_INFO, "%s", command_line);
	    msg (M_INFO, "%s", command_line);
	    system_check (command_line, NULL, S_FATAL, "Linux ip addr del failed");
	    system_check (command_line, NULL, S_FATAL, "Linux ip addr del failed");