Re: mg dired diff to reduce annoyance

2011-07-30 Thread Kenneth R Westerback
On Sat, Jul 30, 2011 at 04:30:42PM -0400, Loganaden Velvindron wrote:
> I'll wait for kjell@ to have some time
> to review this diff.
> 
> No big deal really :-D
> 

You might wait a long time. Kjell has transitioned to the real world
and now works for a living. :-)

 Ken



Re: recent change of nat-to behavior

2011-07-30 Thread Peter N. M. Hansteen
Ryan McBride  writes:

> Please try a newer snapshot, this bug was fixed in the following commit:

Trying a newer snapshot is exactly what I plan to do, no worries

- P
-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: recent change of nat-to behavior

2011-07-30 Thread Ryan McBride
Please try a newer snapshot, this bug was fixed in the following commit:


CVSROOT:/cvs
Module name:src
Changes by: mcbr...@cvs.openbsd.org 2011/07/29 04:48:35

Modified files:
sys/net: pf_lb.c 

Log message:
Make sure we use the right tbl/dyn pointer to check the pfrkt_refcntcost;
improved debugging for error cases inside the weighted round-robin loop.

original diff from claudio, ok henning




On Sat, Jul 30, 2011 at 05:17:44PM +0200, Peter N. M. Hansteen wrote:
> I finally got around to upgrading my home gateway from 4.9-current
> (late snapshot) to 5.0-beta (jul 27 snapshot), and I stumbled across
> what appears to be a subtle but significant change in nat-to behavior.
> 
> my $ext_if is
> 
> xl0: flags=8843 mtu 1500
> lladdr 00:50:da:21:cb:c9
> priority: 0
> groups: egress
> media: Ethernet autoselect (100baseTX full-duplex)
> status: active
> inet 213.187.179.198 netmask 0xfffc broadcast 213.187.179.199
> inet6 fe80::250:daff:fe21:cbc9%xl0 prefixlen 64 scopeid 0x3
> inet6 2001:16d8:ccbc:dead:beef::1 prefixlen 64
> 
> and the nat-to line was
> 
> match out log on $ext_if inet nat-to ($ext_if)
> 
> AFter upgrading, this was loaded as 
> 
> match out log on $ext_if inet nat-to $ext_addr round-robin
> 
> - meaning that return traffic wasn't necessarily seen.
> 
> Changing the rule to 
> 
> match out log on $ext_if inet nat-to $ext_addr
> 
> restored the config to a working state.
> 
> Does this count as a buglet (or something that should be documented, at
> least)?
> 
> - P
> 
> -- 
> Peter N. M. Hansteen, member of the first RFC 1149 implementation team
> http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
> "Remember to set the evil bit on all malicious network traffic"
> delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.
> 

-- 



Re: invalid link in ath(4) manpage

2011-07-30 Thread Jason McIntyre
On Sat, Jul 30, 2011 at 09:14:44PM +0159, Han Boetes wrote:
> Jason McIntyre wrote:
> > fixed, and an identical link in uath(4) removed too.
> 
> Might I suggest pulling all sourcefiles through a linkchecker?
> 
> 
> # Han
> 

you can do this if you want. in the meantime, i think we should try to
avoid using urls in man pages. if there is a named doc, then name it,
sure. but links just go out of date. if you run them through a checker,
it only tests now, not the future.

(let me know if you find any dead!)

jmc



Re: invalid link in ath(4) manpage

2011-07-30 Thread Han Boetes
Jason McIntyre wrote:
> fixed, and an identical link in uath(4) removed too.

Might I suggest pulling all sourcefiles through a linkchecker?


# Han



Re: mg dired diff to reduce annoyance

2011-07-30 Thread Loganaden Velvindron
I'll wait for kjell@ to have some time
to review this diff.

No big deal really :-D



Re: invalid link in ath(4) manpage

2011-07-30 Thread Jason McIntyre
On Sat, Jul 30, 2011 at 09:07:23AM -0700, James Hartley wrote:
> The following diff removes a link no longer made available by Qualcomm
> Atheros.  A similar link was removed from the athn(4) manpage back in
> January:
> 
> http://www.openbsd.org/cgi-bin/cvsweb/src/share/man/man4/athn.4.diff?r1=1.13;r2=1.14;f=h
> 
> Thanks.
> 

fixed, and an identical link in uath(4) removed too.
jmc

> Index: ath.4
> ===
> RCS file: /cvs/src/share/man/man4/ath.4,v
> retrieving revision 1.51
> diff -u -p ath.4
> --- ath.4   1 Nov 2010 17:59:09 -   1.51
> +++ ath.4   30 Jul 2011 15:53:27 -
> @@ -197,8 +197,6 @@ driver:
>  .It Wistron CM9AR5212  Mini PCIa/b/g
>  .El
>  .Pp
> -An up to date list can be found at
> -.Pa http://customerproducts.atheros.com/customerproducts/default.asp .
>  .Sh EXAMPLES
>  The following
>  .Xr hostname.if 5



ksh: dead assignments found by LLVM analyzer

2011-07-30 Thread Alexander Polakov
Title says it all. It found some other "bugs", but they're harder to
verify (and some of them don't look right at first look).

diff --git a/c_ksh.c b/c_ksh.c
index e653975..1cdf150 100644
--- a/c_ksh.c
+++ b/c_ksh.c
@@ -534,7 +534,7 @@ c_command(char **wp)
 int
 c_typeset(char **wp)
 {
-   struct block *l = e->loc;
+   struct block *l;
struct tbl *vp, **p;
Tflag fset = 0, fclr = 0;
int thing = 0, func = 0, local = 0;
diff --git a/emacs.c b/emacs.c
index 3b2d083..17145d5 100644
--- a/emacs.c
+++ b/emacs.c
@@ -1021,7 +1021,6 @@ x_redraw(int limit)
x_displen = xx_cols - 2;
}
xlp_valid = false;
-   cp = x_lastcp();
x_zots(xbp);
if (xbp != xbuf || xep > xlp)
limit = xx_cols;
diff --git a/eval.c b/eval.c
index 1918751..303a953 100644
--- a/eval.c
+++ b/eval.c
@@ -709,17 +709,14 @@ varsub(Expand *xp, char *sp, char *word,
/* Check for size of array */
if ((p=strchr(sp,'[')) && (p[1]=='*'||p[1]=='@') && p[2]==']') {
int n = 0;
-   int max = 0;
 
vp = global(arrayname(sp));
if (vp->flag & (ISSET|ARRAY))
zero_ok = 1;
for (; vp; vp = vp->u.array)
-   if (vp->flag & ISSET) {
-   max = vp->index + 1;
+   if (vp->flag & ISSET)
n++;
-   }
-   c = n; /* ksh88/ksh93 go for number, not max index */
+   c = n;
} else if (c == '*' || c == '@')
c = e->loc->argc;
else {
diff --git a/io.c b/io.c
index ea2925c..0fb2f41 100644
--- a/io.c
+++ b/io.c
@@ -295,7 +295,7 @@ check_fd(char *name, int mode, const char **emsgp)
 
if (isdigit(name[0]) && !name[1]) {
fd = name[0] - '0';
-   if ((fl = fcntl(fd = name[0] - '0', F_GETFL, 0)) < 0) {
+   if ((fl = fcntl(fd, F_GETFL, 0)) < 0) {
if (emsgp)
*emsgp = "bad file descriptor";
return -1;
diff --git a/var.c b/var.c
index 77d3969..d3a0554 100644
--- a/var.c
+++ b/var.c
@@ -830,7 +830,7 @@ is_wdvarassign(const char *s)
 char **
 makenv(void)
 {
-   struct block *l = e->loc;
+   struct block *l;
XPtrV env;
struct tbl *vp, **vpp;
int i;

-- 
Alexander Polakov | plhk.ru



Re: recent change of nat-to behavior

2011-07-30 Thread Peter N. M. Hansteen
Not the most precise description I see - 

pe...@bsdly.net (Peter N. M. Hansteen) writes:

> match out log on $ext_if inet nat-to ($ext_if)
>
> AFter upgrading, this was loaded as 
>
> match out log on $ext_if inet nat-to $ext_addr round-robin

Actually 

match out log on $ext_if inet nat-to $ext_if round-robin

was the result, but this part is accurate:

> - meaning that return traffic wasn't necessarily seen.
>
> Changing the rule to 
>
> match out log on $ext_if inet nat-to $ext_addr

where $ext_addr is defined as the IPv4 address,

> restored the config to a working state.

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



invalid link in ath(4) manpage

2011-07-30 Thread James Hartley
The following diff removes a link no longer made available by Qualcomm
Atheros.  A similar link was removed from the athn(4) manpage back in
January:

http://www.openbsd.org/cgi-bin/cvsweb/src/share/man/man4/athn.4.diff?r1=1.13;r2=1.14;f=h

Thanks.

Index: ath.4
===
RCS file: /cvs/src/share/man/man4/ath.4,v
retrieving revision 1.51
diff -u -p ath.4
--- ath.4   1 Nov 2010 17:59:09 -   1.51
+++ ath.4   30 Jul 2011 15:53:27 -
@@ -197,8 +197,6 @@ driver:
 .It Wistron CM9AR5212  Mini PCIa/b/g
 .El
 .Pp
-An up to date list can be found at
-.Pa http://customerproducts.atheros.com/customerproducts/default.asp .
 .Sh EXAMPLES
 The following
 .Xr hostname.if 5



fix man buffercache.9

2011-07-30 Thread Alexandr Shadchin
Hi,

cred argument was removed from bread() and breadn()
(http://marc.info/?l=openbsd-cvs&m=130975394527345&w=2)

Is this patch correct ? OK ?

-- 
Alexandr Shadchin

Index: buffercache.9
===
RCS file: /cvs/src/share/man/man9/buffercache.9,v
retrieving revision 1.7
diff -u -p -r1.7 buffercache.9
--- buffercache.9   24 Jul 2008 14:19:24 -  1.7
+++ buffercache.9   30 Jul 2011 15:06:18 -
@@ -125,11 +125,11 @@
 .In sys/buf.h
 .Ft int
 .Fn bread "struct vnode *vp" "daddr64_t blkno" "int size" \
-"struct ucred *cred" "struct buf **bpp"
+"struct buf **bpp"
 .Ft int
 .Fn breadn "struct vnode *vp" "daddr64_t blkno" "int size" \
 "daddr64_t rablks[]" "int rasizes[]" "int nrablks" \
-"struct ucred *cred" "struct buf **bpp"
+"struct buf **bpp"
 .Ft int
 .Fn bwrite "struct buf *bp"
 .Ft void
@@ -171,7 +171,7 @@ the disk driver interface.
 .\" 
 .Sh FUNCTIONS
 .Bl -tag -width compact
-.It Fn bread "vp" "blkno" "size" "cred" "bpp"
+.It Fn bread "vp" "blkno" "size" "bpp"
 Read a block corresponding to
 .Fa vp
 and
@@ -210,7 +210,6 @@ Otherwise, it should be unbusied using
 .Fa "rablks"
 .Fa "rasizes"
 .Fa "nrablks"
-.Fa "cred"
 .Fa "bpp"
 .Fc
 .Xc
@@ -370,9 +369,3 @@ The buffer cache subsystem is implemente
 .%I Addison Wesley
 .%D 1989
 .Re
-.\" 
-.Sh BUGS
-In the current implementation,
-.Fn bread
-and its variants
-don't use a specified credential.



recent change of nat-to behavior

2011-07-30 Thread Peter N. M. Hansteen
I finally got around to upgrading my home gateway from 4.9-current
(late snapshot) to 5.0-beta (jul 27 snapshot), and I stumbled across
what appears to be a subtle but significant change in nat-to behavior.

my $ext_if is

xl0: flags=8843 mtu 1500
lladdr 00:50:da:21:cb:c9
priority: 0
groups: egress
media: Ethernet autoselect (100baseTX full-duplex)
status: active
inet 213.187.179.198 netmask 0xfffc broadcast 213.187.179.199
inet6 fe80::250:daff:fe21:cbc9%xl0 prefixlen 64 scopeid 0x3
inet6 2001:16d8:ccbc:dead:beef::1 prefixlen 64

and the nat-to line was

match out log on $ext_if inet nat-to ($ext_if)

AFter upgrading, this was loaded as 

match out log on $ext_if inet nat-to $ext_addr round-robin

- meaning that return traffic wasn't necessarily seen.

Changing the rule to 

match out log on $ext_if inet nat-to $ext_addr

restored the config to a working state.

Does this count as a buglet (or something that should be documented, at
least)?

- P

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.