Re: For 5.2 collation support from the xlocale implementation of FreeBSD
Hey Vladimir, On 07/02/13(Thu) 17:02, Vladimir Támara Patiño wrote: Attached is a .tar.gz with 49 news files to place in /usr/src and below there is a patch for /usr/src of OpenBSD 5.2 that modifies 53 files to integrate the collation support of the xlocale implementation of FreeBSD (POSIX 2008). If there is interest I can try to update it to current in next days. That's cool stuff but I totally agree with stsp@ here, your diff is way too big to be correctly reviewed and integrated. So to answer your first question, yes please update to -current and make sure you have the last version of the sources you're generating your diff against. [...] * Still refactoring is needed, if needed I can try to write documentation in english of key points of the integration. I'd suggest you to submit smaller diffs that may be integrated progressively instead of writing a how to integrate this huge diff document ;) This will also help to find a solution for the various FIXME left in your code. Apart from that, make sure your inline diffs does not get mangled by you mail program so that they can be apply. Martin
Re: pfctl / nat / dhcp
On Thu, Feb 7, 2013 at 5:17 PM, sven falempin sven.falem...@gmail.comwrote: On Thu, Feb 7, 2013 at 10:09 AM, Stuart Henderson s...@spacehopper.orgwrote: On 2013/02/07 10:01, sven falempin wrote: On Thu, Feb 7, 2013 at 9:44 AM, Stuart Henderson s...@spacehopper.org wrote: On 2013/02/07 09:26, sven falempin wrote: egress, vr0 ext are all the same, arent they ? Probably, but you didn't give enough information to be sure. For example if you have IPv6 via a tunnel interface (or perhaps more importantly, if you later add it), then that will also be in the egress group but might not have an IPv4 address and I haven't tested to see how that works. Or if you have a lower priority default route via another interface that you didn't mention, then that could also be in 'egress'. Perhaps unlikely but without the information I don't want to make assumptions. (Personally I do like using interface groups where I'm referring to the interface, but try and tie things down a bit further for IP addresses especially for NAT). My problem is the time between an address ip change on an interface and the nat rules actually use the new address. For my rules i am happy with my ext, but i will test vr0 see if it is faster. Or maybe dive into the source if i am bored. from the manpage section I quoted earlier: WHEN THE INTERFACE NAME IS SURROUNDED BY PARENTHESES, THE RULE IS AUTOMATICALLY UPDATED WHENEVER THE INTERFACE CHANGES ITS ADDRESS. THE RULESET DOES NOT NEED TO BE RELOADED. THIS IS ESPECIALLY USEFUL WITH NAT. # cat -n /etc/pf.conf | grep nat 26 match out on vr0 from 192.168.42.0/24 to !(self) nat-to ext 28 match out on ext from 192.168.142.0/24 to !(self) nat-to ext # pfctl -nf /etc/pf.conf /etc/pf.conf:26: syntax error /etc/pf.conf:28: syntax error :-( i meant: # cat -n /etc/pf.conf | grep nat 26 match out on (vr0) from 192.168.42.0/24 to !(self) nat-to ext 28 match out on (ext) from 192.168.142.0/24 to !(self) nat-to ext # pfctl -nf /etc/pf.conf /etc/pf.conf:26: syntax error /etc/pf.conf:28: syntax error -- - () ascii ribbon campaign - against html e-mail /\ -- - () ascii ribbon campaign - against html e-mail /\
Re: Send hostname to remote host with syslogd
On 02/07/13 17:38, Bob Beck wrote: This looks correct to me. Does this diff have a chance to be committed then ? On Thu, Feb 7, 2013 at 5:08 AM, Markus Friedl mfri...@gmail.com wrote: fwiw, this is what i have in my tree for some time now: Index: syslogd.c === RCS file: /cvs/src/usr.sbin/syslogd/syslogd.c,v retrieving revision 1.104 diff -u -p -u -r1.104 syslogd.c --- syslogd.c 12 Jul 2011 11:28:31 - 1.104 +++ syslogd.c 7 Feb 2013 12:05:16 - @@ -195,6 +195,7 @@ int MarkInterval = 20 * 60; /* interval intMarkSeq = 0;/* mark sequence number */ intSecureMode = 1; /* when true, speak only unix domain socks */ intNoDNS = 0; /* when true, will refrain from doing DNS lookups */ +intIncludeHostname = 0;/* include RFC 3164 style hostnames when forwarding */ char *ctlsock_path = NULL; /* Path to control socket */ @@ -289,7 +290,7 @@ main(int argc, char *argv[]) struct addrinfo hints, *res, *res0; FILE *fp; - while ((ch = getopt(argc, argv, dnuf:m:p:a:s:)) != -1) + while ((ch = getopt(argc, argv, dhnuf:m:p:a:s:)) != -1) switch (ch) { case 'd': /* debug */ Debug++; @@ -297,6 +298,9 @@ main(int argc, char *argv[]) case 'f': /* configuration file */ ConfFile = optarg; break; + case 'h': /* RFC 3164 hostnames */ + IncludeHostname = 1; + break; case 'm': /* mark interval */ MarkInterval = atoi(optarg) * 60; break; @@ -611,7 +615,7 @@ usage(void) { (void)fprintf(stderr, - usage: syslogd [-dnu] [-a path] [-f config_file] [-m mark_interval]\n + usage: syslogd [-dnuh] [-a path] [-f config_file] [-m mark_interval]\n [-p log_socket] [-s reporting_socket]\n); exit(1); } @@ -888,8 +892,10 @@ fprintlog(struct filed *f, int flags, ch case F_FORW: dprintf( %s\n, f-f_un.f_forw.f_hname); - if ((l = snprintf(line, sizeof(line), %d%.15s %s, + if ((l = snprintf(line, sizeof(line), %d%.15s %s%s%s, f-f_prevpri, (char *)iov[0].iov_base, + IncludeHostname ? LocalHostName : , + IncludeHostname ? : , (char *)iov[4].iov_base)) = sizeof(line) || l == -1) l = strlen(line); if (sendto(pfd[PFD_INET].fd, line, l, 0,
Re: pfctl / nat / dhcp
On 2013/02/08 08:56, sven falempin wrote: # cat -n /etc/pf.conf | grep nat 26 match out on (vr0) from 192.168.42.0/24 to !(self) nat-to ext 28 match out on (ext) from 192.168.142.0/24 to !(self) nat-to ext # pfctl -nf /etc/pf.conf /etc/pf.conf:26: syntax error /etc/pf.conf:28: syntax error It is the IP address which changes not the interface name. nat-to (interface)
Re: pfctl / nat / dhcp
On Fri, Feb 8, 2013 at 9:07 AM, Stuart Henderson s...@spacehopper.orgwrote: On 2013/02/08 08:56, sven falempin wrote: # cat -n /etc/pf.conf | grep nat 26 match out on (vr0) from 192.168.42.0/24 to !(self) nat-to ext 28 match out on (ext) from 192.168.142.0/24 to !(self) nat-to ext # pfctl -nf /etc/pf.conf /etc/pf.conf:26: syntax error /etc/pf.conf:28: syntax error It is the IP address which changes not the interface name. nat-to (interface) THANK YOU :-) -- - () ascii ribbon campaign - against html e-mail /\
(Fwd) last(1) nit
ping? ALL feedback is welcome :-) --- Forwarded message follows --- From: Jacob L. Leifman jac...@bitwise.net To: tech@openbsd.org Date sent: Fri, 25 Jan 2013 18:34:55 -0500 The last(1) utility allows for an alternate data file to be specified with -f switch which is particularly useful for reviewing rotated versions of wtmp or forensic analysis. What I found distracting (and made me briefly think it was not working) is that regardless this specification, at the end last(1) always prints wtmp begins ... because this name is hardcoded in the output. Below is a quick-and-dirty patch to use the actual name of the data file. The dirty refers to the fact that it prints the full pathname (e.g. /var/log/wtmp) even in the most common use case when all defaults are used. Although this may be objectionable under the doctrine of least change, I also see a potential benefit that it will always indicate the source of the data in an unambiguous manner. --- last.c.orig Thu Oct 29 00:33:55 2009 +++ last.c Fri Jan 25 18:20:10 2013 @@ -407,7 +407,7 @@ asctime(gmtime(total))+11); } ct = ctime(buf[0].ut_time); - printf(\nwtmp begins %10.10s %*.*s %4.4s\n, ct, timesize, timesize, + printf(\n%s begins %10.10s %*.*s %4.4s\n, file, ct, timesize, timesize, ct + 11, ct + 20); } --- End of forwarded message --- WPM$4FA7.PM$ Description: Mail message body
Re: (Fwd) last(1) nit
Might I suggest using basename()? --- last.c.orig 2009-10-27 23:59:39.0 + +++ last.c 2013-02-09 01:43:04.709416732 + @@ -36,6 +36,7 @@ #include ctype.h #include err.h #include fcntl.h +#include libgen.h #include paths.h #include signal.h #include stdio.h @@ -407,7 +408,7 @@ asctime(gmtime(total))+11); } ct = ctime(buf[0].ut_time); - printf(\nwtmp begins %10.10s %*.*s %4.4s\n, ct, timesize, timesize, + printf(\n%s begins %10.10s %*.*s %4.4s\n, basename(file), ct, timesize, timesize, ct + 11, ct + 20); }