Re: CVS commit: src/external/bsd/atf/dist/atf-run
On 12/19/11 10:25 PM, Christos Zoulas wrote: Module Name: src Committed By: christos Date: Mon Dec 19 22:25:46 UTC 2011 Modified Files: src/external/bsd/atf/dist/atf-run: timer.cpp Log Message: - make all the ifdefs match - make it compile, and test This was still broken. timer_t and itimerspec do not exist, so the timer.hpp file is unusable. The definition of HAVE_POSIX_TIMER does not work because SIGEV_NONE is defined in OS X. The change of sys/time.h and signal.h to ctime and csignal seems to cause issues too. I have had to fix this by adding a configure test for timer_t, using the pimpl idiom for the timer class definition to prevent further ifdef mess in timer.hpp, and had to sprinkle some more ifdef stuff in the code. The result is incredibly ugly, and I doubt there is any real benefit other than using modern interfaces. Was it really worth it? (I have not committed these fixes to the NetBSD tree because I cannot test them at the moment.) -- Julio Merino / @jmmv
Re: CVS commit: src/external/bsd/atf/dist/atf-run
On Dec 23, 10:47am, j...@netbsd.org (Julio Merino) wrote: -- Subject: Re: CVS commit: src/external/bsd/atf/dist/atf-run | On 12/19/11 10:25 PM, Christos Zoulas wrote: | Module Name:src | Committed By: christos | Date: Mon Dec 19 22:25:46 UTC 2011 | | Modified Files: | src/external/bsd/atf/dist/atf-run: timer.cpp | | Log Message: | - make all the ifdefs match | - make it compile, and test | | This was still broken. | | timer_t and itimerspec do not exist, so the timer.hpp file is unusable. | The definition of HAVE_POSIX_TIMER does not work because SIGEV_NONE is | defined in OS X. The change of sys/time.h and signal.h to ctime and | csignal seems to cause issues too. | | I have had to fix this by adding a configure test for timer_t, using the | pimpl idiom for the timer class definition to prevent further ifdef mess | in timer.hpp, and had to sprinkle some more ifdef stuff in the code. | | The result is incredibly ugly, and I doubt there is any real benefit | other than using modern interfaces. Was it really worth it? (I have | not committed these fixes to the NetBSD tree because I cannot test | them at the moment.) I don't know. I would not have guessed that OS/X is lacking them, since they've been around for more than a decade. christos
Re: CVS commit: src/sys/netinet
In article 20111223220300.9e70b17...@cvs.netbsd.org, James Chacon source-changes-d@NetBSD.org wrote: -=-=-=-=-=- #define ICMP_PHOTURIS 40 /* security */ +#define ICMP_PHOTURIS_UNKNOWN_INDEX 1 /* Bad index */ +#define ICMP_PHOTURIS_AUTH_FAILED 2 /* Auth failed */ +#define ICMP_PHOTURIS_DECRYPT_FAILED3 /* Decrypt failed */ I don't know where ip_compat.h got these from, but they are wrong according to the IANA assigment, and this is why I did not copy them. http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xml#icmp-parameters-codes-40 christos
Re: CVS commit: src/sys/netinet
Unfortunately pfctl references them if it sees ICMP_PHOTURIS defined. A quick search for these does show a lot of use out there between *BSD, linux, etc. And http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xml#icmp-parameters-codes-40 shows a few more even and RFC2521 seems to be defining all of this. BTW: What happens if icmp_error gets something above ICMP_MAX_TYPE in? It appears we hard panic: if ((u_int)type ICMP_MAXTYPE) panic(icmp_error); James On Fri, Dec 23, 2011 at 2:12 PM, Christos Zoulas chris...@astron.com wrote: In article 20111223220300.9e70b17...@cvs.netbsd.org, James Chacon source-changes-d@NetBSD.org wrote: -=-=-=-=-=- #define ICMP_PHOTURIS 40 /* security */ +#define ICMP_PHOTURIS_UNKNOWN_INDEX 1 /* Bad index */ +#define ICMP_PHOTURIS_AUTH_FAILED 2 /* Auth failed */ +#define ICMP_PHOTURIS_DECRYPT_FAILED 3 /* Decrypt failed */ I don't know where ip_compat.h got these from, but they are wrong according to the IANA assigment, and this is why I did not copy them. http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xml#icmp-parameters-codes-40 christos
Re: CVS commit: src/sys/netinet
On Dec 23, 2:20pm, chacon.ja...@gmail.com (James Chacon) wrote: -- Subject: Re: CVS commit: src/sys/netinet | Unfortunately pfctl references them if it sees ICMP_PHOTURIS defined. Ah. | A quick search for these does show a lot of use out there between | *BSD, linux, etc. | | And http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xml#icm= | p-parameters-codes-40 | shows a few more even and RFC2521 seems to be defining all of this. | | BTW: What happens if icmp_error gets something above ICMP_MAX_TYPE in? | It appears we hard panic: | | if ((u_int)type ICMP_MAXTYPE) | panic(icmp_error); | The code wil not generate them, so there will be no panic. Changing ICMP_MAXTYPE to be 18 will require us re-doing the ICMP stats... I am not prepared to do this yet. It will lead to binary incompatibility with netstat. christos
Re: CVS commit: src/sys/netinet
Think we should go ahead and add the codes for 0,4 and 5? James On Fri, Dec 23, 2011 at 2:44 PM, Christos Zoulas chris...@zoulas.com wrote: On Dec 23, 2:20pm, chacon.ja...@gmail.com (James Chacon) wrote: -- Subject: Re: CVS commit: src/sys/netinet | Unfortunately pfctl references them if it sees ICMP_PHOTURIS defined. Ah. | A quick search for these does show a lot of use out there between | *BSD, linux, etc. | | And http://www.iana.org/assignments/icmp-parameters/icmp-parameters.xml#icm= | p-parameters-codes-40 | shows a few more even and RFC2521 seems to be defining all of this. | | BTW: What happens if icmp_error gets something above ICMP_MAX_TYPE in? | It appears we hard panic: | | if ((u_int)type ICMP_MAXTYPE) | panic(icmp_error); | The code wil not generate them, so there will be no panic. Changing ICMP_MAXTYPE to be 18 will require us re-doing the ICMP stats... I am not prepared to do this yet. It will lead to binary incompatibility with netstat. christos
Re: CVS commit: src/sys/netinet
On Dec 23, 3:10pm, chacon.ja...@gmail.com (James Chacon) wrote: -- Subject: Re: CVS commit: src/sys/netinet | Think we should go ahead and add the codes for 0,4 and 5? Well, are the ones for 1 and 3 correct? I have really no opinion on this. I would like to read up some more on the RFC and implementations first. christos
Re: CVS commit: src/sys/netinet
On Fri, Dec 23, 2011 at 3:36 PM, Christos Zoulas chris...@zoulas.com wrote: On Dec 23, 3:10pm, chacon.ja...@gmail.com (James Chacon) wrote: -- Subject: Re: CVS commit: src/sys/netinet | Think we should go ahead and add the codes for 0,4 and 5? Well, are the ones for 1 and 3 correct? I have really no opinion on this. I would like to read up some more on the RFC and implementations first. As far as I can tell, yes. I was looking at other implementations and it appears the codes used universally are: #define ICMP_PHOTURIS_UNKNOWN_INDEX 0 /* unknown sec index */ #define ICMP_PHOTURIS_AUTH_FAILED 1 /* auth failed */ #define ICMP_PHOTURIS_DECOMPRESS_FAILED 2 /* decompress failed */ #define ICMP_PHOTURIS_DECRYPT_FAILED3 /* decrypt failed */ #define ICMP_PHOTURIS_NEED_AUTHN4 /* no authentication */ #define ICMP_PHOTURIS_NEED_AUTHZ5 /* no authorization */ (That comes from libdnet icmp.h) James
Re: CVS commit: src/sys/netinet
On Dec 23, 4:03pm, chacon.ja...@gmail.com (James Chacon) wrote: -- Subject: Re: CVS commit: src/sys/netinet | On Fri, Dec 23, 2011 at 3:36 PM, Christos Zoulas chris...@zoulas.com wrot= | e: | On Dec 23, =A03:10pm, chacon.ja...@gmail.com (James Chacon) wrote: | -- Subject: Re: CVS commit: src/sys/netinet | | | Think we should go ahead and add the codes for 0,4 and 5? | | Well, are the ones for 1 and 3 correct? I have really no opinion on this. | I would like to read up some more on the RFC and implementations first. | | | As far as I can tell, yes. I was looking at other implementations and | it appears the codes used universally are: | | #define ICMP_PHOTURIS_UNKNOWN_INDEX 0 /* unknown sec index */ | #define ICMP_PHOTURIS_AUTH_FAILED 1 /* auth failed */ | #define ICMP_PHOTURIS_DECOMPRESS_FAILED 2 /* decompress failed */ | #define ICMP_PHOTURIS_DECRYPT_FAILED3 /* decrypt failed */ | #define ICMP_PHOTURIS_NEED_AUTHN4 /* no authentication */ | #define ICMP_PHOTURIS_NEED_AUTHZ5 /* no authorization */ Go for it then! Thanks for looking into it. christos
Re: CVS commit: src
Module Name: src Committed By: tls Date: Sat Dec 17 20:05:40 UTC 2011 Modified Files: : src/sys/sys: cprng.h param.h rnd.h : Log Message: Separate /dev/random pseudodevice implemenation from kernel entropy pool implementation. Rewrite pseudodevice code to use cprng_strong(9). : Can you please fix cvs log? (i.e. denote welcome to 5.99.59) It's important to notify bump (even in cvs log) for modular and pkgsrc users. --- Izumi Tsutsui