Re: "fix" ld -Z on powerpc

2015-08-17 Thread Miod Vallat
> I spent some time today figuting out why the binutils update broke ld > -Z on powerpc. Turns out to be a fairly thorny issue. > > The new binutils discard empty setions. As a result the .gotpad0 and > .gotpad1 sections have disappeared. And a s a consequence the > __got_start and __got_end sy

patch fixes IPv6 reassembly when packet hits PBR rule

2015-08-17 Thread Alexandr Nedvedicky
Hello, I'm sending finalized patch. The final shape has been discussed with bluhm@, who was kind enough to do thorough testing on OpenBSD. The patch solves the problem for deployment as follows: Client <-- MTU_1 --> PF <-- MTU_1 --> Router <-- MTU_2 --> Server MTU_2 = MTU_1/2 PF

Re: "fix" ld -Z on powerpc

2015-08-17 Thread Mark Kettenis
> Date: Wed, 12 Aug 2015 15:48:57 +0200 (CEST) > From: Mark Kettenis > > I spent some time today figuting out why the binutils update broke ld > -Z on powerpc. Turns out to be a fairly thorny issue. > > The new binutils discard empty setions. As a result the .gotpad0 and > .gotpad1 sections ha

netcat non blocking socket

2015-08-17 Thread Alexander Bluhm
Hi, When running my pf regression tests, I triggered netcat hanging in write(2). This is bit strange as poll(2) should check that the socket is writeable. However making the network socket non-blocking keeps the data flowing. Note that the code to handle EAGAIN is already there. To trigger the

Partially unlock the em(4) interrupt handler

2015-08-17 Thread Mark Kettenis
The diff below is a first step towards running the em(4) interrupt handler without grabbing the kernel lock. It runs the rx completion path without the lock, which is the important bit to be able to test the work that has been going on to make the network stack run on multiple CPUs. But the handl

Re: http(1) An alternate implementation for a subset of ftp(1)

2015-08-17 Thread Sebastien Marie
Hi, I attached 3 patchs: - retry.patch: move name of output file outside the retry loop. Should keep the filename defined by user, instead of pike one from server. - spell.patch: correct a small spelling error - url-user.patch: a small change in url_parse() in order to copte with @ ch

Re: http(1) An alternate implementation for a subset of ftp(1)

2015-08-17 Thread Sunil Nimmagadda
On Mon, Aug 17, 2015 at 06:06:17PM +0200, Sebastien Marie wrote: > Hi, > > I start reading your code, and I have a first remark. > > I see in main.c (at line 142 and next) that on redirection, you trust > the server for the filename. I am not sure it is a good thing to do. > > If the user reques

Re: rtfree(9) and nd6_prefix_{on,off}link

2015-08-17 Thread Alexander Bluhm
On Mon, Aug 17, 2015 at 07:03:55PM +0200, Martin Pieuchot wrote: > On 17/08/15(Mon) 18:25, Alexander Bluhm wrote: > > On Mon, Aug 17, 2015 at 12:34:13PM +0200, Martin Pieuchot wrote: > > > Ultimately my goal is to use rt_ifa_{add,del}() instead of > > > nd6_prefix_{on,off}link() but right now I nee

Re: rtfree(9) and nd6_prefix_{on,off}link

2015-08-17 Thread Martin Pieuchot
On 17/08/15(Mon) 18:25, Alexander Bluhm wrote: > On Mon, Aug 17, 2015 at 12:34:13PM +0200, Martin Pieuchot wrote: > > Ultimately my goal is to use rt_ifa_{add,del}() instead of > > nd6_prefix_{on,off}link() but right now I need to remove the > > rt->ref_cnt--. > > > @@ -1861,26 +1856,11 @@ nd6_pre

Re: rtfree(9) and nd6_prefix_{on,off}link

2015-08-17 Thread Alexander Bluhm
On Mon, Aug 17, 2015 at 12:34:13PM +0200, Martin Pieuchot wrote: > Ultimately my goal is to use rt_ifa_{add,del}() instead of > nd6_prefix_{on,off}link() but right now I need to remove the > rt->ref_cnt--. > @@ -1861,26 +1856,11 @@ nd6_prefix_onlink(struct nd_prefix *pr) > info.rti_info[RTAX

Fwd: worm.c removing unused variables

2015-08-17 Thread Vinicios Barros
Hello all, I would like to suggest these changes to remove unused variables and a respectively unnecessary call of the gettimeofday, also removes a casting in the malloc, that seems to be unnecessary. Index: worm.c === RCS file: /cv

Re: http(1) An alternate implementation for a subset of ftp(1)

2015-08-17 Thread Sebastien Marie
Hi, I start reading your code, and I have a first remark. I see in main.c (at line 142 and next) that on redirection, you trust the server for the filename. I am not sure it is a good thing to do. If the user request 'http://www.example.com/a_filename' (without -o), the file created should be 'a

Re: Return a rtentry* in arplookup()

2015-08-17 Thread Alexander Bluhm
On Mon, Aug 17, 2015 at 12:31:20PM +0200, Martin Pieuchot wrote: > This brings arplookup() in sync with nd6_lookup() and is necessary for > upcoming "struct rtentry" reference count. > @@ -633,9 +633,10 @@ in_arpinput(struct mbuf *m) > itaddr = myaddr; > goto reply; >

Re: [PATCH] Fixes to sed(1) line buffering

2015-08-17 Thread Troels Henriksen
Actually, ignore this, it seems to have been fixed (by accident?) by the recent implementation of the -i flag in CURRENT. -- \ Troels /\ Henriksen

Re: rtfree(9) conversion in rt_getifa()

2015-08-17 Thread Alexander Bluhm
On Mon, Aug 17, 2015 at 12:29:46PM +0200, Martin Pieuchot wrote: > Here a route lookup is done to find an existing ``ifa'' in order to > attach a new route. > > This code runs under KERNEL_LOCK and returns a route entry found in > the table (RT_VALID), so rtfree(9) will not free the route. > > No

[PATCH] Fixes to sed(1) line buffering

2015-08-17 Thread Troels Henriksen
The current sed(1) will not process a given line until it has read a character of the following line (to detect EOF conditions). This means that the following command (echo foo; sleep 2; echo bar; sleep 2; echo baz; sleep 2; echo quux) | sed Will wait two seconds before printing anything, and

Re: Don't be verbose in in6_update_ifa()

2015-08-17 Thread Alexander Bluhm
On Mon, Aug 17, 2015 at 01:06:32PM +0200, Martin Pieuchot wrote: > On 11/08/15(Tue) 16:25, Alexander Bluhm wrote: > > On Mon, Aug 10, 2015 at 10:43:46PM +0200, Martin Pieuchot wrote: > > > In general these messages do not help. Here we have two cases of > > > messages, either logged at LOG_INFO or

Re: [Patch] pf refactoring

2015-08-17 Thread Martin Pieuchot
On 17/08/15(Mon) 13:38, Alexey Suslikov wrote: > Martin Pieuchot openbsd.org> writes: > > > On 17/08/15(Mon) 17:39, Richard Procter wrote: > > > Hi, > > > > > > This series of 29 small diffs slims pf.o by 2640 bytes and pf.c by > > > 113 non-comment lines. > > > > We generally discuss one diff

http(1) An alternate implementation for a subset of ftp(1)

2015-08-17 Thread Sunil Nimmagadda
Hi, http(1) is a drop-in substitute for ftp(1)'s "AUTO-FETCHING FILES" mode. It defaults to HTTP method when the url doesn't specify the protocol and supports transferring files from HTTP(S) and FTP servers. The FTP support is limited to file transfer and doesn't do command interpretation. It wor

Re: [Patch] pf refactoring

2015-08-17 Thread Alexey Suslikov
Martin Pieuchot openbsd.org> writes: > On 17/08/15(Mon) 17:39, Richard Procter wrote: > > Hi, > > > > This series of 29 small diffs slims pf.o by 2640 bytes and pf.c by > > 113 non-comment lines. > > We generally discuss one diff per mail. It makes it easier for people > to comment and as you

[patch] armv7/omap/ommmc.c: add ommmc_dump_regs

2015-08-17 Thread kremlin
armv7 kernel will fail to compile with -DSDHC_DEBUG as it lacks a definition for ommc_dump_regs, so add it. I previously mailed this patch a while ago[1], but my mail client fudged tabs/whitespace, here is a working patch. Ian [1] http://marc.info/?l=openbsd-tech&m=143580188423401&w=2 Index: om

Re: Don't be verbose in in6_update_ifa()

2015-08-17 Thread Martin Pieuchot
On 11/08/15(Tue) 16:25, Alexander Bluhm wrote: > On Mon, Aug 10, 2015 at 10:43:46PM +0200, Martin Pieuchot wrote: > > In general these messages do not help. Here we have two cases of > > messages, either logged at LOG_INFO or LOG_ERR. > > Yes, multiple logs for the same error are bad. But there

Re: [Patch] pf refactoring

2015-08-17 Thread Martin Pieuchot
Hello Richard, On 17/08/15(Mon) 17:39, Richard Procter wrote: > Hi, > > This series of 29 small diffs slims pf.o by 2640 bytes and pf.c by > 113 non-comment lines. We generally discuss one diff per mail. It makes it easier for people to comment and as you can imagine deal with possible conflic

rtfree(9) and nd6_prefix_{on,off}link

2015-08-17 Thread Martin Pieuchot
Ultimately my goal is to use rt_ifa_{add,del}() instead of nd6_prefix_{on,off}link() but right now I need to remove the rt->ref_cnt--. This diff does that and reduce the differences between these functions. Note that nd6_prefix_onlink()'s error are always logged so I doubt we need two messages.

Return a rtentry* in arplookup()

2015-08-17 Thread Martin Pieuchot
This brings arplookup() in sync with nd6_lookup() and is necessary for upcoming "struct rtentry" reference count. Ok? Index: netinet/if_ether.c === RCS file: /cvs/src/sys/netinet/if_ether.c,v retrieving revision 1.160 diff -u -p -r1.

rtfree(9) conversion in rt_getifa()

2015-08-17 Thread Martin Pieuchot
Here a route lookup is done to find an existing ``ifa'' in order to attach a new route. This code runs under KERNEL_LOCK and returns a route entry found in the table (RT_VALID), so rtfree(9) will not free the route. Note that it is safe to rtfree() a route entry while keeping a pointer to a *vali