]> Git Repo - J-linux.git/commitdiff
um: Fix raw interface options
authorAnton Ivanov <[email protected]>
Thu, 7 Jun 2018 11:43:15 +0000 (12:43 +0100)
committerRichard Weinberger <[email protected]>
Sun, 10 Jun 2018 20:54:47 +0000 (22:54 +0200)
Raw interface initialization needs QDISC_BYPASS. Otherwise
it sees its own packets when transmitting.

Fixes: 49da7e64f33e ("High Performance UML Vector Network Driver")
Cc: <[email protected]>
Signed-off-by: Anton Ivanov <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
arch/um/drivers/vector_kern.c

index 8b852928959bed01bba36e04d3cc57934fa6701f..cf9bf9b43ec33f6fbb51efee59356c1aa314ba34 100644 (file)
@@ -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);
 
This page took 0.060751 seconds and 4 git commands to generate.