pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/pppd Still allow pervious behaviour to detect kern...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9036fe8a544b
branches:  trunk
changeset: 486766:9036fe8a544b
user:      cube <cube%pkgsrc.org@localhost>
date:      Sun Jan 02 22:28:31 2005 +0000

description:
Still allow pervious behaviour to detect kernel PPP support.

diffstat:

 net/pppd/distinfo         |   4 ++--
 net/pppd/patches/patch-az |  24 ++++++++++++++++++------
 2 files changed, 20 insertions(+), 8 deletions(-)

diffs (79 lines):

diff -r 4f1e1e1d3fcb -r 9036fe8a544b net/pppd/distinfo
--- a/net/pppd/distinfo Sun Jan 02 21:59:23 2005 +0000
+++ b/net/pppd/distinfo Sun Jan 02 22:28:31 2005 +0000
@@ -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-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 -r 4f1e1e1d3fcb -r 9036fe8a544b net/pppd/patches/patch-az
--- a/net/pppd/patches/patch-az Sun Jan 02 21:59:23 2005 +0000
+++ b/net/pppd/patches/patch-az Sun Jan 02 22:28:31 2005 +0000
@@ -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 @@
 +{
 +    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 @@
 +
 +    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 @@
 +    }
 +    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 @@
 +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;
 +}
 +
 +/*



Home | Main Index | Thread Index | Old Index