diff options
author | abs <abs@pkgsrc.org> | 2000-01-25 10:33:29 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2000-01-25 10:33:29 +0000 |
commit | 331a8020eb3130b4f71b7d722eabfa582a0e5f88 (patch) | |
tree | ab055dec5805a70f102fa97e8157f1e69a1ccd1a /net | |
parent | 9a701f3449c4c08bbc4fe9f254d03cc9bf6eaa50 (diff) | |
download | pkgsrc-331a8020eb3130b4f71b7d722eabfa582a0e5f88.tar.gz |
If the interface is down - report 'No Connection'. Patch submitted to
author.
Diffstat (limited to 'net')
-rw-r--r-- | net/pload/Makefile | 3 | ||||
-rw-r--r-- | net/pload/patches/patch-aa | 36 |
2 files changed, 38 insertions, 1 deletions
diff --git a/net/pload/Makefile b/net/pload/Makefile index cd33306c16c..8872badab26 100644 --- a/net/pload/Makefile +++ b/net/pload/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.5 1999/03/05 00:50:59 hubertf Exp $ +# $NetBSD: Makefile,v 1.6 2000/01/25 10:33:29 abs Exp $ # DISTNAME= pload-0.9.4 +PKGNAME= pload-0.9.4pl1 CATEGORIES= net x11 MASTER_SITES= http://www.engr.utk.edu/~mdsmith/pload/ diff --git a/net/pload/patches/patch-aa b/net/pload/patches/patch-aa new file mode 100644 index 00000000000..8e82a29e7fe --- /dev/null +++ b/net/pload/patches/patch-aa @@ -0,0 +1,36 @@ +$NetBSD: patch-aa,v 1.1 2000/01/25 10:33:30 abs Exp $ + +--- ioctl_stat.c Thu Mar 4 07:33:03 1999 ++++ /usr/home/abs/ioctl_stat.c Tue Jan 25 02:05:44 2000 +@@ -68,6 +68,9 @@ + + void ioctl_stat(if_data *ifd) + { ++#ifdef __NetBSD__ ++ struct ifreq ifr; ++#endif + struct ifpppstatsreq req; + + if (s < 0) getsocket(); +@@ -78,8 +81,20 @@ + #define ifr_name ifr__name + req.stats_ptr = (caddr_t) &req.stats; + #endif +- sprintf(req.ifr_name, ifd->device); + ++#ifdef __NetBSD__ ++ sprintf(ifr.ifr_name, ifd->device); ++ if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifr) < 0 || ++ !(ifr.ifr_flags&IFF_UP)) ++ { ++ /* invalid interface, or interface down */ ++ ifd->in_bytes = 0UL; ++ ifd->out_bytes = 0UL; ++ return; ++ } ++#endif ++ ++ sprintf(req.ifr_name, ifd->device); + if (ioctl(s, SIOCGPPPSTATS, &req) != 0) + { + /* non-existant device? */ |