python/gst-python: update to 1.24.11
[oi-userland.git] / components / network / vpnc / patches / 02-sysdep.c.patch
blob3057755477bc3ffea5cc0a9104189897b7d06bc1
1 diff --git a/sysdep.c b/sysdep.c
2 index be10656..1f44cbd 100644
3 --- a/sysdep.c
4 +++ b/sysdep.c
5 @@ -139,7 +139,7 @@ int tun_open(char *dev, enum if_mode_enum mode)
6 logmsg(LOG_ERR, "Can't set PPA %d", ppa);
7 return -1;
9 - if ((muxid = ioctl(ip_fd, I_PLINK, if_fd)) < 0) {
10 + if ((muxid = ioctl(ip_fd, I_LINK, if_fd)) < 0) {
11 logmsg(LOG_ERR, "Can't link TUN device to IP");
12 return -1;
14 @@ -152,7 +152,7 @@ int tun_open(char *dev, enum if_mode_enum mode)
15 ifr.ifr_ip_muxid = muxid;
17 if (ioctl(ip_fd, SIOCSIFMUXID, &ifr) < 0) {
18 - ioctl(ip_fd, I_PUNLINK, muxid);
19 + ioctl(ip_fd, I_UNLINK, muxid);
20 logmsg(LOG_ERR, "Can't set multiplexor id");
21 return -1;
23 @@ -497,7 +497,7 @@ int tun_close(int fd, char *dev)
24 return 0;
27 - if (ioctl(ip_fd, I_PUNLINK, muxid) < 0) {
28 + if (ioctl(ip_fd, I_UNLINK, muxid) < 0) {
29 logmsg(LOG_ERR, "Can't unlink interface");
30 return 0;
32 diff --git a/sysdep.c b/sysdep.c
33 index 1f44cbd..493a73a 100644
34 --- a/sysdep.c
35 +++ b/sysdep.c
36 @@ -110,37 +110,37 @@ int tun_open(char *dev, enum if_mode_enum mode)
39 if ((ip_fd = open("/dev/ip", O_RDWR, 0)) < 0) {
40 - logmsg(LOG_ERR, "Can't open /dev/ip");
41 + syslog(LOG_ERR, "Can't open /dev/ip");
42 return -1;
45 if ((tun_fd = open(((mode == IF_MODE_TUN) ? "/dev/tun" : "/dev/tap"), O_RDWR, 0)) < 0) {
46 - logmsg(LOG_ERR, "Can't open /dev/tun");
47 + syslog(LOG_ERR, "Can't open /dev/tun");
48 return -1;
51 /* Assign a new PPA and get its unit number. */
52 if ((ppa = ioctl(tun_fd, TUNNEWPPA, ppa)) < 0) {
53 - logmsg(LOG_ERR, "Can't assign new interface");
54 + syslog(LOG_ERR, "Can't assign new interface");
55 return -1;
58 if ((if_fd = open(((mode == IF_MODE_TUN) ? "/dev/tun" : "/dev/tap"), O_RDWR, 0)) < 0) {
59 - logmsg(LOG_ERR, "Can't open /dev/tun (2)");
60 + syslog(LOG_ERR, "Can't open /dev/tun (2)");
61 return -1;
63 if (ioctl(if_fd, I_PUSH, "ip") < 0) {
64 - logmsg(LOG_ERR, "Can't push IP module");
65 + syslog(LOG_ERR, "Can't push IP module");
66 return -1;
69 /* Assign ppa according to the unit number returned by tun device */
70 if (ioctl(if_fd, IF_UNITSEL, (char *)&ppa) < 0 && errno != EEXIST) {
71 - logmsg(LOG_ERR, "Can't set PPA %d", ppa);
72 + syslog(LOG_ERR, "Can't set PPA %d", ppa);
73 return -1;
75 if ((muxid = ioctl(ip_fd, I_LINK, if_fd)) < 0) {
76 - logmsg(LOG_ERR, "Can't link TUN device to IP");
77 + syslog(LOG_ERR, "Can't link TUN device to IP");
78 return -1;
80 close(if_fd);
81 @@ -153,7 +153,7 @@ int tun_open(char *dev, enum if_mode_enum mode)
83 if (ioctl(ip_fd, SIOCSIFMUXID, &ifr) < 0) {
84 ioctl(ip_fd, I_UNLINK, muxid);
85 - logmsg(LOG_ERR, "Can't set multiplexor id");
86 + syslog(LOG_ERR, "Can't set multiplexor id");
87 return -1;
90 @@ -493,12 +493,12 @@ int tun_close(int fd, char *dev)
91 memset(&ifr, 0, sizeof(ifr));
92 strcpy(ifr.ifr_name, dev);
93 if (ioctl(ip_fd, SIOCGIFFLAGS, &ifr) < 0) {
94 - logmsg(LOG_ERR, "Can't get iface flags");
95 + syslog(LOG_ERR, "Can't get iface flags");
96 return 0;
99 if (ioctl(ip_fd, I_UNLINK, muxid) < 0) {
100 - logmsg(LOG_ERR, "Can't unlink interface");
101 + syslog(LOG_ERR, "Can't unlink interface");
102 return 0;