WireGuard Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] wg-quick: Fix alternate routing table syntax on OpenBSD
@ 2019-07-20 12:20 Ankur Kothari
  2019-08-05 18:46 ` Jason A. Donenfeld
  0 siblings, 1 reply; 6+ messages in thread
From: Ankur Kothari @ 2019-07-20 12:20 UTC (permalink / raw)
  To: wireguard

---
 src/tools/wg-quick/openbsd.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/wg-quick/openbsd.bash b/src/tools/wg-quick/openbsd.bash
index b234609..2cadeec 100755
--- a/src/tools/wg-quick/openbsd.bash
+++ b/src/tools/wg-quick/openbsd.bash
@@ -293,7 +293,7 @@ add_route() {
 	fi
 
 	if [[ -n $TABLE && $TABLE != auto ]]; then
-		cmd route -q -n add "-$family" -rdomain "$TABLE" "$1" -iface "$ifaceroute"
+		cmd route -q -n -T "$TABLE" add "-$family" "$1" -iface "$ifaceroute"
 	elif [[ $1 == */0 ]]; then
 		if [[ $1 == *:* ]]; then
 			AUTO_ROUTE6=1
-- 
2.22.0


Sent via Migadu.com, world's easiest email hosting
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] wg-quick: Fix alternate routing table syntax on OpenBSD
  2019-07-20 12:20 [PATCH] wg-quick: Fix alternate routing table syntax on OpenBSD Ankur Kothari
@ 2019-08-05 18:46 ` Jason A. Donenfeld
  2019-08-05 19:13   ` Janne Johansson
  2019-08-05 22:57   ` [PATCH v2] wg-quick: openbsd: fix alternate routing table syntax Ankur Kothari
  0 siblings, 2 replies; 6+ messages in thread
From: Jason A. Donenfeld @ 2019-08-05 18:46 UTC (permalink / raw)
  To: Ankur Kothari; +Cc: WireGuard mailing list

Hi Ankur,

Thanks for this. Could you provide your Signed-off-by line? Also, why
is this required? Is this a recent change in syntax? A new syntax? Was
the syntax always wrong? What's the deal?

Thanks,
Jason
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] wg-quick: Fix alternate routing table syntax on OpenBSD
  2019-08-05 18:46 ` Jason A. Donenfeld
@ 2019-08-05 19:13   ` Janne Johansson
  2019-08-05 19:38     ` Jason A. Donenfeld
  2019-08-05 22:57   ` [PATCH v2] wg-quick: openbsd: fix alternate routing table syntax Ankur Kothari
  1 sibling, 1 reply; 6+ messages in thread
From: Janne Johansson @ 2019-08-05 19:13 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

[-- Attachment #1.1: Type: text/plain, Size: 911 bytes --]

According to "man route" on openbsd, the -T is how its supposed to be run:

     The other commands relating to adding, changing, or deleting routes
have

     the syntax:


     *route* [*-dnqtv*] [*-T* rtable] *add* [modifiers] destination gateway



The manpage for "route" doesn't even contain "rdomain" so I would assume
Ankur is correct in that diff.


Den mån 5 aug. 2019 kl 20:47 skrev Jason A. Donenfeld <Jason@zx2c4.com>:

> Hi Ankur,
>
> Thanks for this. Could you provide your Signed-off-by line? Also, why
> is this required? Is this a recent change in syntax? A new syntax? Was
> the syntax always wrong? What's the deal?
>
> Thanks,
> Jason
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard
>


-- 
May the most significant bit of your life be positive.

[-- Attachment #1.2: Type: text/html, Size: 3797 bytes --]

<div dir="ltr"><div dir="ltr">According to &quot;man route&quot; on openbsd, the -T is how its supposed to be run:<div><br><div>





<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">     </span>The other commands relating to adding, changing, or deleting routes have</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">     </span>the syntax:</span></p>
<p class="gmail-p2" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:13px"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><span class="gmail-Apple-converted-space">     </span><b>route</b> [<b>-dnqtv</b>] [<b>-T</b> </span><span class="gmail-s2" style="text-decoration-line:underline;font-variant-ligatures:no-common-ligatures">rtable</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">] <b>add</b> [</span><span class="gmail-s2" style="text-decoration-line:underline;font-variant-ligatures:no-common-ligatures">modifiers</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">] </span><span class="gmail-s2" style="text-decoration-line:underline;font-variant-ligatures:no-common-ligatures">destination</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> </span><span class="gmail-s2" style="text-decoration-line:underline;font-variant-ligatures:no-common-ligatures">gateway</span></p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><br></p></div></div></div><br><div class="gmail_quote"><div class="gmail_attr">The manpage for &quot;route&quot; doesn&#39;t even contain &quot;rdomain&quot; so I would assume Ankur is correct in that diff.</div><div class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">Den mån 5 aug. 2019 kl 20:47 skrev Jason A. Donenfeld &lt;<a href="mailto:Jason@zx2c4.com">Jason@zx2c4.com</a>&gt;:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Ankur,<br>
<br>
Thanks for this. Could you provide your Signed-off-by line? Also, why<br>
is this required? Is this a recent change in syntax? A new syntax? Was<br>
the syntax always wrong? What&#39;s the deal?<br>
<br>
Thanks,<br>
Jason<br>
_______________________________________________<br>
WireGuard mailing list<br>
<a href="mailto:WireGuard@lists.zx2c4.com" target="_blank">WireGuard@lists.zx2c4.com</a><br>
<a href="https://lists.zx2c4.com/mailman/listinfo/wireguard" rel="noreferrer" target="_blank">https://lists.zx2c4.com/mailman/listinfo/wireguard</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">May the most significant bit of your life be positive.<br></div></div>

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] wg-quick: Fix alternate routing table syntax on OpenBSD
  2019-08-05 19:13   ` Janne Johansson
@ 2019-08-05 19:38     ` Jason A. Donenfeld
  0 siblings, 0 replies; 6+ messages in thread
From: Jason A. Donenfeld @ 2019-08-05 19:38 UTC (permalink / raw)
  To: Janne Johansson; +Cc: WireGuard mailing list

Hi Janne,

Thanks. I wonder how I came up with the rdomain syntax in the first
place. Perhaps out of ifconfig.c incorrectly.

Jason
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2] wg-quick: openbsd: fix alternate routing table syntax
  2019-08-05 18:46 ` Jason A. Donenfeld
  2019-08-05 19:13   ` Janne Johansson
@ 2019-08-05 22:57   ` Ankur Kothari
  2019-08-07  8:41     ` Jason A. Donenfeld
  1 sibling, 1 reply; 6+ messages in thread
From: Ankur Kothari @ 2019-08-05 22:57 UTC (permalink / raw)
  To: wireguard

route(8) has always used the `-T` option to specify the
routing table; there is no `rdomain` option.

Signed-off-by: Ankur Kothari <ankur@lipidity.com>
---
 src/tools/wg-quick/openbsd.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/wg-quick/openbsd.bash b/src/tools/wg-quick/openbsd.bash
index b234609..2cadeec 100755
--- a/src/tools/wg-quick/openbsd.bash
+++ b/src/tools/wg-quick/openbsd.bash
@@ -293,7 +293,7 @@ add_route() {
 	fi
 
 	if [[ -n $TABLE && $TABLE != auto ]]; then
-		cmd route -q -n add "-$family" -rdomain "$TABLE" "$1" -iface "$ifaceroute"
+		cmd route -q -n -T "$TABLE" add "-$family" "$1" -iface "$ifaceroute"
 	elif [[ $1 == */0 ]]; then
 		if [[ $1 == *:* ]]; then
 			AUTO_ROUTE6=1
-- 
2.22.0


Sent via Migadu.com, world's easiest email hosting
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] wg-quick: openbsd: fix alternate routing table syntax
  2019-08-05 22:57   ` [PATCH v2] wg-quick: openbsd: fix alternate routing table syntax Ankur Kothari
@ 2019-08-07  8:41     ` Jason A. Donenfeld
  0 siblings, 0 replies; 6+ messages in thread
From: Jason A. Donenfeld @ 2019-08-07  8:41 UTC (permalink / raw)
  To: Ankur Kothari; +Cc: WireGuard mailing list

Thanks, applied.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-20 12:20 [PATCH] wg-quick: Fix alternate routing table syntax on OpenBSD Ankur Kothari
2019-08-05 18:46 ` Jason A. Donenfeld
2019-08-05 19:13   ` Janne Johansson
2019-08-05 19:38     ` Jason A. Donenfeld
2019-08-05 22:57   ` [PATCH v2] wg-quick: openbsd: fix alternate routing table syntax Ankur Kothari
2019-08-07  8:41     ` Jason A. Donenfeld

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/ public-inbox