On Thu, Jul 08, 2010 at 08:25:44AM +0100, Stuart Henderson wrote: > > here is the fixed update to follow the changes in -current irt routing > > tables/domains. > I think that, since options have changed, this now warrants a > PKGNAME bump. Otherwise ok.
Thanks for the Feedback! I thought it would be cleaner to also rename the options, since it is now called rtables everywhere. Updated diff with p-level bump. Index: Makefile =================================================================== RCS file: /cvs//ports/net/openvpn/Makefile,v retrieving revision 1.28 diff -u -r1.28 Makefile --- Makefile 11 Dec 2009 23:05:37 -0000 1.28 +++ Makefile 8 Jul 2010 07:53:17 -0000 @@ -4,6 +4,7 @@ VERSION= 2.1.0 DISTNAME= openvpn-${VERSION} +PKGNAME= ${DISTNAME}p0 CATEGORIES= net security HOMEPAGE= http://openvpn.net/ Index: patches/patch-init_c =================================================================== RCS file: /cvs//ports/net/openvpn/patches/patch-init_c,v retrieving revision 1.1 diff -u -r1.1 patch-init_c --- patches/patch-init_c 26 Nov 2009 22:55:27 -0000 1.1 +++ patches/patch-init_c 8 Jul 2010 07:53:17 -0000 @@ -1,11 +1,11 @@ $OpenBSD: patch-init_c,v 1.1 2009/11/26 22:55:27 fkr Exp $ ---- init.c.orig Thu Oct 1 18:02:18 2009 -+++ init.c Thu Oct 29 18:44:33 2009 +--- init.c.orig Thu Oct 1 20:02:18 2009 ++++ init.c Thu Jul 8 07:15:30 2010 @@ -2216,6 +2216,7 @@ do_init_socket_1 (struct context *c, const int mode) c->options.mtu_discover_type, c->options.rcvbuf, c->options.sndbuf, -+ c->options.rdomain, ++ c->options.rtable, sockflags); } Index: patches/patch-openvpn_8 =================================================================== RCS file: /cvs//ports/net/openvpn/patches/patch-openvpn_8,v retrieving revision 1.1 diff -u -r1.1 patch-openvpn_8 --- patches/patch-openvpn_8 26 Nov 2009 22:55:27 -0000 1.1 +++ patches/patch-openvpn_8 8 Jul 2010 07:53:17 -0000 @@ -1,12 +1,12 @@ $OpenBSD: patch-openvpn_8,v 1.1 2009/11/26 22:55:27 fkr Exp $ ---- openvpn.8.orig Sat Nov 21 00:02:43 2009 -+++ openvpn.8 Fri Nov 20 23:45:31 2009 +--- openvpn.8.orig Fri Dec 11 09:04:24 2009 ++++ openvpn.8 Thu Jul 8 07:32:55 2010 @@ -1313,6 +1313,11 @@ on both client and server for maximum effect. Currently defaults to 100. .\"********************************************************* .TP -+.B --rdomain n -+(OpenBSD only) Set the routing domain. ++.B --rtable n ++(OpenBSD only) Set the routing table. +Defaults to 0. +.\"********************************************************* +.TP Index: patches/patch-options_c =================================================================== RCS file: /cvs//ports/net/openvpn/patches/patch-options_c,v retrieving revision 1.1 diff -u -r1.1 patch-options_c --- patches/patch-options_c 26 Nov 2009 22:55:27 -0000 1.1 +++ patches/patch-options_c 8 Jul 2010 07:53:17 -0000 @@ -1,11 +1,11 @@ $OpenBSD: patch-options_c,v 1.1 2009/11/26 22:55:27 fkr Exp $ ---- options.c.orig Fri Nov 20 13:09:14 2009 -+++ options.c Fri Nov 20 23:38:08 2009 +--- options.c.orig Fri Dec 11 09:09:39 2009 ++++ options.c Thu Jul 8 07:15:14 2010 @@ -250,6 +250,7 @@ static const char usage_message[] = "--sndbuf size : Set the TCP/UDP send buffer size.\n" "--rcvbuf size : Set the TCP/UDP receive buffer size.\n" "--txqueuelen n : Set the tun/tap TX queue length to n (Linux only).\n" -+ "--rdomain n : Set the routing domain (default=0, OpenBSD only)\n" ++ "--rtable n : Set the routing table (default=0, OpenBSD only)\n" "--mlock : Disable Paging -- ensures key material and tunnel\n" " data will never be written to disk.\n" "--up cmd : Shell cmd to execute after successful tun device open.\n" @@ -13,7 +13,7 @@ #endif SHOW_INT (rcvbuf); SHOW_INT (sndbuf); -+ SHOW_INT (rdomain); ++ SHOW_INT (rtable); SHOW_INT (sockflags); SHOW_BOOL (fast_io); @@ -22,10 +22,10 @@ VERIFY_PERMISSION (OPT_P_SOCKBUF); options->sndbuf = positive_atoi (p[1]); + } -+ else if (streq (p[0], "rdomain") && p[1]) ++ else if (streq (p[0], "rtable") && p[1]) + { + VERIFY_PERMISSION (OPT_P_SOCKFLAGS); -+ options->rdomain = positive_atoi (p[1]); ++ options->rtable = positive_atoi (p[1]); } else if (streq (p[0], "socket-flags")) { Index: patches/patch-options_h =================================================================== RCS file: /cvs//ports/net/openvpn/patches/patch-options_h,v retrieving revision 1.1 diff -u -r1.1 patch-options_h --- patches/patch-options_h 26 Nov 2009 22:55:27 -0000 1.1 +++ patches/patch-options_h 8 Jul 2010 07:53:17 -0000 @@ -1,12 +1,12 @@ $OpenBSD: patch-options_h,v 1.1 2009/11/26 22:55:27 fkr Exp $ ---- options.h.orig Thu Oct 1 18:02:18 2009 -+++ options.h Thu Oct 29 18:44:33 2009 +--- options.h.orig Thu Oct 1 20:02:18 2009 ++++ options.h Thu Jul 8 07:32:35 2010 @@ -285,6 +285,9 @@ struct options int rcvbuf; int sndbuf; + /* routing domain */ -+ int rdomain; ++ int rtable; + /* socket flags */ unsigned int sockflags; Index: patches/patch-socket_c =================================================================== RCS file: /cvs//ports/net/openvpn/patches/patch-socket_c,v retrieving revision 1.1 diff -u -r1.1 patch-socket_c --- patches/patch-socket_c 26 Nov 2009 22:55:27 -0000 1.1 +++ patches/patch-socket_c 8 Jul 2010 07:53:17 -0000 @@ -1,20 +1,20 @@ $OpenBSD: patch-socket_c,v 1.1 2009/11/26 22:55:27 fkr Exp $ ---- socket.c.orig Thu Oct 1 18:02:18 2009 -+++ socket.c Thu Oct 29 21:27:46 2009 +--- socket.c.orig Fri Dec 11 05:59:45 2009 ++++ socket.c Tue Jul 6 23:49:11 2010 @@ -503,6 +503,20 @@ socket_set_tcp_nodelay (int sd, int state) #endif } +static void -+socket_set_rdomain (int sd, int rdomain) ++socket_set_rtable (int sd, int rtable) +{ +#ifdef TARGET_OPENBSD -+ if (rdomain > 0) ++ if (rtable > 0) + { -+ if (setsockopt (sd, IPPROTO_IP, SO_RDOMAIN, &rdomain, sizeof(rdomain)) == -1) -+ msg (M_SOCKERR, "Socket flags: SO_RDOMAIN=%d failed, cannot bind on specified routing domain", rdomain); ++ if (setsockopt (sd, IPPROTO_IP, SO_RTABLE, &rtable, sizeof(rtable)) == -1) ++ msg (M_SOCKERR, "Socket flags: SO_RTABLE=%d failed, cannot bind on specified routing domain", rtable); + else -+ dmsg (D_SOCKET_DEBUG, "Socket flags: SO_RDOMAIN=%d succeeded", rdomain); ++ dmsg (D_SOCKET_DEBUG, "Socket flags: SO_RTABLE=%d succeeded", rtable); + } +#endif +} @@ -26,7 +26,7 @@ int mtu_discover_type, int rcvbuf, int sndbuf, -+ int rdomain, ++ int rtable, unsigned int sockflags) { ASSERT (sock); @@ -36,7 +36,7 @@ create_socket (sock); + + /* set the routing domain for the socket */ -+ socket_set_rdomain (sock->sd, rdomain); ++ socket_set_rtable (sock->sd, rtable); + resolve_bind_local (sock); resolve_remote (sock, 1, NULL, NULL); Index: patches/patch-socket_h =================================================================== RCS file: /cvs//ports/net/openvpn/patches/patch-socket_h,v retrieving revision 1.1 diff -u -r1.1 patch-socket_h --- patches/patch-socket_h 26 Nov 2009 22:55:27 -0000 1.1 +++ patches/patch-socket_h 8 Jul 2010 07:53:17 -0000 @@ -1,11 +1,11 @@ $OpenBSD: patch-socket_h,v 1.1 2009/11/26 22:55:27 fkr Exp $ ---- socket.h.orig Thu Oct 1 18:02:18 2009 -+++ socket.h Thu Oct 29 18:44:33 2009 +--- socket.h.orig Thu Oct 1 20:02:18 2009 ++++ socket.h Thu Jul 8 07:22:47 2010 @@ -311,6 +311,7 @@ link_socket_init_phase1 (struct link_socket *sock, int mtu_discover_type, int rcvbuf, int sndbuf, -+ int rdomain, ++ int rtable, unsigned int sockflags); void link_socket_init_phase2 (struct link_socket *sock, -- GPG/PGP: D9AC74D0 / 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 http://hazardous.org/~fkr - f...@silc|irc - @felixkronlage - FKR-RIPE https://www.bytemine.net/ - bytemine - BSD based Hosting/Solutions/Ideas