pfsync defer and ipv6
there have been reports of panics with pfsync defer combined with ipv6 traffic. ive been over the pfsync code repeatedly trying to find out where it treats ipv4 and ipv6 differently without any luck. i just had a lightbulb moment literally minutes ago and came up with the code below. turns out that you SHOULD treat v4 and v6 differently in some cases... i would appreciate testing of this change. cheers, dlg Index: if_pfsync.c === RCS file: /cvs/src/sys/net/if_pfsync.c,v retrieving revision 1.160 diff -u -p -r1.160 if_pfsync.c --- if_pfsync.c 11 Jan 2011 08:33:27 - 1.160 +++ if_pfsync.c 2 Mar 2011 07:53:01 - @@ -74,7 +74,11 @@ #endif #ifdef INET6 +#include netinet/ip6.h +#include netinet/in_pcb.h +#include netinet/icmp6.h #include netinet6/nd6.h +#include netinet6/ip6_divert.h #endif /* INET6 */ #include carp.h @@ -1745,8 +1749,18 @@ pfsync_undefer(struct pfsync_deferral *p if (drop) m_freem(pd-pd_m); else { - ip_output(pd-pd_m, (void *)NULL, (void *)NULL, 0, - (void *)NULL, (void *)NULL); + switch (pd-pd_st-key[PF_SK_WIRE]-af) { +#ifdef INET + case AF_INET: + ip_output(pd-pd_m, NULL, NULL, 0, NULL, NULL); + break; +#endif /* INET */ +#ifdef INET6 +case AF_INET6: + ip6_output(pd-pd_m, NULL, NULL, 0, NULL, NULL, NULL); + break; +#endif /* INET6 */ +} } pool_put(sc-sc_pool, pd);
Re: uvm_pmemrange.c questions
On 03/02/11 00:37, Amit Kulkarni wrote: Hi, I found 2 possible null pointers by clang static analyzer and I have attached it to email later. uh-oh... [demime 1.01d removed an attachment of type application/octet-stream which had a name of uvm_pmemrange_1.diff] [demime 1.01d removed an attachment of type application/octet-stream which had a name of dmesg_uvm_pmemchange]
Re: History for bc(1)
On Tue, Feb 15, 2011 at 01:01:33PM +0100, Otto Moerbeek wrote: On Tue, Feb 15, 2011 at 12:23:41PM +0100, Gabriel Linder wrote: On 02/14/11 17:43, Christiano F. Haesbaert wrote: Any news on this ? The diff still apply on -current. If there are changes needed I can work on it, but I have no news. sorry, in have a diff in my tree, but I see myself always ignoring it. I just almost never actually use the editing capabilities. It seems my 25yr finger memory is too strong. So I'm not a proper tester for this diff, other than it does not seem to cause a regression. -Otto Lets try to make some progress here. This is the diff I have had in my tree for a while. It is a port of the freebsd code. What is lacking is the man page stuff. So if sombody could merge that from freebsd, I'd be happy. -Otto Index: Makefile === RCS file: /cvs/src/usr.bin/bc/Makefile,v retrieving revision 1.5 diff -u -p -r1.5 Makefile --- Makefile17 Oct 2010 22:54:37 - 1.5 +++ Makefile28 Oct 2010 07:22:05 - @@ -5,6 +5,9 @@ SRCS= bc.y scan.l CPPFLAGS+= -I. -I${.CURDIR} CFLAGS+= -Wall -Wno-unused YFLAGS+= +LDADD+=-ledit -lcurses +DPADD+=${LIBEDIT} ${LIBCURSES} + beforeinstall: install -c -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/bc.library \ Index: bc.y === RCS file: /cvs/src/usr.bin/bc/bc.y,v retrieving revision 1.33 diff -u -p -r1.33 bc.y --- bc.y27 Oct 2009 23:59:36 - 1.33 +++ bc.y5 Feb 2010 19:09:43 - @@ -36,6 +36,7 @@ #include ctype.h #include err.h #include errno.h +#include histedit.h #include limits.h #include search.h #include signal.h @@ -1073,6 +1074,13 @@ sigchld(int signo) } } +static const char * +dummy_prompt(void) +{ + +return (); +} + int main(int argc, char *argv[]) { @@ -1129,6 +1137,16 @@ main(int argc, char *argv[]) dup(p[1]); close(p[0]); close(p[1]); + if (interactive) { + el = el_init(bc, stdin, stderr, stderr); + hist = history_init(); + history(hist, he, H_SETSIZE, 100); + el_set(el, EL_HIST, history, hist); + el_set(el, EL_EDITOR, emacs); + el_set(el, EL_SIGNAL, 1); + el_set(el, EL_PROMPT, dummy_prompt); + el_source(el, NULL); + } } else { close(STDIN_FILENO); dup(p[0]); Index: extern.h === RCS file: /cvs/src/usr.bin/bc/extern.h,v retrieving revision 1.6 diff -u -p -r1.6 extern.h --- extern.h18 Mar 2006 20:44:43 - 1.6 +++ extern.h5 Feb 2010 09:23:08 - @@ -35,5 +35,10 @@ extern int fileindex; extern int sargc; extern char**sargv; extern char*filename; +extern bool interactive; +extern EditLine*el; +extern History *hist; +extern HistEventhe; extern char*cmdexpr; + bool interactive; Index: scan.l === RCS file: /cvs/src/usr.bin/bc/scan.l,v retrieving revision 1.23 diff -u -p -r1.23 scan.l --- scan.l 27 Oct 2009 23:59:36 - 1.23 +++ scan.l 5 Feb 2010 19:10:39 - @@ -18,6 +18,7 @@ */ #include err.h +#include histedit.h #include signal.h #include stdbool.h #include string.h @@ -30,6 +31,10 @@ intlineno; bool interactive; +HistEvent he; +EditLine *el; +History*hist; + static char*strbuf = NULL; static size_t strbuf_sz = 1; static booldot_seen; @@ -37,6 +42,12 @@ static bool dot_seen; static voidinit_strbuf(void); static voidadd_str(const char *); +static int bc_yyinput(char *, int); + +#undef YY_INPUT +#define YY_INPUT(buf,retval,max) \ + (retval = bc_yyinput(buf, max)) + %} %option always-interactive @@ -279,4 +290,33 @@ yywrap(void) } return (1); } + +static int +bc_yyinput(char *buf, int maxlen) +{ + int num; + if (yyin == stdin interactive) { + const char *bp; + + if ((bp = el_gets(el, num)) == NULL || num == 0) + return (0); + if (num maxlen) { + el_push(el, (char *)(void *)bp + maxlen); + num = maxlen; + } + memcpy(buf, bp, num); + history(hist, he, H_ENTER, bp); + } else { + int c = '*'; + for (num = 0; num maxlen + (c
Re: named-compilezone missing
On Mon, Jan 24, 2011 at 08:54:42PM +0100, Simon Kuhnle wrote: while playing around with some zone file generator/update scripts, I noticed that we're missing BINDs named-compilezone(8). named-compilezone is normally just a symlink to named-checkzone and if executed with this name, some defaults get changed: named-compilezone is similar to named-checkzone, but it always dumps the zone contents to a specified file in a specified format. Additionally, it applies stricter check levels by default, since the dump output will be used as an actual zone file loaded by named. When manually specified otherwise, the check levels must at least be as strict as those specified in the named configuration file. It is referenced in our named-checkzone manpage and has been around since BIND 9.4.0 according to usr.sbin/bind/README. Is there a specific reason why this isn't included? I don't know if my patch is the correct way to do this, but it does the trick. FYI, normally this would get installed by default, when we'd use the usr.sbin/bind/obj/bin/check/Makefile. I know the workaround (just create the symlink yourself) is pretty easy to accomplish, but perhaps it'd be nicer if it'd get installed by default. Is my patch crap or is BIND just not of interest anymore, since NSD is now the way to go? Regards, -- Simon
Re: History for bc(1)
On Wed, Mar 02, 2011 at 10:13:35AM +0100, Otto Moerbeek wrote: Lets try to make some progress here. This is the diff I have had in my tree for a while. It is a port of the freebsd code. What is lacking is the man page stuff. So if sombody could merge that from freebsd, I'd be happy. if you can mail me (privately) the page, and indicate what parts are relevant, i can do that. jmc
Re: Dell R310 - H200 Raid performance problem
On Sun 2011.02.20 at 10:30 -0500, Okan Demirmen wrote: On Sun 2011.02.20 at 13:28 +0100, Mark Kettenis wrote: Date: Sun, 20 Feb 2011 07:03:25 -0500 From: Kenneth R Westerback kwesterb...@rogers.com On Sun, Feb 20, 2011 at 12:39:06PM +0100, Mark Kettenis wrote: Date: Sun, 20 Feb 2011 19:54:21 +1000 From: David Gwynne l...@animata.net how to manipulate write cache policy? the lsi firmwares dont implement handling of the mod page changes unfortunately. you could call the ioctl this implements yourself though from userland. David, while I think that implementing the cache manipulation ioctls for mpii(4) is a good idea, there is a problem here. We don't have a tool in base that actually issues those ioctls. And unless I'm misreading the diff, this still leaves the cache disabled on the stupid Dell. DIOCSCACHE is called in sdattach() to enable write cache for all disks that DIOCGCACHE reports as having write cache disabled. Or are you concerned that we have no way to manipulate it from userland if/when the default needs to be modified? Ah, that's the bit I was missing. A userland tool to display and manipulate the cache settings would still be good though. Functionality should probably be added to bioctl(8). A bit unfortunate that both the -c and -C options are already taken. Ah, I had a diff for bioctl (enable/disable WCE/RCD) based on dlg's sample, but I think marco wanted more of a policy of when to do WCE/RCD rather than a switch - I'll send it along when I get home later this week. I'm not certain this is wanted, but I said I would forward along this very simplisitc patch, so here it is. If something like this is wanted, it can be re-worked to take multiple args to -e and such, but again, only if this is deemed necessary in a userland tool outside of scsi(8). Index: bioctl.8 === RCS file: /cvs/src/sbin/bioctl/bioctl.8,v retrieving revision 1.84 diff -u -p -r1.84 bioctl.8 --- bioctl.822 Dec 2010 16:25:32 - 1.84 +++ bioctl.82 Mar 2011 10:44:23 - @@ -35,6 +35,7 @@ .Op Fl hiqv .Op Fl a Ar alarm-function .Op Fl b Ar channel:target[.lun] +.Op Fl e Ar flag .Op Fl H Ar channel:target[.lun] .Op Fl R Ar device \*(Ba channel:target[.lun] .Op Fl u Ar channel:target[.lun] @@ -128,6 +129,24 @@ digits to four or less. .It Fl i Enumerate the selected RAID devices. This is the default if no other option is given. +.It Fl e Ar flag +Pass +.Ar flag +to +.Nm . +May be one of: +.Bl -tag -width disable -compact +.It Ar q +Query the read/write cache status. +.It Ar R +Enable the read cache. +.It Ar r +Disable the read cache. +.It Ar W +Enable the write cache. +.It Ar w +Disable the write cache. +.El .It Fl q Show vendor, product, revision, and serial number for the given disk. .It Fl R Ar device \*(Ba channel:target[.lun] Index: bioctl.c === RCS file: /cvs/src/sbin/bioctl/bioctl.c,v retrieving revision 1.98 diff -u -p -r1.98 bioctl.c --- bioctl.c1 Dec 2010 19:40:18 - 1.98 +++ bioctl.c2 Mar 2011 10:44:23 - @@ -77,6 +77,7 @@ void bio_changepass(char *); u_int32_t bio_createflags(char *); char *bio_vis(char *); void bio_diskinq(char *); +void bio_cache(char *, char *); intdevh = -1; inthuman; @@ -97,17 +98,17 @@ main(int argc, char *argv[]) char*devicename = NULL; char*realname = NULL, *al_arg = NULL; char*bl_arg = NULL, *dev_list = NULL; - char*key_disk = NULL; + char*key_disk = NULL, *ca_arg = NULL; const char *errstr; int ch, rv, blink = 0, changepass = 0, diskinq = 0; - int ss_func = 0; + int ss_func = 0, diskcache = 0; u_int16_t cr_level = 0; int biodev = 0; if (argc 2) usage(); - while ((ch = getopt(argc, argv, a:b:C:c:dH:hik:l:Pp:qr:R:svu:)) != + while ((ch = getopt(argc, argv, a:b:C:c:de:H:hik:l:Pp:qr:R:svu:)) != -1) { switch (ch) { case 'a': /* alarm */ @@ -133,6 +134,10 @@ main(int argc, char *argv[]) /* delete volume */ func |= BIOC_DELETERAID; break; + case 'e': /* cache */ + diskcache = 1; + ca_arg = optarg; + break; case 'u': /* unblink */ func |= BIOC_BLINK; blink = BIOC_SBUNBLINK; @@ -219,6 +224,8 @@ main(int
Re: History for bc(1)
On Wed, Mar 02, 2011 at 10:18:08AM +, Jason McIntyre wrote: On Wed, Mar 02, 2011 at 10:13:35AM +0100, Otto Moerbeek wrote: Lets try to make some progress here. This is the diff I have had in my tree for a while. It is a port of the freebsd code. What is lacking is the man page stuff. So if sombody could merge that from freebsd, I'd be happy. if you can mail me (privately) the page, and indicate what parts are relevant, i can do that. jmc Hmm, glanced at the freebsd page, but they do not mention anything with respect to editline, I wrongly supposed to would have included that. I think we could nick the relevant lines from e.g. ftp(1). -Otto
[PATCH]: mention -U as global position-independent parameter in aucat.1
Index: aucat.1 === RCS file: /cvs/src/usr.bin/aucat/aucat.1,v retrieving revision 1.73 diff -u -r1.73 aucat.1 --- aucat.1 31 Jul 2010 08:48:01 - 1.73 +++ aucat.1 2 Mar 2011 12:03:46 - @@ -294,7 +294,7 @@ .Pq Fl f to which they are attached. Global parameters -.Pq Fl dlnu +.Pq Fl dlnUu are position-independent. .Pp If no audio devices
Re: Dell R310 - H200 Raid performance problem
On Wed, Mar 2, 2011 at 11:54 AM, Okan Demirmen o...@demirmen.com wrote: I'm not certain this is wanted, but I said I would forward along this very simplisitc patch, so here it is. If something like this is wanted, it can be re-worked to take multiple args to -e and such, but again, only if this is deemed necessary in a userland tool outside of scsi(8). i think this is pointless. if you have an ioctl implemented in the driver that enables cache, then sd(4) itself will enable it for you. if your driver doesn't implement those ioctls it gives you a false idea that you can turn it on which is not true obviously. Index: bioctl.8 === RCS file: /cvs/src/sbin/bioctl/bioctl.8,v retrieving revision 1.84 diff -u -p -r1.84 bioctl.8 --- bioctl.822 Dec 2010 16:25:32 - 1.84 +++ bioctl.82 Mar 2011 10:44:23 - @@ -35,6 +35,7 @@ .Op Fl hiqv .Op Fl a Ar alarm-function .Op Fl b Ar channel:target[.lun] +.Op Fl e Ar flag .Op Fl H Ar channel:target[.lun] .Op Fl R Ar device \*(Ba channel:target[.lun] .Op Fl u Ar channel:target[.lun] @@ -128,6 +129,24 @@ digits to four or less. .It Fl i Enumerate the selected RAID devices. This is the default if no other option is given. +.It Fl e Ar flag +Pass +.Ar flag +to +.Nm . +May be one of: +.Bl -tag -width disable -compact +.It Ar q +Query the read/write cache status. +.It Ar R +Enable the read cache. +.It Ar r +Disable the read cache. +.It Ar W +Enable the write cache. +.It Ar w +Disable the write cache. +.El .It Fl q Show vendor, product, revision, and serial number for the given disk. .It Fl R Ar device \*(Ba channel:target[.lun]
Re: Dell R310 - H200 Raid performance problem
On 2011/03/02 12:09, Mike Belopuhov wrote: On Wed, Mar 2, 2011 at 11:54 AM, Okan Demirmen o...@demirmen.com wrote: I'm not certain this is wanted, but I said I would forward along this very simplisitc patch, so here it is. If something like this is wanted, it can be re-worked to take multiple args to -e and such, but again, only if this is deemed necessary in a userland tool outside of scsi(8). i think this is pointless. if you have an ioctl implemented in the driver that enables cache, then sd(4) itself will enable it for you. if your driver doesn't implement those ioctls it gives you a false idea that you can turn it on which is not true obviously. I guess some people might be thinking users may want to disable this cache for safety or something. Those people might reconsider if they actually try one of these systems - it isn't just a bit slower, the system really is unusable without it.
Re: Dell R310 - H200 Raid performance problem
I really think this heuristic belongs in the kernel. I think there is a desire to make the policy a knob (the old, I prefer slow and safe over fast and dangerous; well use a ups! they don't! debate). So instead of bioctl I think we need a sysctl, for example hw.diskcache, that by default is enabled which is the drive manufacturers suggested setting. Then if so desired one can turn it off. Or do people think this would be too large a hammer and would like to have a more granular control? On Wed, Mar 02, 2011 at 05:54:23AM -0500, Okan Demirmen wrote: On Sun 2011.02.20 at 10:30 -0500, Okan Demirmen wrote: On Sun 2011.02.20 at 13:28 +0100, Mark Kettenis wrote: Date: Sun, 20 Feb 2011 07:03:25 -0500 From: Kenneth R Westerback kwesterb...@rogers.com On Sun, Feb 20, 2011 at 12:39:06PM +0100, Mark Kettenis wrote: Date: Sun, 20 Feb 2011 19:54:21 +1000 From: David Gwynne l...@animata.net how to manipulate write cache policy? the lsi firmwares dont implement handling of the mod page changes unfortunately. you could call the ioctl this implements yourself though from userland. David, while I think that implementing the cache manipulation ioctls for mpii(4) is a good idea, there is a problem here. We don't have a tool in base that actually issues those ioctls. And unless I'm misreading the diff, this still leaves the cache disabled on the stupid Dell. DIOCSCACHE is called in sdattach() to enable write cache for all disks that DIOCGCACHE reports as having write cache disabled. Or are you concerned that we have no way to manipulate it from userland if/when the default needs to be modified? Ah, that's the bit I was missing. A userland tool to display and manipulate the cache settings would still be good though. Functionality should probably be added to bioctl(8). A bit unfortunate that both the -c and -C options are already taken. Ah, I had a diff for bioctl (enable/disable WCE/RCD) based on dlg's sample, but I think marco wanted more of a policy of when to do WCE/RCD rather than a switch - I'll send it along when I get home later this week. I'm not certain this is wanted, but I said I would forward along this very simplisitc patch, so here it is. If something like this is wanted, it can be re-worked to take multiple args to -e and such, but again, only if this is deemed necessary in a userland tool outside of scsi(8). Index: bioctl.8 === RCS file: /cvs/src/sbin/bioctl/bioctl.8,v retrieving revision 1.84 diff -u -p -r1.84 bioctl.8 --- bioctl.8 22 Dec 2010 16:25:32 - 1.84 +++ bioctl.8 2 Mar 2011 10:44:23 - @@ -35,6 +35,7 @@ .Op Fl hiqv .Op Fl a Ar alarm-function .Op Fl b Ar channel:target[.lun] +.Op Fl e Ar flag .Op Fl H Ar channel:target[.lun] .Op Fl R Ar device \*(Ba channel:target[.lun] .Op Fl u Ar channel:target[.lun] @@ -128,6 +129,24 @@ digits to four or less. .It Fl i Enumerate the selected RAID devices. This is the default if no other option is given. +.It Fl e Ar flag +Pass +.Ar flag +to +.Nm . +May be one of: +.Bl -tag -width disable -compact +.It Ar q +Query the read/write cache status. +.It Ar R +Enable the read cache. +.It Ar r +Disable the read cache. +.It Ar W +Enable the write cache. +.It Ar w +Disable the write cache. +.El .It Fl q Show vendor, product, revision, and serial number for the given disk. .It Fl R Ar device \*(Ba channel:target[.lun] Index: bioctl.c === RCS file: /cvs/src/sbin/bioctl/bioctl.c,v retrieving revision 1.98 diff -u -p -r1.98 bioctl.c --- bioctl.c 1 Dec 2010 19:40:18 - 1.98 +++ bioctl.c 2 Mar 2011 10:44:23 - @@ -77,6 +77,7 @@ voidbio_changepass(char *); u_int32_tbio_createflags(char *); char *bio_vis(char *); void bio_diskinq(char *); +void bio_cache(char *, char *); int devh = -1; int human; @@ -97,17 +98,17 @@ main(int argc, char *argv[]) char*devicename = NULL; char*realname = NULL, *al_arg = NULL; char*bl_arg = NULL, *dev_list = NULL; - char*key_disk = NULL; + char*key_disk = NULL, *ca_arg = NULL; const char *errstr; int ch, rv, blink = 0, changepass = 0, diskinq = 0; - int ss_func = 0; + int ss_func = 0, diskcache = 0; u_int16_t cr_level = 0; int biodev = 0; if (argc 2) usage(); - while ((ch = getopt(argc, argv, a:b:C:c:dH:hik:l:Pp:qr:R:svu:)) != + while ((ch =
Re: Dell R310 - H200 Raid performance problem
Date: Wed, 2 Mar 2011 12:09:01 +0100 From: Mike Belopuhov m...@crypt.org.ru On Wed, Mar 2, 2011 at 11:54 AM, Okan Demirmen o...@demirmen.com wrote: I'm not certain this is wanted, but I said I would forward along this very simplisitc patch, so here it is. If something like this is wanted, it can be re-worked to take multiple args to -e and such, but again, only if this is deemed necessary in a userland tool outside of scsi(8). i think this is pointless. if you have an ioctl implemented in the driver that enables cache, then sd(4) itself will enable it for you. if your driver doesn't implement those ioctls it gives you a false idea that you can turn it on which is not true obviously. Well, if sd(4) enables the cache by default, people actually might want to disable the cache. There are valid reasons for running with write caches disabled, especially with RAID controllers that don't have a battery backup. And what is the point of having an ioctl if its only supposed to be used internally by the kernel? Also, if the ioctls aren't implemented they will fail, so bioctl(8) presumably prints an error message in that case. Index: bioctl.8 === RCS file: /cvs/src/sbin/bioctl/bioctl.8,v retrieving revision 1.84 diff -u -p -r1.84 bioctl.8 --- bioctl.822 Dec 2010 16:25:32 - 1.84 +++ bioctl.82 Mar 2011 10:44:23 - @@ -35,6 +35,7 @@ .Op Fl hiqv .Op Fl a Ar alarm-function .Op Fl b Ar channel:target[.lun] +.Op Fl e Ar flag .Op Fl H Ar channel:target[.lun] .Op Fl R Ar device \*(Ba channel:target[.lun] .Op Fl u Ar channel:target[.lun] @@ -128,6 +129,24 @@ digits to four or less. .It Fl i Enumerate the selected RAID devices. This is the default if no other option is given. +.It Fl e Ar flag +Pass +.Ar flag +to +.Nm . +May be one of: +.Bl -tag -width disable -compact +.It Ar q +Query the read/write cache status. +.It Ar R +Enable the read cache. +.It Ar r +Disable the read cache. +.It Ar W +Enable the write cache. +.It Ar w +Disable the write cache. +.El .It Fl q Show vendor, product, revision, and serial number for the given disk. .It Fl R Ar device \*(Ba channel:target[.lun]
Re: Dell R310 - H200 Raid performance problem
Where will this bioctl call be done from? From /etc/rc.local after fsck has run and spent ages because the disks are not cached? I don't understand what the purpose is of giving an option that makes disks slow. What's the point? Why does the kernel just always try to make it best?
Re: uvm_pmemrange.c questions
Hi, They are also inline text in the original email, in case attachments didn't go through. I attached because people have problem with gmail mangling diff files. But still I am putting them up here for download uvm diff https://filestogeaux.lsu.edu/public/download.php?FILE=akulka1/172984cgyg8 dmesg file https://filestogeaux.lsu.edu/public/download.php?FILE=akulka1/41484e8FFiA Thanks On Wed, Mar 2, 2011 at 3:05 AM, Alexander Hall ha...@openbsd.org wrote: On 03/02/11 00:37, Amit Kulkarni wrote: Hi, I found 2 possible null pointers by clang static analyzer and I have attached it to email later. uh-oh... [demime 1.01d removed an attachment of type application/octet-stream which had a name of uvm_pmemrange_1.diff] [demime 1.01d removed an attachment of type application/octet-stream which had a name of dmesg_uvm_pmemchange]
pf ipv6 fragment reassembly
Here is a diff that reassembles IPv6 fragments in pf. In the forward case, it refragments the packets with the same size to allow Path-MTU discovery. With route-to and pf-sync there are still some issues regarding IPv6 fragments. Everything else including nat and redirect should work. Please test sending IPv6 fragments through pf. Much of the IPv4 code has been reused, so test that too. bluhm Index: net/pf.c === RCS file: /data/mirror/openbsd/cvs/src/sys/net/pf.c,v retrieving revision 1.726 diff -u -p -r1.726 pf.c --- net/pf.c14 Feb 2011 11:01:36 - 1.726 +++ net/pf.c20 Feb 2011 21:47:34 - @@ -297,8 +297,6 @@ enum { PF_ICMP_MULTI_NONE, PF_ICMP_MULTI mrm-r-states_cur--; \ } while (0) -static __inline int pf_addr_compare(struct pf_addr *, struct pf_addr *, - sa_family_t); static __inline int pf_src_compare(struct pf_src_node *, struct pf_src_node *); static __inline int pf_state_compare_key(struct pf_state_key *, struct pf_state_key *); @@ -315,7 +313,7 @@ RB_GENERATE(pf_state_tree, pf_state_key, RB_GENERATE(pf_state_tree_id, pf_state, entry_id, pf_state_compare_id); -static __inline int +__inline int pf_addr_compare(struct pf_addr *a, struct pf_addr *b, sa_family_t af) { switch (af) { @@ -6066,12 +6064,13 @@ done: #ifdef INET6 int -pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0, +pf_test6(int fwdir, struct ifnet *ifp, struct mbuf **m0, struct ether_header *eh) { struct pfi_kif *kif; u_short action, reason = 0; struct mbuf *m = *m0; + struct m_tag*mtag; struct ip6_hdr *h; struct pf_rule *a = NULL, *r = pf_default_rule; struct pf_state *s = NULL; @@ -6079,6 +6078,7 @@ pf_test6(int dir, struct ifnet *ifp, str struct pf_pdesc pd; union pf_headers hdrs; int off, hdrlen; + int dir = (fwdir == PF_FWD) ? PF_OUT : fwdir; if (!pf_status.running) return (PF_PASS); @@ -6116,8 +6116,14 @@ pf_test6(int dir, struct ifnet *ifp, str if (m-m_pkthdr.pf.flags PF_TAG_DIVERTED_PACKET) return (PF_PASS); + if (m-m_pkthdr.pf.flags PF_TAG_REFRAGMENTED) { + m-m_pkthdr.pf.flags = ~PF_TAG_REFRAGMENTED; + return (PF_PASS); + } + /* packet reassembly */ - if (pf_normalize_ip6(m0, dir, kif, reason, pd) != PF_PASS) { + if (pf_status.reass + pf_normalize_ip6(m0, fwdir, kif, reason, pd) != PF_PASS) { action = PF_DROP; goto done; } @@ -6322,6 +6328,11 @@ done: pf_route6(m0, r, dir, kif-pfik_ifp, s); break; } + + /* if reassembled packet passed, create new fragments */ + if (pf_status.reass action == PF_PASS *m0 fwdir == PF_FWD + (mtag = m_tag_find(m, PACKET_TAG_PF_REASSEMBLED, NULL)) != NULL) + action = pf_refragment6(m0, mtag, fwdir); return (action); } Index: net/pf_norm.c === RCS file: /data/mirror/openbsd/cvs/src/sys/net/pf_norm.c,v retrieving revision 1.128 diff -u -p -r1.128 pf_norm.c --- net/pf_norm.c 1 Feb 2011 16:10:31 - 1.128 +++ net/pf_norm.c 1 Feb 2011 16:15:20 - @@ -58,29 +58,51 @@ #ifdef INET6 #include netinet/ip6.h +#include netinet6/ip6_var.h #endif /* INET6 */ #include net/pfvar.h struct pf_frent { - LIST_ENTRY(pf_frent) fr_next; - struct ip *fr_ip; - struct mbuf *fr_m; + TAILQ_ENTRY(pf_frent) fr_next; + struct mbuf *fe_m; + u_int16_tfe_hdrlen; /* ipv4 header lenght with ip options + ipv6, extension, fragment header */ + u_int16_tfe_extoff; /* last extension header offset or 0 */ + u_int16_tfe_len;/* fragment length */ + u_int16_tfe_off;/* fragment offset */ + u_int16_tfe_mff;/* more fragment flag */ }; -#define PFFRAG_SEENLAST0x0001 /* Seen the last fragment for this */ +/* keep synced with struct pf_fragment, used in RB_FIND */ +struct pf_fragment_cmp { + struct pf_addr fr_src; + struct pf_addr fr_dst; + u_int32_t fr_id; + sa_family_t fr_af; + u_int8_tfr_proto; + u_int8_tfr_direction; +}; struct pf_fragment { + struct pf_addr fr_src; /* ip source address */ + struct pf_addr fr_dst; /* ip destination address */ + u_int32_t fr_id; /* fragment id for reassemble */ + sa_family_t fr_af; /* address family */ + u_int8_t
Re: uvm_pmemrange.c questions
On Tue, Mar 1, 2011 at 6:37 PM, Amit Kulkarni amitk...@gmail.com wrote: 2) another question. Most allocations are either 1 or a power of two. But there are a few allocations of 3 pages, specifically most allocations are either 1 page, 2 page, some 16's, some 32's, one single 128. I printed this info by checking for value of search[try] at label rescan: on line 901 in uvm_pmemrange.c Would this cause fragmentation or misalignment and ultimately a problem? There were exactly eight 3 page allocations after bios got handed control to /bsd immediately after the lines I haven't looked too closely at the rest of your email, but handling allocations of various sizes in a good way is one of the reasons pmemrange exists.
Re: Patch to fix libstdc++ std::showpos
On Tue, Mar 1, 2011 at 7:39 PM, Brad b...@comstyle.com wrote: There is currently a bug with std::showpos with the older version of libstdc++-v3 that is bundled with gcc 4.2.1 in-tree. It was exposed by the Gnash testsuite when dates were not being formatted correctly showing GMT0 instead of GMT+ as expected. An even simpler test case is that the following program should print +0, not just 0: #include iostream using namespace std; int main() { cout showpos 0 endl; } ok matthew@
relayd socket splicing
This diff implements socket splicing for relayd. Instead of copying data in userland from one TCP socket into another, the kernel is told to move the data himself. The environment variable RELAY_NOSPLICE works like EVENT_NOKQUEUE from libevent. It can be used to easily turn it on and off for testing. At the moment, I have only implemented plain TCP connections in relayd. HTTP can be done later. If you are using relayd with OpenBSD 4.9 to relay TCP connections, please test this. ok? bluhm Index: usr.sbin/relayd/parse.y === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/relayd/parse.y,v retrieving revision 1.149 diff -u -p -r1.149 parse.y --- usr.sbin/relayd/parse.y 26 Oct 2010 15:04:37 - 1.149 +++ usr.sbin/relayd/parse.y 31 Jan 2011 23:34:13 - @@ -796,6 +796,9 @@ proto : relay_proto PROTO STRING { free($3); p-id = ++last_proto_id; p-type = $1; + if (p-type == RELAY_PROTO_TCP + !getenv(RELAY_NOSPLICE)) + p-flags |= F_SPLICE; p-cache = RELAY_CACHESIZE; p-tcpflags = TCPFLAG_DEFAULT; p-sslflags = SSLFLAG_DEFAULT; @@ -2170,6 +2173,8 @@ parse_config(const char *filename, int o (void)strlcpy(conf-sc_proto_default.sslciphers, SSLCIPHERS_DEFAULT, sizeof(conf-sc_proto_default.sslciphers)); conf-sc_proto_default.type = RELAY_PROTO_TCP; + if (!getenv(RELAY_NOSPLICE)) + conf-sc_proto_default.flags |= F_SPLICE; (void)strlcpy(conf-sc_proto_default.name, default, sizeof(conf-sc_proto_default.name)); RB_INIT(conf-sc_proto_default.request_tree); Index: usr.sbin/relayd/relay.c === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/relayd/relay.c,v retrieving revision 1.128 diff -u -p -r1.128 relay.c --- usr.sbin/relayd/relay.c 20 Dec 2010 12:38:06 - 1.128 +++ usr.sbin/relayd/relay.c 31 Jan 2011 23:19:59 - @@ -2328,6 +2328,21 @@ relay_connect(struct rsession *con) return (-1); } + if (rlay-rl_proto-flags F_SPLICE) { + if (setsockopt(con-se_in.s, SOL_SOCKET, SO_SPLICE, + con-se_out.s, sizeof(int)) == -1) { + log_debug(relay_connect: session %d: splice forward + failed: %s, con-se_id, strerror(errno)); + return (-1); + } + if (setsockopt(con-se_out.s, SOL_SOCKET, SO_SPLICE, + con-se_in.s, sizeof(int)) == -1) { + log_debug(relay_connect: session %d: splice backward + failed: %s, con-se_id, strerror(errno)); + return (-1); + } + } + if (errno == EINPROGRESS) event_again(con-se_ev, con-se_out.s, EV_WRITE|EV_TIMEOUT, relay_connected, con-se_tv_start, env-sc_timeout, con); Index: usr.sbin/relayd/relayd.8 === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/relayd/relayd.8,v retrieving revision 1.23 diff -u -p -r1.23 relayd.8 --- usr.sbin/relayd/relayd.824 May 2010 19:44:23 - 1.23 +++ usr.sbin/relayd/relayd.81 Feb 2011 00:10:22 - @@ -121,6 +121,10 @@ Only check the configuration file for va .It Fl v Produce more verbose output. .El +.Sh ENVIRONMENT +It is possible to disable support for socket splicing by setting +the environment variable +.Ev RELAY_NOSPLICE . .Sh FILES .Bl -tag -width /var/run/relayd.sockXX -compact .It /etc/relayd.conf Index: usr.sbin/relayd/relayd.h === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/relayd/relayd.h,v retrieving revision 1.140 diff -u -p -r1.140 relayd.h --- usr.sbin/relayd/relayd.h31 Dec 2010 21:22:42 - 1.140 +++ usr.sbin/relayd/relayd.h31 Jan 2011 23:18:49 - @@ -249,6 +249,7 @@ TAILQ_HEAD(addresslist, address); #define F_SSLCLIENT0x0020 #define F_NEEDRT 0x0040 #define F_MATCH0x0080 +#define F_SPLICE 0x0100 enum forwardmode { FWD_NORMAL = 0,
Touchscreen support for ums(4)
This diff adds touchscreen support to ums(4). This works great for newer Gunze USB touchscreens in WHQL mode. That means that it is Microsoft approved, so it should be some sort of standard way to hook these things up. Rather than hardcoding the calibration for the device I have (like uts(4) seems to) I make it default to raw mode. At least for the device that I have that isn't too far off. ok? Index: usb/hidms.c === RCS file: /cvs/src/sys/dev/usb/hidms.c,v retrieving revision 1.1 diff -u -p -r1.1 hidms.c --- usb/hidms.c 31 Jul 2010 16:04:50 - 1.1 +++ usb/hidms.c 2 Mar 2011 20:14:37 - @@ -63,7 +63,8 @@ int hidmsdebug = 0; #define HIDMS_BUT(i) ((i) == 1 || (i) == 2 ? 3 - (i) : i) -#define NOTMOUSE(f)(((f) (HIO_CONST | HIO_RELATIVE)) != HIO_RELATIVE) +#define MOUSE_FLAGS_MASK (HIO_CONST | HIO_RELATIVE) +#define NOTMOUSE(f)(((f) MOUSE_FLAGS_MASK) != HIO_RELATIVE) int hidms_setup(struct device *self, struct hidms *ms, uint32_t quirks, @@ -73,6 +74,7 @@ hidms_setup(struct device *self, struct int i, wheel, twheel; ms-sc_device = self; + ms-sc_rawmode = 1; if (quirks UQ_MS_REVZ) ms-sc_flags |= HIDMS_REVZ; @@ -86,7 +88,13 @@ hidms_setup(struct device *self, struct printf(\n%s: mouse has no X report\n, self-dv_xname); return ENXIO; } - if (NOTMOUSE(flags)) { + switch(flags MOUSE_FLAGS_MASK) { + case 0: + ms-sc_flags |= HIDMS_ABSX; + break; + case HIO_RELATIVE: + break; + default: printf(\n%s: X report 0x%04x not supported\n, self-dv_xname, flags); return ENXIO; @@ -97,7 +105,13 @@ hidms_setup(struct device *self, struct printf(\n%s: mouse has no Y report\n, self-dv_xname); return ENXIO; } - if (NOTMOUSE(flags)) { + switch(flags MOUSE_FLAGS_MASK) { + case 0: + ms-sc_flags |= HIDMS_ABSY; + break; + case HIO_RELATIVE: + break; + default: printf(\n%s: Y report 0x%04x not supported\n, self-dv_xname, flags); return ENXIO; @@ -225,7 +239,7 @@ hidms_attach(struct hidms *ms, const str printf(\n); #ifdef HIDMS_DEBUG - DPRINTF((hidms_attach: sc=%p\n, sc)); + DPRINTF((hidms_attach: ms=%p\n, ms)); DPRINTF((hidms_attach: X\t%d/%d\n, ms-sc_loc_x.pos, ms-sc_loc_x.size)); DPRINTF((hidms_attach: Y\t%d/%d\n, @@ -252,7 +266,7 @@ hidms_detach(struct hidms *ms, int flags { int rv = 0; - DPRINTF((hidms_detach: sc=%p flags=%d\n, sc, flags)); + DPRINTF((hidms_detach: ms=%p flags=%d\n, ms, flags)); /* No need to do reference counting of hidms, wsmouse has all the goo */ if (ms-sc_wsmousedev != NULL) @@ -266,6 +280,7 @@ hidms_input(struct hidms *ms, uint8_t *d { int dx, dy, dz, dw; u_int32_t buttons = 0; + int flags; int i, s; DPRINTFN(5,(hidms_input: len=%d\n, len)); @@ -292,16 +307,40 @@ hidms_input(struct hidms *ms, uint8_t *d return; } + flags = WSMOUSE_INPUT_DELTA; + if (ms-sc_flags HIDMS_ABSX) + flags |= WSMOUSE_INPUT_ABSOLUTE_X; + if (ms-sc_flags HIDMS_ABSY) + flags |= WSMOUSE_INPUT_ABSOLUTE_Y; + dx = hid_get_data(data, ms-sc_loc_x); dy = -hid_get_data(data, ms-sc_loc_y); dz = hid_get_data(data, ms-sc_loc_z); dw = hid_get_data(data, ms-sc_loc_w); + if (ms-sc_flags HIDMS_ABSY) + dy = -dy; if (ms-sc_flags HIDMS_REVZ) dz = -dz; if (ms-sc_flags HIDMS_REVW) dw = -dw; + if (ms-sc_tsscale.swapxy !ms-sc_rawmode) { + int tmp = dx; + dx = dy; + dy = tmp; + } + + if (!ms-sc_rawmode + (ms-sc_tsscale.maxx - ms-sc_tsscale.minx) != 0 + (ms-sc_tsscale.maxy - ms-sc_tsscale.miny) != 0) { + /* Scale down to the screen resolution. */ + dx = ((dx - ms-sc_tsscale.minx) * ms-sc_tsscale.resx) / + (ms-sc_tsscale.maxx - ms-sc_tsscale.minx); + dy = ((dy - ms-sc_tsscale.miny) * ms-sc_tsscale.resy) / + (ms-sc_tsscale.maxy - ms-sc_tsscale.miny); + } + for (i = 0; i ms-sc_num_buttons; i++) if (hid_get_data(data, ms-sc_loc_btn[i])) buttons |= (1 HIDMS_BUT(i)); @@ -314,7 +353,7 @@ hidms_input(struct hidms *ms, uint8_t *d if (ms-sc_wsmousedev != NULL) { s = spltty(); wsmouse_input(ms-sc_wsmousedev, buttons, - dx, dy, dz, dw, WSMOUSE_INPUT_DELTA); +
Re: relayd socket splicing
I just relized that I did send out an outdated diff. This one has an additional check for F_SSL and F_SSLCLIENT to avoid splicing ssl connections. The RELAY_NOSPLICE environment variable is only for testing and will be removed in the final version. bluhm Index: usr.sbin/relayd/parse.y === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/relayd/parse.y,v retrieving revision 1.149 diff -u -p -r1.149 parse.y --- usr.sbin/relayd/parse.y 26 Oct 2010 15:04:37 - 1.149 +++ usr.sbin/relayd/parse.y 22 Feb 2011 22:54:05 - @@ -796,6 +796,9 @@ proto : relay_proto PROTO STRING { free($3); p-id = ++last_proto_id; p-type = $1; + if (p-type == RELAY_PROTO_TCP + !getenv(RELAY_NOSPLICE)) + p-flags |= F_SPLICE; p-cache = RELAY_CACHESIZE; p-tcpflags = TCPFLAG_DEFAULT; p-sslflags = SSLFLAG_DEFAULT; @@ -2170,6 +2173,8 @@ parse_config(const char *filename, int o (void)strlcpy(conf-sc_proto_default.sslciphers, SSLCIPHERS_DEFAULT, sizeof(conf-sc_proto_default.sslciphers)); conf-sc_proto_default.type = RELAY_PROTO_TCP; + if (!getenv(RELAY_NOSPLICE)) + conf-sc_proto_default.flags |= F_SPLICE; (void)strlcpy(conf-sc_proto_default.name, default, sizeof(conf-sc_proto_default.name)); RB_INIT(conf-sc_proto_default.request_tree); Index: usr.sbin/relayd/relay.c === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/relayd/relay.c,v retrieving revision 1.128 diff -u -p -r1.128 relay.c --- usr.sbin/relayd/relay.c 20 Dec 2010 12:38:06 - 1.128 +++ usr.sbin/relayd/relay.c 22 Feb 2011 22:54:05 - @@ -2328,6 +2328,22 @@ relay_connect(struct rsession *con) return (-1); } + if (rlay-rl_proto-flags F_SPLICE + (rlay-rl_conf.flags (F_SSL|F_SSLCLIENT)) == 0) { + if (setsockopt(con-se_in.s, SOL_SOCKET, SO_SPLICE, + con-se_out.s, sizeof(int)) == -1) { + log_debug(relay_connect: session %d: splice forward + failed: %s, con-se_id, strerror(errno)); + return (-1); + } + if (setsockopt(con-se_out.s, SOL_SOCKET, SO_SPLICE, + con-se_in.s, sizeof(int)) == -1) { + log_debug(relay_connect: session %d: splice backward + failed: %s, con-se_id, strerror(errno)); + return (-1); + } + } + if (errno == EINPROGRESS) event_again(con-se_ev, con-se_out.s, EV_WRITE|EV_TIMEOUT, relay_connected, con-se_tv_start, env-sc_timeout, con); Index: usr.sbin/relayd/relayd.8 === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/relayd/relayd.8,v retrieving revision 1.23 diff -u -p -r1.23 relayd.8 --- usr.sbin/relayd/relayd.824 May 2010 19:44:23 - 1.23 +++ usr.sbin/relayd/relayd.822 Feb 2011 23:00:20 - @@ -121,6 +121,12 @@ Only check the configuration file for va .It Fl v Produce more verbose output. .El +.Sh ENVIRONMENT +It is possible to disable support for socket splicing by setting +the environment variable +.Ev RELAY_NOSPLICE . +Socket splicing is used by default to speed up plain TCP connections +without ssl. .Sh FILES .Bl -tag -width /var/run/relayd.sockXX -compact .It /etc/relayd.conf Index: usr.sbin/relayd/relayd.h === RCS file: /data/mirror/openbsd/cvs/src/usr.sbin/relayd/relayd.h,v retrieving revision 1.140 diff -u -p -r1.140 relayd.h --- usr.sbin/relayd/relayd.h31 Dec 2010 21:22:42 - 1.140 +++ usr.sbin/relayd/relayd.h22 Feb 2011 22:54:05 - @@ -249,6 +249,7 @@ TAILQ_HEAD(addresslist, address); #define F_SSLCLIENT0x0020 #define F_NEEDRT 0x0040 #define F_MATCH0x0080 +#define F_SPLICE 0x0100 enum forwardmode { FWD_NORMAL = 0,
Re: Touchscreen support for ums(4)
Date: Wed, 2 Mar 2011 21:23:07 +0100 (CET) From: Mark Kettenis mark.kette...@xs4all.nl This diff adds touchscreen support to ums(4). This works great for newer Gunze USB touchscreens in WHQL mode. That means that it is Microsoft approved, so it should be some sort of standard way to hook these things up. Rather than hardcoding the calibration for the device I have (like uts(4) seems to) I make it default to raw mode. At least for the device that I have that isn't too far off. ok? Alexandr Shadchin pointed out I forgot to include hidmsvar.h in the diff. Index: bluetooth/btms.c === RCS file: /cvs/src/sys/dev/bluetooth/btms.c,v retrieving revision 1.5 diff -u -p -r1.5 btms.c --- bluetooth/btms.c31 Jul 2010 16:04:50 - 1.5 +++ bluetooth/btms.c2 Mar 2011 22:16:20 - @@ -170,13 +170,18 @@ btms_wsmouse_ioctl(void *self, u_long cm { struct btms_softc *sc = (struct btms_softc *)self; struct hidms *ms = sc-sc_ms; + int rc; + + rc = hidms_ioctl(ms, cmd, data, flag, p); + if (rc != -1) + return rc; switch (cmd) { case WSMOUSEIO_GTYPE: *(u_int *)data = WSMOUSE_TYPE_BLUETOOTH; return 0; default: - return hidms_ioctl(ms, cmd, data, flag, p); + return -1; } } Index: usb/ums.c === RCS file: /cvs/src/sys/dev/usb/ums.c,v retrieving revision 1.33 diff -u -p -r1.33 ums.c --- usb/ums.c 2 Aug 2010 23:17:34 - 1.33 +++ usb/ums.c 2 Mar 2011 22:16:20 - @@ -227,15 +227,18 @@ ums_ioctl(void *v, u_long cmd, caddr_t d struct hidms *ms = sc-sc_ms; int rc; + rc = uhidev_ioctl(sc-sc_hdev, cmd, data, flag, p); + if (rc != -1) + return rc; + rc = hidms_ioctl(ms, cmd, data, flag, p); + if (rc != -1) + return rc; + switch (cmd) { case WSMOUSEIO_GTYPE: *(u_int *)data = WSMOUSE_TYPE_USB; return 0; default: - rc = uhidev_ioctl(sc-sc_hdev, cmd, data, flag, p); - if (rc != -1) - return rc; - else - return hidms_ioctl(ms, cmd, data, flag, p); + return -1; } } Index: usb/hidms.c === RCS file: /cvs/src/sys/dev/usb/hidms.c,v retrieving revision 1.1 diff -u -p -r1.1 hidms.c --- usb/hidms.c 31 Jul 2010 16:04:50 - 1.1 +++ usb/hidms.c 2 Mar 2011 22:16:20 - @@ -63,7 +63,8 @@ int hidmsdebug = 0; #define HIDMS_BUT(i) ((i) == 1 || (i) == 2 ? 3 - (i) : i) -#define NOTMOUSE(f)(((f) (HIO_CONST | HIO_RELATIVE)) != HIO_RELATIVE) +#define MOUSE_FLAGS_MASK (HIO_CONST | HIO_RELATIVE) +#define NOTMOUSE(f)(((f) MOUSE_FLAGS_MASK) != HIO_RELATIVE) int hidms_setup(struct device *self, struct hidms *ms, uint32_t quirks, @@ -73,6 +74,7 @@ hidms_setup(struct device *self, struct int i, wheel, twheel; ms-sc_device = self; + ms-sc_rawmode = 1; if (quirks UQ_MS_REVZ) ms-sc_flags |= HIDMS_REVZ; @@ -86,7 +88,13 @@ hidms_setup(struct device *self, struct printf(\n%s: mouse has no X report\n, self-dv_xname); return ENXIO; } - if (NOTMOUSE(flags)) { + switch(flags MOUSE_FLAGS_MASK) { + case 0: + ms-sc_flags |= HIDMS_ABSX; + break; + case HIO_RELATIVE: + break; + default: printf(\n%s: X report 0x%04x not supported\n, self-dv_xname, flags); return ENXIO; @@ -97,7 +105,13 @@ hidms_setup(struct device *self, struct printf(\n%s: mouse has no Y report\n, self-dv_xname); return ENXIO; } - if (NOTMOUSE(flags)) { + switch(flags MOUSE_FLAGS_MASK) { + case 0: + ms-sc_flags |= HIDMS_ABSY; + break; + case HIO_RELATIVE: + break; + default: printf(\n%s: Y report 0x%04x not supported\n, self-dv_xname, flags); return ENXIO; @@ -225,7 +239,7 @@ hidms_attach(struct hidms *ms, const str printf(\n); #ifdef HIDMS_DEBUG - DPRINTF((hidms_attach: sc=%p\n, sc)); + DPRINTF((hidms_attach: ms=%p\n, ms)); DPRINTF((hidms_attach: X\t%d/%d\n, ms-sc_loc_x.pos, ms-sc_loc_x.size)); DPRINTF((hidms_attach: Y\t%d/%d\n, @@ -252,7 +266,7 @@ hidms_detach(struct hidms *ms, int flags { int rv = 0; - DPRINTF((hidms_detach: sc=%p flags=%d\n, sc, flags)); + DPRINTF((hidms_detach: ms=%p flags=%d\n, ms, flags)); /* No need to do reference counting of hidms, wsmouse has all the goo */ if
userland PPP patch for IPv6CP + VLAN interfaces
Ethernet vlan(4) interfaces have valid Ethernet link layer addresses but use a different interface type (IFT_L2VLAN vs IFT_ETHER). Treat IFT_L2VLAN interfaces like IFT_ETHER interfaces when handling link layer addresses. From FreeBSD Index: ipv6cp.c === RCS file: /home/cvs/src/usr.sbin/ppp/ppp/ipv6cp.c,v retrieving revision 1.10 diff -u -p -r1.10 ipv6cp.c --- ipv6cp.c7 Aug 2008 19:26:57 - 1.10 +++ ipv6cp.c6 Feb 2011 07:29:30 - @@ -148,6 +148,7 @@ SetInterfaceID(u_char *ifid, int userand switch(sdl-sdl_type) { case IFT_ETHER: case IFT_FDDI: +case IFT_L2VLAN: /* XXX need more cases? */ break; default: -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Way To Have a Perfect Vision Naturally
Dr. Bates Discovered a Scientifically Proven Way To Have a Perfect Vision Naturally See How : http://good-links.us/improve-eye-sight.html