From 32828cc4fb241aca01913424aa1781af0acd6aee Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Thu, 26 Oct 2017 19:42:55 +0100 Subject: --interface: add support for Linux VRF The --interface command (CURLOPT_INTERFACE option) already uses SO_BINDTODEVICE on Linux, but it tries to parse it as an interface or IP address first, which fails in case the user passes a VRF. Try to use the socket option immediately and parse it as a fallback instead. Update the documentation to mention this feature, and that it requires the binary to be ran by root or with CAP_NET_RAW capabilities for this to work. Closes #2024 --- docs/cmdline-opts/interface.d | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/cmdline-opts') diff --git a/docs/cmdline-opts/interface.d b/docs/cmdline-opts/interface.d index da84cd2b6..bd0817618 100644 --- a/docs/cmdline-opts/interface.d +++ b/docs/cmdline-opts/interface.d @@ -10,3 +10,7 @@ name, IP address or host name. An example could look like: curl --interface eth0:1 https://www.example.com/ If this option is used several times, the last one will be used. + +On Linux it can be used to specify a VRF, but the binary needs to either +have CAP_NET_RAW or to be ran as root. More information about Linux VRF: +https://www.kernel.org/doc/Documentation/networking/vrf.txt -- cgit v1.2.3