Re: Trivial patch for ipv6
On Wed, Feb 12, 2014 at 09:11:41PM +0100, Alexander Bluhm wrote: > On Wed, Feb 12, 2014 at 10:10:36AM -0800, Loganaden Velvindron wrote: > > Hi All, > > > > based on a similar change from FreeBSD: > > > > Change the return error from EACCES to EPERM as it is not a file. > > According to errno(2) EACCES is for file access permissions, so > EPERM seems more apporiate. > > A grep for EACCES and EPERM in netinet and netinet6 shows that both > are used often. Do we want to move towards EPERM for networking? > > I think ip6_mrouter_set() and ip6_mrouter_get() should stay in sync, > so please make the diff for both functions. > > bluhm Please find attached the diff (tested on my OpenBSD laptop running -current and a tunnel to HE): Index: sys/netinet6/ip6_mroute.c === RCS file: /cvs/src/sys/netinet6/ip6_mroute.c,v retrieving revision 1.67 diff -u -p -u -p -r1.67 ip6_mroute.c --- sys/netinet6/ip6_mroute.c 11 Nov 2013 09:15:35 - 1.67 +++ sys/netinet6/ip6_mroute.c 2 Mar 2014 13:41:18 - @@ -247,7 +247,7 @@ int ip6_mrouter_set(int cmd, struct socket *so, struct mbuf *m) { if (cmd != MRT6_INIT && so != ip6_mrouter) - return (EACCES); + return (EPERM); switch (cmd) { case MRT6_INIT: @@ -287,7 +287,8 @@ ip6_mrouter_set(int cmd, struct socket * int ip6_mrouter_get(int cmd, struct socket *so, struct mbuf **m) { - if (so != ip6_mrouter) return EACCES; + if (so != ip6_mrouter) + return (EPERM); *m = m_get(M_WAIT, MT_SOOPTS); > > > > > Index: src/sys/netinet6/ip6_mroute.c > > === > > RCS file: /cvs/src/sys/netinet6/ip6_mroute.c,v > > retrieving revision 1.67 > > diff -u -p -u -p -r1.67 ip6_mroute.c > > --- src/sys/netinet6/ip6_mroute.c 11 Nov 2013 09:15:35 - 1.67 > > +++ src/sys/netinet6/ip6_mroute.c 12 Feb 2014 18:04:44 - > > @@ -247,7 +247,7 @@ int > > ip6_mrouter_set(int cmd, struct socket *so, struct mbuf *m) > > { > > if (cmd != MRT6_INIT && so != ip6_mrouter) > > - return (EACCES); > > + return (EPERM); > > > > switch (cmd) { > > case MRT6_INIT:
sysctl.8: add missing mtudisctimeout for ipv6
Hi, While going through some of the commit logs, I noticed that sysctl didn't list ip6.mtudisctimeout. Patch attached: Index: sbin/sysctl/sysctl.8 === RCS file: /cvs/src/sbin/sysctl/sysctl.8,v retrieving revision 1.173 diff -u -p -u -p -r1.173 sysctl.8 --- sbin/sysctl/sysctl.828 Oct 2013 21:02:35 - 1.173 +++ sbin/sysctl/sysctl.82 Mar 2014 18:45:29 - @@ -303,6 +303,7 @@ and a few require a kernel compiled with .It net.inet6.ip6.v6only Ta integer Ta no .It net.inet6.ip6.maxfrags Ta integer Ta yes .It net.inet6.ip6.mforwarding Ta integer Ta yes +.It net.inet6.ip6.mtudisctimeout Ta integer Ta yes .It net.inet6.ip6.multipath Ta integer Ta yes .It net.inet6.ip6.multicast_mtudisc Ta integer Ta yes .It net.inet6.icmp6.rediraccept Ta integer Ta yes
[patch] ospfd: exporting default gateway via route label (fix ROUNDUP)
Hi all, ospfd can't export the default gateway via route label because get_rtaddrs gets confused by a netmask (RTAX_NETMASK) of 0 because sa->sa_len in get_rtaddrs is 0 and ROUNDUP then returns 0 also. The bug has been fixed in ospf6d in the same way a couple of years ago. Ospf6d uses the ROUNDUP macro from route/show.c now. I think ospfd should do the same. Regards, Florian Index: usr.sbin/ospfd/kroute.c === RCS file: /cvs/src/usr.sbin/ospfd/kroute.c,v retrieving revision 1.93 diff -u -p -r1.93 kroute.c --- usr.sbin/ospfd/kroute.c 30 Oct 2013 17:24:35 - 1.93 +++ usr.sbin/ospfd/kroute.c 2 Mar 2014 23:18:47 - @@ -987,8 +987,8 @@ prefixlen2mask(u_int8_t prefixlen) return (htonl(0x << (32 - prefixlen))); } -#defineROUNDUP(a) \ -(((a) & (sizeof(long) - 1)) ? (1 + ((a) | (sizeof(long) - 1))) : (a)) +#define ROUNDUP(a) \ + ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) void get_rtaddrs(int addrs, struct sockaddr *sa, struct sockaddr **rti_info)
Re: USB install image for OpenBSD 5.5 - TESTING REQUIRED
On Sat, Mar 1, 2014 at 5:15 AM, Alexander Hall wrote: > On 02/28/14 23:51, Chris Cappuccio wrote: > >> Here are some potential USB installer images for OpenBSD/amd64 5.5 >> >> http://www.nmedia.net/chris/install55.fs >> http://www.nmedia.net/chris/miniroot55.fs >> >> The install55.fs contains full installation packages. The >> miniroot55.fs is a ramdisk-kernel only (for network installation or >> troubleshooting.) >> > > It might be obvious, but since it confused me for a bit, I'd like to > correct this an say that miniroot55.fs *contains* a ramdisk kernel only. It > is still a complete disk image. > > /Alexander > > > >> Please test either on as many amd64 machines as you can with any USB >> flash and any USB-CF adapters that you have. >> >> Report failures and success of each image ASAP. Test as many flash >> types (USB, CF-USB, old USB, new USB...) as you can. >> >> SPECIFICALLY, IF you have a boot failure, I need to see the dmesg output >> (and the fdisk and disklabel output from the machine if possible to boot >> it another way). Any error messages displayed from the boot blocks or >> BIOS are also essential. >> >> > Works well for me, an error about the entropy pool not being created seemed reasonable to me. Only tried on it from USB on an old Net-Burst era system. Installed very nicely, way faster than cd or lan, and also quicker than my previous USB installs, although this media's new to me.
Re: USB install image for OpenBSD 5.5 - TESTING REQUIRED
On Sat, Mar 1, 2014 at 7:59 AM, Chris Cappuccio wrote: > Chris Cappuccio [ch...@nmedia.net] wrote: >> The installation entails: >> >> dd if=miniroot55.fs of=/dev/rsd2c >> > > Actually, for the install55.fs image, you want to specify a block size, > (or wait ages.) > > dd if=install55.fs of=/dev/rsd2c bs=1m > > It's something like 20x faster to specify a block size on some of mine. > > The 512 byte default block size is so small, it must cause the USB key > to re-write the same physical block multiple times. These devices have > underlying blocks of 4K and larger. > That's OpenBSD -current right ? I'm going to test it in the afternoon, as the CDROM drive has issues on my OpenBSD development machine. -- This message is strictly personal and the opinions expressed do not represent those of my employers, either past or present.