$OpenBSD: patch-options_c,v 1.2 2010/07/08 09:18:25 fkr Exp $
--- 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"
+  "--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"
@@ -1253,6 +1254,7 @@ show_settings (const struct options *o)
 #endif
   SHOW_INT (rcvbuf);
   SHOW_INT (sndbuf);
+  SHOW_INT (rtable);
   SHOW_INT (sockflags);
 
   SHOW_BOOL (fast_io);
@@ -3989,6 +3991,11 @@ add_option (struct options *options,
     {
       VERIFY_PERMISSION (OPT_P_SOCKBUF);
       options->sndbuf = positive_atoi (p[1]);
+    }
+  else if (streq (p[0], "rtable") && p[1])
+    {
+      VERIFY_PERMISSION (OPT_P_SOCKFLAGS);
+      options->rtable = positive_atoi (p[1]);
     }
   else if (streq (p[0], "socket-flags"))
     {
