summaryrefslogtreecommitdiff
path: root/net/pppd
diff options
context:
space:
mode:
authorcube <cube@pkgsrc.org>2005-01-02 22:28:31 +0000
committercube <cube@pkgsrc.org>2005-01-02 22:28:31 +0000
commit2e2e4ad56f4523558d2caddbae525ec9358b5a73 (patch)
tree4393a5ded2e01b8e5978288c7f843876269d134d /net/pppd
parent3b9456c0381db0b2b79efd7128a36cc9af09d2d3 (diff)
downloadpkgsrc-2e2e4ad56f4523558d2caddbae525ec9358b5a73.tar.gz
Still allow pervious behaviour to detect kernel PPP support.
Diffstat (limited to 'net/pppd')
-rw-r--r--net/pppd/distinfo4
-rw-r--r--net/pppd/patches/patch-az24
2 files changed, 20 insertions, 8 deletions
diff --git a/net/pppd/distinfo b/net/pppd/distinfo
index 8adfbfa059b..18dd42c672b 100644
--- a/net/pppd/distinfo
+++ b/net/pppd/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2005/01/02 17:26:09 cube Exp $
+$NetBSD: distinfo,v 1.3 2005/01/02 22:28:31 cube Exp $
SHA1 (ppp-2.4.3.tar.gz) = 5e2789f4dedc81943fa9f94c840cccc2407056f7
Size (ppp-2.4.3.tar.gz) = 688092 bytes
@@ -27,7 +27,7 @@ SHA1 (patch-av) = 6ae49e8f2d5d74fa437e100b27a021451feb8f28
SHA1 (patch-aw) = 7fb53f72216ffe34720b76fc122e87f4762a6696
SHA1 (patch-ax) = 3641654b6b158ad65e9dd95247836fa8c07ec66e
SHA1 (patch-ay) = 93ccd90f6efa58bfe31105526499308ed35b9522
-SHA1 (patch-az) = acd7680ccc537edf9e163d568ab0611fd762d747
+SHA1 (patch-az) = 76f29697ad08bfb6aee2bfafca4a49aa706c08fb
SHA1 (patch-ba) = 4293edb8b490fe31e07268a6d7001e1c9db8f323
SHA1 (patch-bb) = 9b17b12b45d9857eea42c2a6dc3704392c4df7c0
SHA1 (patch-bc) = d53a2226166e84fa9ea049cdbfb52c1dcd0f1ed9
diff --git a/net/pppd/patches/patch-az b/net/pppd/patches/patch-az
index 7141805c359..c01cbdd5197 100644
--- a/net/pppd/patches/patch-az
+++ b/net/pppd/patches/patch-az
@@ -1,8 +1,8 @@
-$NetBSD: patch-az,v 1.2 2005/01/02 17:26:09 cube Exp $
+$NetBSD: patch-az,v 1.3 2005/01/02 22:28:31 cube Exp $
---- pppd/sys-bsd.c.orig 2005-01-02 17:58:02.000000000 +0100
+--- pppd/sys-bsd.c.orig 2005-01-02 23:24:27.000000000 +0100
+++ pppd/sys-bsd.c
-@@ -0,0 +1,2172 @@
+@@ -0,0 +1,2184 @@
+/* NetBSD: sys-bsd.c,v 1.50 2004/12/05 04:16:22 christos Exp */
+
+/*
@@ -298,7 +298,7 @@ $NetBSD: patch-az,v 1.2 2005/01/02 17:26:09 cube Exp $
+{
+ struct if_clonereq ifcr;
+ char *cp, *buf;
-+ int idx, s;
++ int idx, s, ok;
+ extern char *no_ppp_msg;
+
+ (void)memset(&ifcr, 0, sizeof(ifcr));
@@ -318,7 +318,6 @@ $NetBSD: patch-az,v 1.2 2005/01/02 17:26:09 cube Exp $
+
+ if (ioctl(s, SIOCIFGCLONERS, &ifcr) == -1)
+ fatal("ioctl(get cloners): %m");
-+ (void)close(s);
+
+ /*
+ * In case some disappeared in the mean time, clamp it down.
@@ -332,6 +331,19 @@ $NetBSD: patch-az,v 1.2 2005/01/02 17:26:09 cube Exp $
+ }
+ free(buf);
+
++ if (idx == ifcr.ifcr_count) {
++ /*
++ * Try ppp0 directly, as before ppp was clonable.
++ */
++ struct ifreq ifr;
++ (void)memset(&ifr, 0, sizeof(ifr));
++ strlcpy(ifr.ifr_name, "ppp0", sizeof (ifr.ifr_name));
++ ok = ioctl(s, SIOCGIFFLAGS, (caddr_t) &ifr) != -1;
++ } else
++ ok = 1;
++
++ (void)close(s);
++
+#ifdef __NetBSD__
+ no_ppp_msg = "\
+This system lacks kernel support for PPP. To include PPP support\n\
@@ -342,7 +354,7 @@ $NetBSD: patch-az,v 1.2 2005/01/02 17:26:09 cube Exp $
+in the kernel, please follow the steps detailed in the README.bsd\n\
+file in the ppp-2.2 distribution.\n";
+#endif
-+ return idx != ifcr.ifcr_count;
++ return ok;
+}
+
+/*