PERFORCE change 123260 for review
Matus Harvan
mharvan at FreeBSD.org
Tue Jul 10 09:40:49 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=123260
Change 123260 by mharvan at mharvan_twoflower on 2007/07/10 09:39:53
use #ifdef to run the proper ifconfig commands on FreeBSD and Linux
Affected files ...
.. //depot/projects/soc2007/mharvan-mtund/mtund.src/tunneld.c#7 edit
Differences ...
==== //depot/projects/soc2007/mharvan-mtund/mtund.src/tunneld.c#7 (text+ko) ====
@@ -418,13 +418,19 @@
/* setup the tun interface */
if (server) {
- system("ifconfig tun0 mtu 1400 192.168.0.1 192.168.0.2");
+ #ifdef __FreeBSD__
+ ssystem("ifconfig tun0 mtu 1400 192.168.0.1 192.168.0.2");
+ #endif
+
} else {
/* FeeBSD */
- system("ifconfig tun0 mtu 1400 192.168.0.2 192.168.0.1");
+ #ifdef __FreeBSD__
+ ssystem("ifconfig tun0 mtu 1400 192.168.0.2 192.168.0.1");
+ #else
/* Linux */
- //system("ifconfig tun0 mtu 1400 192.168.0.2");
- //system("route add 192.168.0.1 tun0");
+ ssystem("ifconfig tun0 mtu 1400 192.168.0.2");
+ ssystem("route add 192.168.0.1 tun0");
+ #endif
}
signal(SIGHUP, sigcb);
More information about the p4-projects
mailing list