netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Subject: Re: [Bug 207401] New: vrf fwmark socket
Date: Wed, 22 Apr 2020 08:44:59 -0700	[thread overview]
Message-ID: <20200422084459.0d31a65b@hermes.lan> (raw)
In-Reply-To: <bug-207401-100@https.bugzilla.kernel.org/>

Looks like user error, not a bug.

On Wed, 22 Apr 2020 12:37:04 +0000
bugzilla-daemon@bugzilla.kernel.org wrote:

> https://bugzilla.kernel.org/show_bug.cgi?id=207401
> 
>             Bug ID: 207401
>            Summary: vrf fwmark socket
>            Product: Networking
>            Version: 2.5
>     Kernel Version: 5.5.11
>           Hardware: All
>                 OS: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: IPV4
>           Assignee: stephen@networkplumber.org
>           Reporter: 1455793380@qq.com
>         Regression: No
> 
> add rule:
> #ip ru a fwmark 10000 table 10000 pref 900
> 
> and then add vrf and salve interface
> #ip link add vrf-1 type vrf table 10
> #ip link set dev vrf-1 up
> #ip link set dev ens19 master vrf-1
> 
> write a program socket bind mark 10000 to match the rule
> setsockopt(entry->fd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark));
> 
> add ip and add route in table 10000
> # ip a a 5.5.5.5/24 dev ens20
> # ip r a 5.5.5.0/24 dev ens20 scope link table 10000 
> if I set src addr, then can't add this route 
> 
> visit the server,success
> #curl --interface 5.5.5.100
> but if I use the mark, my program can't visit the server
> kernel can't find my socket? return RST!
> 


           reply	other threads:[~2020-04-22 15:45 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <bug-207401-100@https.bugzilla.kernel.org/>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200422084459.0d31a65b@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).