diff options
author | Anton Ivanov <anton.ivanov@cambridgegreys.com> | 2018-06-07 12:43:15 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-06-10 22:54:47 +0200 |
commit | 5ec9121195a4f1cecd0fa592636c5f81eb03dc8c (patch) | |
tree | 52ffa93fb1f547dbbc9a7987724f2b0feec932bf /arch/um | |
parent | 4579a1ba692af81da7ea6ce197f8169ddc0c327f (diff) | |
download | linux-5ec9121195a4f1cecd0fa592636c5f81eb03dc8c.tar.gz linux-5ec9121195a4f1cecd0fa592636c5f81eb03dc8c.tar.bz2 linux-5ec9121195a4f1cecd0fa592636c5f81eb03dc8c.zip |
um: Fix raw interface options
Raw interface initialization needs QDISC_BYPASS. Otherwise
it sees its own packets when transmitting.
Fixes: 49da7e64f33e ("High Performance UML Vector Network Driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/vector_kern.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c index 8b852928959b..cf9bf9b43ec3 100644 --- a/arch/um/drivers/vector_kern.c +++ b/arch/um/drivers/vector_kern.c @@ -188,7 +188,7 @@ static int get_transport_options(struct arglist *def) if (strncmp(transport, TRANS_TAP, TRANS_TAP_LEN) == 0) return (vec_rx | VECTOR_BPF); if (strncmp(transport, TRANS_RAW, TRANS_RAW_LEN) == 0) - return (vec_rx | vec_tx); + return (vec_rx | vec_tx | VECTOR_QDISC_BYPASS); return (vec_rx | vec_tx); } @@ -1241,9 +1241,8 @@ static int vector_net_open(struct net_device *dev) if ((vp->options & VECTOR_QDISC_BYPASS) != 0) { if (!uml_raw_enable_qdisc_bypass(vp->fds->rx_fd)) - vp->options = vp->options | VECTOR_BPF; + vp->options |= VECTOR_BPF; } - if ((vp->options & VECTOR_BPF) != 0) vp->bpf = uml_vector_default_bpf(vp->fds->rx_fd, dev->dev_addr); |