~ubuntu-branches/ubuntu/quantal/openvpn/quantal-proposed

« back to all changes in this revision

Viewing changes to .pc/ipv6-payload.patch/tun.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-31 04:55:56 UTC
  • mfrom: (1.1.18) (10.2.16 sid)
  • Revision ID: package-import@ubuntu.com-20111231045556-3fwmrbggevr9iqxd
Tags: 2.2.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
 + debian/openvpn.init.d:
    - Do not use start-stop-daemon and </dev/null to avoid blocking boot.
    - Show per-VPN result messages.
    - Add "--script-security 2" by default for backwards compatabliity.
  + debian/control: Add lsb-base >= 3.2-14 to allow status_of_proc()
  + debian/update-resolv-conf: Support multiple domains.
  + fix bug where '--script-security 2' would be passed for all
    daemons after the first. (LP: #794916)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1127
1127
      if ((tt->fd = open (node, O_RDWR)) < 0)
1128
1128
        {
1129
1129
          msg (M_WARN | M_ERRNO, "Note: Cannot open TUN/TAP dev %s", node);
1130
 
          goto linux_2_2_fallback;
 
1130
          return;
1131
1131
        }
1132
1132
 
1133
1133
      /*
1171
1171
      if (ioctl (tt->fd, TUNSETIFF, (void *) &ifr) < 0)
1172
1172
        {
1173
1173
          msg (M_WARN | M_ERRNO, "Note: Cannot ioctl TUNSETIFF %s", dev);
1174
 
          goto linux_2_2_fallback;
 
1174
          return;
1175
1175
        }
1176
1176
 
1177
1177
      msg (M_INFO, "TUN/TAP device %s opened", ifr.ifr_name);
1207
1207
      tt->actual_name = string_alloc (ifr.ifr_name, NULL);
1208
1208
    }
1209
1209
  return;
1210
 
 
1211
 
 linux_2_2_fallback:
1212
 
  msg (M_INFO, "Note: Attempting fallback to kernel 2.2 TUN/TAP interface");
1213
 
  if (tt->fd >= 0)
1214
 
    {
1215
 
      close (tt->fd);
1216
 
      tt->fd = -1;
1217
 
    }
1218
 
  open_tun_generic (dev, dev_type, dev_node, ipv6, false, true, tt);
1219
1210
}
1220
1211
 
1221
1212
#else