summaryrefslogtreecommitdiff
path: root/net/kdenetwork3/patches/patch-ad
diff options
context:
space:
mode:
Diffstat (limited to 'net/kdenetwork3/patches/patch-ad')
-rw-r--r--net/kdenetwork3/patches/patch-ad49
1 files changed, 49 insertions, 0 deletions
diff --git a/net/kdenetwork3/patches/patch-ad b/net/kdenetwork3/patches/patch-ad
new file mode 100644
index 00000000000..2b0be0d0257
--- /dev/null
+++ b/net/kdenetwork3/patches/patch-ad
@@ -0,0 +1,49 @@
+$NetBSD: patch-ad,v 1.1.1.1 2002/05/31 13:59:28 skrll Exp $
+
+--- kppp/pppstats.cpp.orig Wed May 8 19:30:04 2002
++++ kppp/pppstats.cpp
+@@ -217,27 +217,29 @@
+
+ strcpy(ifr.ifr_name, unitName);
+
++ local_ip_address = "";
+ if (ioctl(s, SIOCGIFADDR, &ifr) < 0) {
+- }
++ kdDebug(5002) << "Cannot get ip address" << endl;
++ } else {
++ sinp = (struct sockaddr_in*)&ifr.ifr_addr;
+
+- sinp = (struct sockaddr_in*)&ifr.ifr_addr;
++ if(sinp->sin_addr.s_addr)
++ local_ip_address = inet_ntoa(sinp->sin_addr);
+
+- if(sinp->sin_addr.s_addr)
+- local_ip_address = inet_ntoa(sinp->sin_addr);
+- else
+- local_ip_address = "";
+- kdDebug(5002) << "Local IP: " << local_ip_address << endl;
++ kdDebug(5002) << "Local IP: " << local_ip_address << endl;
++ }
+
+- if (ioctl(s, SIOCGIFDSTADDR, &ifr) < 0)
+- ;
++ remote_ip_address = "";
++ if (ioctl(s, SIOCGIFDSTADDR, &ifr) < 0) {
++ kdDebug(5002) << "Cannot get remote ip address" << endl;
++ } else {
++ sinp = (struct sockaddr_in*)&ifr.ifr_dstaddr;
+
+- sinp = (struct sockaddr_in*)&ifr.ifr_dstaddr;
++ if(sinp->sin_addr.s_addr)
++ remote_ip_address = inet_ntoa(sinp->sin_addr);
+
+- if(sinp->sin_addr.s_addr)
+- remote_ip_address = inet_ntoa(sinp->sin_addr);
+- else
+- remote_ip_address = "";
+- kdDebug(5002) << "Remote IP: " << remote_ip_address << endl;
++ kdDebug(5002) << "Remote IP: " << remote_ip_address << endl;
++ }
+
+ return true;
+